This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] BZ#10375 fixes

On Tuesday, May 08, 2012 05:26:27 Allan McRae wrote:
> On 08/05/12 13:12, Roland McGrath wrote:
> >> On 08/05/12 12:47, Roland McGrath wrote:
> >>>> gcc: error: @libc_extra_cflags@: No such file or directory
> >>>> make[2]: *** [/home/arch/code/glibc-build/ifunc-defines.h] Error 1
> >>> 
> >>> Are you sure configure and config.status got re-run after applying
> >>> the patch?  This looks like exactly the failure mode I would expect
> >>> if were processed by a config.status that was made
> >>> before my configure changes.
> >> 
> >> I am sure.  I built in a freshly made directory after checking out
> >> your branch.
> > 
> > Odd.  I guess double-check that I didn't somehow manage to miss the
> > configure regeneration in my branch commit (e.g. touch
> > and let make re-run autoconf).  If that's not it, then you'll just
> > have to debug the configure procedure and see why it didn't put the
> > right thing into config.make.
> Missed configure regeneration appears to be the issue.  There is no
> occurrence of libc_extra_cflags in the configure file after your patch.
>  There is in

Indeed, "touch;make" and everything is fine ;)

I've tested on openSUSE 12.2 development with GCC 4.7 - which does not have -fstack-protector enabled by default. We use -fstack-protector in 
the CFLAGS by default instead, so I run in the issue that the glibc spec file has to remove these. 

Now I left the flags in - and got:

gcc   -nostdlib -nostartfiles -r -o /home/aj/build/glibc/testing/libc_pic.os \
 -Wl,-d -Wl,--whole-archive /home/aj/build/glibc/testing/libc_pic.a -o /home/aj/build/glibc/testing/libc_pic.os
gcc   -nostdlib -nostartfiles -r -o /home/aj/build/glibc/testing/elf/ '-Wl,-(' /home/aj/build/glibc/testing/elf/dl-allobjs.os 
/home/aj/build/glibc/testing/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/aj/build/glibc/testing/elf/librtld.mapT
/home/aj/build/glibc/testing/libc_pic.a(init-first.os):(.data+0x0): multiple definition of `__libc_multiple_libcs'
/home/aj/build/glibc/testing/elf/dl-allobjs.os:(.bss+0xe8): first defined here
/home/aj/build/glibc/testing/libc_pic.a(dl-addr.os): In function `_dl_addr_inside_object':
dl-addr.c:(.text+0x0): multiple definition of `_dl_addr_inside_object'
/home/aj/build/glibc/testing/elf/dl-allobjs.os:(.text+0x114a0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [/home/aj/build/glibc/testing/elf/] Error 1

configure line was:
config-extra-cflags = -fno-stack-protector
CFLAGS="-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector" /cvs/glibc/configure --prefix=/usr --enable-add-ons=nptl,libidn 
--disable-profile --enable-stackguard-randomization --enable-multi-arch --enable-kernel=2.6.32 --enable-bind-now

config.make has:

FLAGS = -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector

It works fine if I do not use the flags above.

The problem seems to be the order of the flags:
gcc ../sysdeps/x86_64/tlsdesc.c -c -std=gnu99 -fgnu89-inline -fno-stack-protector -D_FORTIFY_SOURCE=2 -O2 -Wall -Winline -Wwrite-strings -
fmerge-all-constants -fmessage-length=0 -fstack-protector -Wstrict-prototypes   -fPIC    -U_FORTIFY_SOURCE   -I../include -I/build/glibc/testing/elf -
I/build/glibc/testing -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -
I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -
I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -
I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -
I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-96 -
I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl  -I.. 
-I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED -DNOT_IN_libc=1 -DIS_IN_rtld=1     -o 
/build/glibc/testing/elf/tlsdesc.os -MD -MP -MF /build/glibc/testing/elf/tlsdesc.os.dt -MT /build/glibc/testing/elf/tlsdesc.os 

Roland, your patch works fine for me without those CFLAGS and I'm fine with continuing to remove the flags 
from CFLAGS for our spec file,

 Andreas Jaeger aj@{,} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]