gcc-3.3 related build failure
Greg Schafer
gschafer@zip.com.au
Thu May 15 13:31:00 GMT 2003
Hi
I'm using the released glibc-2.3.2 tarball so apologies in advance for not
(yet) trying with the CVS mainline. Using gcc-3.3 release and latest HJL
binutils.
Build failure is due to assembler choking and seems to be triggered by
-march=i686 and is related to gcc defining "__i686" as a cpp macro. What I
don't understand is why I haven't seen this with gcc-3.2.x
The snippet of fail log is attached.
Almost identical problem is documented here:-
http://gcc.gnu.org/ml/gcc/2003-01/msg00396.html
And the patch that fixes it for me is here:-
http://sources.redhat.com/ml/bug-glibc/2003-01/msg00016.html
It does seem like a glibc bug on the face of it, so it would be a good for
someone knowledgeable to take a look.
There are 2 assembly files attached. The i586 one works, The i686 does not.
Thanks
Greg
-------------- next part --------------
gcc -B/stage1/bin/ ../sysdeps/unix/sysv/linux/sigprocmask.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -pipe -fPIC -I../include -I. -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal -I.. -I../libio -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5 -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -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../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 /stage1/lib/gcc-lib/i686-pc-linux-gnu/3.3/include -isystem /stage1/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/sigprocmask.os
(echo '#include <sysdep.h>'; \
echo 'PSEUDO (__kill, kill, 2)'; \
echo ' ret'; \
echo 'PSEUDO_END(__kill)'; \
echo 'libc_hidden_def (__kill)'; \
echo 'weak_alias (__kill, kill)'; \
echo 'libc_hidden_weak (kill)'; \
) | gcc -B/stage1/bin/ -c -I../include -I. -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal -I.. -I../libio -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5 -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -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../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 /stage1/lib/gcc-lib/i686-pc-linux-gnu/3.3/include -isystem /stage1/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -DASSEMBLER -DGAS_SYNTAX -x assembler-with-cpp -o /mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/kill.os -
<stdin>: Assembler messages:
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: unrecognized symbol type ""
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: expected comma after name `' in .size directive
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: junk `.get_pc_thunk.bx' after expression
make[2]: *** [/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/kill.os] Error 1
make[2]: Leaving directory `/mnt/hdb6/home/gws/scratch/glibc-2.3.2/signal'
make[1]: *** [signal/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/hdb6/home/gws/scratch/glibc-2.3.2'
make: *** [all] Error 2
-------------- next part --------------
# 1 "fred1.S"
# 1 "<built-in>"
# 1 "<command line>"
# 9 "<command line>"
# 1 "../include/libc-symbols.h" 1
# 56 "../include/libc-symbols.h"
# 1 "/mnt/hdb6/home/gws/scratch/glibc-build-ch5/config.h" 1
# 57 "../include/libc-symbols.h" 2
# 10 "<command line>" 2
# 1 "fred1.S"
# 1 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 1
# 24 "../sysdeps/unix/sysv/linux/i386/sysdep.h"
# 1 "../sysdeps/unix/i386/sysdep.h" 1
# 19 "../sysdeps/unix/i386/sysdep.h"
# 1 "../sysdeps/unix/sysdep.h" 1
# 19 "../sysdeps/unix/sysdep.h"
# 1 "../sysdeps/generic/sysdep.h" 1
# 20 "../sysdeps/unix/sysdep.h" 2
# 1 "../sysdeps/unix/sysv/linux/sys/syscall.h" 1
# 25 "../sysdeps/unix/sysv/linux/sys/syscall.h"
# 1 "/stage1/include/asm/unistd.h" 1 3 4
# 26 "../sysdeps/unix/sysv/linux/sys/syscall.h" 2
# 22 "../sysdeps/unix/sysdep.h" 2
# 20 "../sysdeps/unix/i386/sysdep.h" 2
# 1 "../sysdeps/i386/sysdep.h" 1
# 20 "../sysdeps/i386/sysdep.h"
# 1 "../sysdeps/generic/sysdep.h" 1
# 21 "../sysdeps/i386/sysdep.h" 2
# 21 "../sysdeps/unix/i386/sysdep.h" 2
# 25 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../sysdeps/generic/bp-sym.h" 1
# 26 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../sysdeps/i386/bp-asm.h" 1
# 27 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../linuxthreads/sysdeps/unix/sysv/linux/i386/dl-sysdep.h" 1
# 29 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../include/tls.h" 1
# 1 "../linuxthreads/sysdeps/i386/tls.h" 1
# 24 "../linuxthreads/sysdeps/i386/tls.h"
# 1 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 1
# 28 "../linuxthreads/sysdeps/i386/i686/pt-machine.h"
# 1 "../sysdeps/unix/sysv/linux/kernel-features.h" 1
# 29 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 2
# 73 "../linuxthreads/sysdeps/i386/i686/pt-machine.h"
# 1 "../linuxthreads/sysdeps/i386/useldt.h" 1
# 74 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 2
# 25 "../linuxthreads/sysdeps/i386/tls.h" 2
# 51 "../linuxthreads/sysdeps/i386/tls.h"
# 1 "/mnt/hdb6/home/gws/scratch/glibc-build-ch5/tcb-offsets.h" 1
# 52 "../linuxthreads/sysdeps/i386/tls.h" 2
# 4 "../include/tls.h" 2
# 30 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 2 "fred1.S" 2
.text; 1: .stabs "",100,0,0,1b; 1: .stabs "__kill",100,0,0,1b; .globl __kill; .type __kill,@function; .align 1<<4; .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; .stabs "__kill:F(0,1)",36,0,0,__kill; __kill: movl %ebx, %edx; movl 8(%esp), %ecx; movl 8 -4(%esp), %ebx; movl $37, %eax; int $0x80 ; movl %edx, %ebx; cmpl $-4095, %eax; jae 0f; .Lpseudo_end:
ret
0:pushl %ebx; .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits; .globl __i686.get_pc_thunk.bx; .hidden __i686.get_pc_thunk.bx; .type __i686.get_pc_thunk.bx,@function; __i686.get_pc_thunk.bx: movl (%esp), %ebx; ret; .size __i686.get_pc_thunk.bx, . - __i686.get_pc_thunk.bx; .previous; call __i686.get_pc_thunk.bx; addl $_GLOBAL_OFFSET_TABLE_, %ebx; xorl %edx, %edx; subl %eax, %edx; pushl %edx; ; call __errno_location@PLT; ; popl %ecx; popl %ebx; movl %ecx, (%eax); orl $-1, %eax; jmp .Lpseudo_end; .size __kill,.-__kill; 1: .stabs "",36,0,0,1b-__kill;
.globl __GI___kill ; .set __GI___kill,__kill
.weak kill ; kill = __kill
.globl __GI_kill ; .set __GI_kill,kill
-------------- next part --------------
# 1 "fred1.S"
# 1 "<built-in>"
# 1 "<command line>"
# 9 "<command line>"
# 1 "../include/libc-symbols.h" 1
# 56 "../include/libc-symbols.h"
# 1 "/mnt/hdb6/home/gws/scratch/glibc-build-ch5/config.h" 1
# 57 "../include/libc-symbols.h" 2
# 10 "<command line>" 2
# 1 "fred1.S"
# 1 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 1
# 24 "../sysdeps/unix/sysv/linux/i386/sysdep.h"
# 1 "../sysdeps/unix/i386/sysdep.h" 1
# 19 "../sysdeps/unix/i386/sysdep.h"
# 1 "../sysdeps/unix/sysdep.h" 1
# 19 "../sysdeps/unix/sysdep.h"
# 1 "../sysdeps/generic/sysdep.h" 1
# 20 "../sysdeps/unix/sysdep.h" 2
# 1 "../sysdeps/unix/sysv/linux/sys/syscall.h" 1
# 25 "../sysdeps/unix/sysv/linux/sys/syscall.h"
# 1 "/stage1/include/asm/unistd.h" 1 3 4
# 26 "../sysdeps/unix/sysv/linux/sys/syscall.h" 2
# 22 "../sysdeps/unix/sysdep.h" 2
# 20 "../sysdeps/unix/i386/sysdep.h" 2
# 1 "../sysdeps/i386/sysdep.h" 1
# 20 "../sysdeps/i386/sysdep.h"
# 1 "../sysdeps/generic/sysdep.h" 1
# 21 "../sysdeps/i386/sysdep.h" 2
# 21 "../sysdeps/unix/i386/sysdep.h" 2
# 25 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../sysdeps/generic/bp-sym.h" 1
# 26 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../sysdeps/i386/bp-asm.h" 1
# 27 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../linuxthreads/sysdeps/unix/sysv/linux/i386/dl-sysdep.h" 1
# 29 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 1 "../include/tls.h" 1
# 1 "../linuxthreads/sysdeps/i386/tls.h" 1
# 24 "../linuxthreads/sysdeps/i386/tls.h"
# 1 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 1
# 28 "../linuxthreads/sysdeps/i386/i686/pt-machine.h"
# 1 "../sysdeps/unix/sysv/linux/kernel-features.h" 1
# 29 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 2
# 73 "../linuxthreads/sysdeps/i386/i686/pt-machine.h"
# 1 "../linuxthreads/sysdeps/i386/useldt.h" 1
# 74 "../linuxthreads/sysdeps/i386/i686/pt-machine.h" 2
# 25 "../linuxthreads/sysdeps/i386/tls.h" 2
# 51 "../linuxthreads/sysdeps/i386/tls.h"
# 1 "/mnt/hdb6/home/gws/scratch/glibc-build-ch5/tcb-offsets.h" 1
# 52 "../linuxthreads/sysdeps/i386/tls.h" 2
# 4 "../include/tls.h" 2
# 30 "../sysdeps/unix/sysv/linux/i386/sysdep.h" 2
# 2 "fred1.S" 2
.text; 1: .stabs "",100,0,0,1b; 1: .stabs "__kill",100,0,0,1b; .globl __kill; .type __kill,@function; .align 1<<4; .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; .stabs "__kill:F(0,1)",36,0,0,__kill; __kill: movl %ebx, %edx; movl 8(%esp), %ecx; movl 8 -4(%esp), %ebx; movl $37, %eax; int $0x80 ; movl %edx, %ebx; cmpl $-4095, %eax; jae 0f; .Lpseudo_end:
ret
0:pushl %ebx; .section .gnu.linkonce.t. 1 .get_pc_thunk.bx,"ax",@progbits; .globl 1 .get_pc_thunk.bx; .hidden 1 .get_pc_thunk.bx; .type 1 .get_pc_thunk.bx,@function; 1 .get_pc_thunk.bx: movl (%esp), %ebx; ret; .size 1 .get_pc_thunk.bx, . - 1 .get_pc_thunk.bx; .previous; call 1 .get_pc_thunk.bx; addl $_GLOBAL_OFFSET_TABLE_, %ebx; xorl %edx, %edx; subl %eax, %edx; pushl %edx; ; call __errno_location@PLT; ; popl %ecx; popl %ebx; movl %ecx, (%eax); orl $-1, %eax; jmp .Lpseudo_end; .size __kill,.-__kill; 1: .stabs "",36,0,0,1b-__kill;
.globl __GI___kill ; .set __GI___kill,__kill
.weak kill ; kill = __kill
.globl __GI_kill ; .set __GI_kill,kill
More information about the Libc-alpha
mailing list