after enabling large pages in .config got this: cc1: warnings being treated as errors arch/powerpc/kernel/vdso.c:79: warning: alignment of 'vdso_data_store' is greater than maximum object file alignment. Using 32768 make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1 gt linux # uname -a Linux gt 3.6.6-gentoo #2 SMP Wed Nov 21 16:41:14 MSK 2012 ppc64 POWER4 (gp) CHRP IBM,7040-681 GNU/Linux gt linux # grep 64K_PAGES .config CONFIG_PPC_64K_PAGES=y gt linux #
pardon. got a message about this error: http://patchwork.ozlabs.org/patch/68100/ http://howtofixthis.blogspot.ru/2012/11/building-kernel-warning-alignment-of.html ... all of them says it's a bug in gcc lower 4.3 but I have this one: gt linux # gcc -v Using built-in specs. COLLECT_GCC=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.5.4/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/4.5.4/lto-wrapper Target: powerpc-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.5.4/work/gcc-4.5.4/configure --prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.5.4 --includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.4/include --datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.4 --mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.4/man --infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.5.4/info --with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.5.4/include/g++-v4 --host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/4.5.4/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.4 p1.0, pie-0.4.7' Thread model: posix gcc version 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7) gt linux #
This feels like an upstream bug. Did you try a more recent kernel (like 3.6.6) ?
(In reply to comment #2) > This feels like an upstream bug. Did you try a more recent kernel (like > 3.6.6) ? it's exactly 3.6.6. but yes, looks like an upstream. because the same error was with 3.4.9 (I had to roll forward to 3.6.6 because of the bug in lpfc module)
Reading that patchwork link, this sounds more like a regression in the toolchain than a bug in the kernel. Assigned to the toolchain maintainers. @Dmitry: Can you try an unstable version of gcc and binutils? If you want to remain stable, perhaps try different versions?
(In reply to comment #4) > @Dmitry: Can you try an unstable version of gcc and binutils? If you want to > remain stable, perhaps try different versions? ok, will try on weekends. I'l try to build: 1) gcc-4.7.2 2) binutils-2.23 is it representative enough?
no luck with 4.6.3 gt linux # make CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh <stdin>:1220:2: warning: #warning syscall kcmp not implemented CHK include/generated/compile.h CC arch/powerpc/kernel/vdso.o cc1: warnings being treated as errors arch/powerpc/kernel/vdso.c:79: warning: alignment of 'vdso_data_store' is greater than maximum object file alignment. Using 32768 make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1 make: *** [arch/powerpc/kernel] Error 2 gt linux # gcc -v Using built-in specs. COLLECT_GCC=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.6.3/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/4.6.3/lto-wrapper Target: powerpc-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/4.6.3/include/g++-v4 --host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.7, pie-0.5.2' Thread model: posix gcc version 4.6.3 (Gentoo 4.6.3 p1.7, pie-0.5.2) gt linux #
Yes, unstable versions are closer to the upstream progress which can show whether it is also present in more recent versions. Seems that it's not specific to that gcc version from first sight (although you could try 4.7.2 too if you want), what about binutils?
(In reply to comment #7) > Yes, unstable versions are closer to the upstream progress which can show > whether it is also present in more recent versions. Seems that it's not > specific to that gcc version from first sight (although you could try 4.7.2 > too if you want), what about binutils? gcc 4.6.3 gt linux # . /etc/profile gt linux # make clean CLEAN . CLEAN .tmp_versions gt linux # make CHK include/linux/version.h CHK include/generated/utsrelease.h HOSTCC scripts/basic/fixdep CC kernel/bounds.s GEN include/generated/bounds.h CC arch/powerpc/kernel/asm-offsets.s GEN include/generated/asm-offsets.h CALL scripts/checksyscalls.sh <stdin>:1220:2: warning: #warning syscall kcmp not implemented HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/data.o HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/dtc/dtc-parser.tab.o HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/util.o HOSTLD scripts/dtc/dtc HOSTCC scripts/genksyms/genksyms.o HOSTCC scripts/genksyms/lex.lex.o scripts/genksyms/lex.lex.c_shipped: In function 'yylex1': scripts/genksyms/lex.lex.c_shipped:904:1: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result [-Wunused-result] HOSTCC scripts/genksyms/parse.tab.o HOSTLD scripts/genksyms/genksyms CC scripts/mod/empty.o Assembler messages: Fatal error: -a64 unsupported make[2]: *** [scripts/mod/empty.o] Error 2 make[1]: *** [scripts/mod] Error 2 make: *** [scripts] Error 2 gt linux # equery l binutils * Searching for binutils ... [IP-] [ ] sys-devel/binutils-2.23.51.0.5:0 gt linux # the same with 4.7.2
gt linux # . /etc/profile gt linux # env-update >>> Regenerating /etc/ld.so.cache... gt linux # make clean CLEAN . CLEAN .tmp_versions gt linux # make -j32 CHK include/linux/version.h HOSTCC scripts/basic/fixdep CHK include/generated/utsrelease.h HOSTCC scripts/kallsyms HOSTCC scripts/conmakehash HOSTCC scripts/bin2c HOSTCC scripts/genksyms/genksyms.o HOSTCC scripts/genksyms/lex.lex.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/data.o HOSTCC scripts/genksyms/parse.tab.o HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/mod/mk_elfconfig CC scripts/mod/empty.o HOSTCC scripts/dtc/dtc-parser.tab.o HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/util.o Assembler messages: Fatal error: -a64 unsupported make[2]: *** [scripts/mod/empty.o] Error 2 make[2]: *** Waiting for unfinished jobs.... CC kernel/bounds.s scripts/genksyms/lex.lex.c_shipped: In function 'yylex1': scripts/genksyms/lex.lex.c_shipped:904:1: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result [-Wunused-result] GEN include/generated/bounds.h CC arch/powerpc/kernel/asm-offsets.s make[1]: *** [scripts/mod] Error 2 make[1]: *** Waiting for unfinished jobs.... GEN include/generated/asm-offsets.h CALL scripts/checksyscalls.sh HOSTLD scripts/dtc/dtc HOSTLD scripts/genksyms/genksyms make: *** [scripts] Error 2 make: *** Waiting for unfinished jobs.... <stdin>:1220:2: warning: #warning syscall kcmp not implemented gt linux # equery l binutils * Searching for binutils ... [IP-] [ ] sys-devel/binutils-2.23:0 gt linux #
after adding "multislot multitarget" I've got binutils able to generate elf64. got the same error. gt linux # make CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh <stdin>:1220:2: warning: #warning syscall kcmp not implemented CHK include/generated/compile.h CC arch/powerpc/kernel/vdso.o cc1: warnings being treated as errors arch/powerpc/kernel/vdso.c:79: warning: alignment of 'vdso_data_store' is greater than maximum object file alignment. Using 32768 make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1 make: *** [arch/powerpc/kernel] Error 2 gt linux # binutils-config -l [1] powerpc-unknown-linux-gnu-2.22 [2] powerpc-unknown-linux-gnu-2.23 * gt linux #
bug have to be closed. as described here - http://www.gentoo.org/doc/en/handbook/handbook-ppc64.xml?style=printable&full=1 # cd /usr/src/linux Important: In case you are in 32-bit userland, you must edit the top level Makefile in /usr/src/linux and change the CROSS_COMPILE option to CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-. You must do this before you run make menuconfig or it may result in kernel compilation problems. # make menuconfig I've changed CROSS_COMPILE options. it was the reason why old kgcc4.1 was used to building the kernel. a little strange fact - I seen no gcc in gcc-config -l before I've merged binutils to new slot. After that I saw this picture http://tic-tac.ru/gcc.png gcc marked [4] appeared. afer unmerging old kgcc and reverting Makefile to original I've build kernel with 64k pages.
(In reply to comment #11) i discussed this with ranger recently. that information is out of date. ppc32 userlands with ppc64 kernels should: - unmerge kgcc64 - not screw with the kernel Makefile at all (CROSS_COMPILE/etc...) - have a gcc that was built in the last year and supports -m64: - test by running `gcc -E -dD - >/dev/null -m64 </dev/null` - use a semi-recent kernel - make sure to select the "build a 64bit kernel" option in your config recent gcc versions support -m64 even if you aren't using multilib and have a 32bit userland. it'll just support code generation which is all you need for the kernel. the latest kernel will automatically add -m64 as need be if you select the "build a 64bit kernel" option when it detects a 32bit userland (ARCH=ppc vs ARCH=ppc64).
i've dropped ppc keywords from the last few kgcc64 ebuilds: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=459672c64fb137d0888dde3c3f2e734deef501e3 it's been masked in the ppc profile for a while: profiles/arch/powerpc/package.mask:# Masking kgcc64 now that toolchain is biarch profiles/arch/powerpc/package.mask:sys-devel/kgcc64 the ppc64 docs do not mention cross-compile/etc.. anywhere: https://wiki.gentoo.org/wiki/Handbook:PPC64/Installation/Kernel i think this is all set now