gcc-4.3.2 bombs rather nastily when trying to build the kernel on my UP1500 (systype is NAUTILUS): sheldon linux # gcc -v Using built-in specs. Target: alpha-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.3.2-r2/work/gcc-4.3.2/configure --prefix=/usr --bindir=/usr/alpha-unknown-linux-gnu/gcc-bin/4.3.2 --includedir=/usr/lib/gcc/alpha-unknown-linux-gnu/4.3.2/include --datadir=/usr/share/gcc-data/alpha-unknown-linux-gnu/4.3.2 --mandir=/usr/share/gcc-data/alpha-unknown-linux-gnu/4.3.2/man --infodir=/usr/share/gcc-data/alpha-unknown-linux-gnu/4.3.2/info --with-gxx-include-dir=/usr/lib/gcc/alpha-unknown-linux-gnu/4.3.2/include/g++-v4 --host=alpha-unknown-linux-gnu --build=alpha-unknown-linux-gnu --disable-altivec --disable-fixed-point --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.2-r2 p1.5, pie-10.1.5' Thread model: posix gcc version 4.3.2 (Gentoo 4.3.2-r2 p1.5, pie-10.1.5) sheldon linux # make mrproper CLEAN /usr/src/linux-2.6.27.10 CLEAN init CLEAN .tmp_versions CLEAN scripts/basic CLEAN scripts/kconfig CLEAN scripts/mod CLEAN scripts CLEAN include/config CLEAN .config .config.old include/asm .version include/linux/autoconf.h include/linux/version.h include/linux/utsrelease.h include/linux/bounds.h include/asm-alpha/asm-offsets.h include/asm/asm-offsets.h Module.symvers sheldon linux # zcat /proc/config.gz > .config sheldon linux # make oldconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/lex.zconf.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf -o arch/alpha/Kconfig # # configuration written to .config # sheldon linux # make all GEN include/linux/bounds.h CC arch/alpha/kernel/asm-offsets.s GEN include/asm/asm-offsets.h CALL scripts/checksyscalls.sh <stdin>:1377:2: warning: #warning syscall timerfd_create not implemented <stdin>:1385:2: warning: #warning syscall fallocate not implemented <stdin>:1389:2: warning: #warning syscall timerfd_settime not implemented <stdin>:1393:2: warning: #warning syscall timerfd_gettime not implemented <stdin>:1397:2: warning: #warning syscall signalfd4 not implemented <stdin>:1401:2: warning: #warning syscall eventfd2 not implemented <stdin>:1405:2: warning: #warning syscall epoll_create1 not implemented <stdin>:1409:2: warning: #warning syscall dup3 not implemented <stdin>:1413:2: warning: #warning syscall pipe2 not implemented <stdin>:1417:2: warning: #warning syscall inotify_init1 not implemented CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/kallsyms HOSTCC scripts/pnmtologo HOSTCC scripts/conmakehash HOSTCC scripts/bin2c CC init/main.o CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o CC init/do_mounts.o CC init/do_mounts_rd.o LD init/mounts.o CC init/noinitramfs.o CC init/calibrate.o LD init/built-in.o LD usr/built-in.o AS arch/alpha/kernel/entry.o CC arch/alpha/kernel/traps.o CC arch/alpha/kernel/process.o CC arch/alpha/kernel/init_task.o CC arch/alpha/kernel/osf_sys.o CC arch/alpha/kernel/irq.o CC arch/alpha/kernel/irq_alpha.o CC arch/alpha/kernel/signal.o CC arch/alpha/kernel/setup.o CC arch/alpha/kernel/ptrace.o CC arch/alpha/kernel/time.o CC arch/alpha/kernel/alpha_ksyms.o AS arch/alpha/kernel/systbls.o CC arch/alpha/kernel/err_common.o CC arch/alpha/kernel/io.o CC arch/alpha/kernel/pci.o CC arch/alpha/kernel/pci_iommu.o CC arch/alpha/kernel/srm_env.o CC arch/alpha/kernel/module.o CC arch/alpha/kernel/srmcons.o CC arch/alpha/kernel/core_irongate.o CC arch/alpha/kernel/sys_nautilus.o CC arch/alpha/kernel/irq_i8259.o CC arch/alpha/kernel/irq_srm.o cc1: warnings being treated as errors arch/alpha/kernel/irq_srm.c: In function 'init_srm_irqs': arch/alpha/kernel/irq_srm.c:69: error: array subscript is above array bounds arch/alpha/kernel/irq_srm.c:70: error: array subscript is above array bounds make[1]: *** [arch/alpha/kernel/irq_srm.o] Error 1 make: *** [arch/alpha/kernel] Error 2 The file arch/alpha/kernel/irq_srm.c is only used for some alpha systypes, NAUTILUS being one of them. It seems gcc's array bounds checking is broken: kernels built with anything older than 4.3 (i.e. without bounds checking) work ok and have been doing so for a while. Increasing NR_IRQS in arch/alpha/include/asm/irq.h from the relevant last-resort case of 16 to 17 makes the error go away (but that's obviously not a proper fix). As a fix, I'd recommend turning off the array bounds check at least for this file (until it is fixed in gcc) or disabling it entirely. Unfortunately, I have no idea how to disable a specific warning for a kernel build. As for debugging, kernelconfig etc is available upon request as is a machine to compile stuff on, just poke me on IRC (Blackb|rd).
Can you post the output of "make V=1"? At least on my system, bounds checking is a warning, not an error. And I really hope we aren't building with -Werror?
Created attachment 177905 [details] Build log from 2.6.27.10 with V=1 See the attached log. Near as I can tell, arch/alpha/kernel/Makefile actually sets -Werror at line 7.
As a further data point compiling latest g-s for alpha fails in the same way in the same spot.
Created attachment 177958 [details] kernel .config file Here's the kernel config I used.
mailed upstream at http://marc.info/?l=linux-kernel&m=123158858506283&w=2
fixed in gentoo-sources-2.6.27-r8 and gentoo-sources-2.6.28-r1