+++ This bug was initially created as a clone of Bug #85450 +++ The problem does not depend on the gcc version and is not a gcc bug. It also appears with gcc-3.4.5-r1 and glibc-2.3.5 on my system. The setjmp.S file (among others) contains a variable or label named __i686, which is #define'd to be 1 if gcc compiles for i686 and up (-march=pentium2 etc.). The subsequent patch undefines __i686 for assembler files and thus solves the problem. It should not harm on any other platform. --- Makeconfig~ Wed Feb 16 11:50:19 2005 +++ Makeconfig Sun Nov 6 18:39:08 2005 @@ -364,7 +364,7 @@ # directives the preprocessor produces. If you have troubling compiling # assembly code, try using -P here to suppress these directives. ifndef asm-CPPFLAGS -asm-CPPFLAGS = +asm-CPPFLAGS = -U__i686 endif # ELF always supports init/fini sections Original bug description: I've applied 'fixes' for similar gcc-4 bugs but the error doesn't even change. this occurred with fresh stage and a gcc-3.3 box, both p3's. the jan.18 build idetical ebuilds for p3s on p4 without error and can build nptlonly or nptl for p4 and prescott. make[2]: Entering directory `/var/tmp/portage/glibc-2.3.4.20050125-r1/work/glibc-2.3.4/setjmp' i686-pc-linux-gnu-gcc ../sysdeps/i386/elf/setjmp.S -c -I../include -I. -I/var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl/setjmp -I.. -I../libio -I../nptl -I/var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/i386/i686 -I../nptl/sysdeps/i386 -I../libidn/sysdeps/unix -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include -isystem /usr/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DASSEMBLER -DGAS_SYNTAX -Wa,--noexecstack -o /var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl/setjmp/setjmp.o -MD -MP -MF /var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl/setjmp/setjmp.o.dt -MT /var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl/setjmp/setjmp.o ../sysdeps/i386/elf/setjmp.S: Assembler messages: ../sysdeps/i386/elf/setjmp.S:63: Error: junk at end of line, first unrecognized character is `1' ../sysdeps/i386/elf/setjmp.S:64: Error: junk at end of line, first unrecognized character is `1' ../sysdeps/i386/elf/setjmp.S:65: Error: junk at end of line, first unrecognized character is `1' ../sysdeps/i386/elf/setjmp.S:66: Error: unrecognized symbol type "" ../sysdeps/i386/elf/setjmp.S:66: Error: junk at end of line, first unrecognized character is `1' ../sysdeps/i386/elf/setjmp.S:67: Error: junk at end of line, first unrecognized character is `1' ../sysdeps/i386/elf/setjmp.S:70: Error: expected comma after name `' in .size directive make[2]: *** [/var/tmp/portage/glibc-2.3.4.20050125-r1/work/build-default-i686-pc-linux-gnu-nptl/setjmp/setjmp.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20050125-r1/work/glibc-2.3.4/setjmp' make[1]: *** [setjmp/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20050125-r1/work/glibc-2.3.4' make: *** [all] Error 2
you forgot to post `emerge info`
Created attachment 85386 [details] Output of emerge --info As you might see from the versions of the packages, this box is largely unfinished and yet to be set up completely. It is in fact a dual P-3 machine.
the question is, why doesnt this bug show up for a lot more people ...
it's because .S files are not compiled with optimization flags (like -march=i686) so why is yours being optimized ? post the output of `emerge -v --info` please
I have compiled gcc --with-arch=pentium3, so pentium3 is its default architecture and __i686 is always set, also when compiling .S files. I suppose, most people don't compile glibc with processor specific optimizations.
> I suppose, most people don't compile glibc with processor specific > optimizations. no ... the glibc build system ignores optimizations for .S files since they dont really make any sense
Created attachment 85500 [details, diff] 1130_all_glibc-2.4-undefine-__i686.patch try this instead ... seems to work for me
patch added to 2.4-r2
*** Bug 213077 has been marked as a duplicate of this bug. ***
*** Bug 85450 has been marked as a duplicate of this bug. ***
*** Bug 234381 has been marked as a duplicate of this bug. ***