Hi again, On 15.09.23 13:47, Frank Scheiner wrote:
Hi Adrian, On 06.08.23 10:44, John Paul Adrian Glaubitz wrote:Hello! The following important packages are broken on ia64: - grub (git master) does not boot on ia64, crashes when loading stage2 (https://lists.gnu.org/archive/html/grub-devel/2023-07/msg00106.html) - kernel FTBFS with gcc-13 (https://buildd.debian.org/status/fetch.php?pkg=linux&arch=ia64&ver=6.4.4-2&stamp=1690708282&raw=0)I created a bug report for this, see [1]. In short this happens (1) also for cross-compilation on amd64 (most likely also for other cross-compilation host arches), (2) for me always for the same file (`net/ipv4/fib_semantics.c`) and function ("fib_create_info()"), but there are others, too, see buildd link, (3) for different kernel versions and (3) is gone when providing `-fsanitize=undefined` during compilation. Details in [1]. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111425 I hope someone picks that up.
Richard Biener suggested `-fno-var-tracking` or `-g0` as workaround and both indeed workaround the problem (see [2]). I don't yet know how to limit the addition of `-fno-var-tracking` to KBUILD_CFLAGS to `net/ipv4/fib_semantics.c` but the following patch: ``` root@dl380-g7:/usr/src# cat workaround-for-gcc-13.patch diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index b18ba8ef93ad..38f8586ebcc6 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -3,6 +3,8 @@ # Makefile for the Linux TCP/IP (INET) layer. # +KBUILD_CFLAGS += -fno-var-tracking + obj-y := route.o inetpeer.o protocol.o \ ip_input.o ip_fragment.o ip_forward.o ip_options.o \ ip_output.o ip_sockglue.o inet_hashtables.o \ ``` ...makes compilation work for the used kernel configuration ([3]): ``` root@dl380-g7:/usr/src# time ./make-kernel.bash rx2620-rx2660-rx2800-i2-combined-localmodconfig ia64 linux-on-ramdisk/torvalds-linux/ w-gcc13 [...] Making kernel... time make -j24 LOCALVERSION="-ce9ecca0238b140b88f43859b211c9fdfd8e5b70-ia64-w-gcc13" ARCH=ia64 CROSS_COMPILE=ia64-linux- all [...] CC security/integrity/ima/ima_fs.o CC net/ipv4/fib_semantics.o CC security/integrity/ima/ima_queue.o [...] No errors detected in 26726 functions. real 3m41.183s user 69m23.751s sys 6m57.374s 0 [...] done Build artifacts: /boot/vmlinux-6.6.0-rc2-ce9ecca0238b140b88f43859b211c9fdfd8e5b70-ia64-w-gcc13 /boot/vmlinuz-6.6.0-rc2-ce9ecca0238b140b88f43859b211c9fdfd8e5b70-ia64-w-gcc13 /boot/config-6.6.0-rc2-ce9ecca0238b140b88f43859b211c9fdfd8e5b70-ia64-w-gcc13 /lib/modules/6.6.0-rc2-ce9ecca0238b140b88f43859b211c9fdfd8e5b70-ia64-w-gcc13.tar real 3m57.203s user 69m28.325s sys 6m59.414s ``` Looking into the buildd link above this also needs to be applied for `/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c` if it is indeed the same problem. [2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111425#c5 [3]: https://gcc.gnu.org/bugzilla/attachment.cgi?id=55904 The resulting kernel and modules aren't yet tested, though. I plan that for today and tomorrow. Cheers, Frank