https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64237

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r218397. 
HJ, it looks like this is now the intended behavior.

Original error:
/home/trippels/gcc_test/usr/local/bin/gcc -pie -Wl,-O1 -nostdlib -nostartfiles
-o /home/trippels/glibc_build/nscd/nscd   -Wl,-z,now -Wl,-z,combreloc
-Wl,-z,relro -Wl,--hash-s
tyle=both /home/trippels/glibc_build/csu/Scrt1.o
/home/trippels/glibc_build/csu/crti.o
`/home/trippels/gcc_test/usr/local/bin/gcc  --print-file-name=crtbeginS.o`
/home/trippe
ls/glibc_build/nscd/nscd.o /home/trippels/glibc_build/nscd/connections.o
/home/trippels/glibc_build/nscd/pwdcache.o
/home/trippels/glibc_build/nscd/getpwnam_r.o /home/trippel
s/glibc_build/nscd/getpwuid_r.o /home/trippels/glibc_build/nscd/grpcache.o
/home/trippels/glibc_build/nscd/getgrnam_r.o
/home/trippels/glibc_build/nscd/getgrgid_r.o /home/tri
ppels/glibc_build/nscd/hstcache.o
/home/trippels/glibc_build/nscd/gethstbyad_r.o
/home/trippels/glibc_build/nscd/gethstbynm3_r.o
/home/trippels/glibc_build/nscd/getsrvbynm_r.
o /home/trippels/glibc_build/nscd/getsrvbypt_r.o
/home/trippels/glibc_build/nscd/servicescache.o
/home/trippels/glibc_build/nscd/dbg_log.o /home/trippels/glibc_build/nscd/nsc
d_conf.o /home/trippels/glibc_build/nscd/nscd_stat.o
/home/trippels/glibc_build/nscd/cache.o /home/trippels/glibc_build/nscd/mem.o
/home/trippels/glibc_build/nscd/nscd_setup_
thread.o /home/trippels/glibc_build/nscd/xmalloc.o
/home/trippels/glibc_build/nscd/xstrdup.o
/home/trippels/glibc_build/nscd/aicache.o
/home/trippels/glibc_build/nscd/initgrc
ache.o /home/trippels/glibc_build/nscd/gai.o
/home/trippels/glibc_build/nscd/res_hconf.o
/home/trippels/glibc_build/nscd/netgroupcache.o
/home/trippels/glibc_build/nptl/libpt
hread_nonshared.a /home/trippels/glibc_build/nptl/libpthread.so
/home/trippels/glibc_build/nis/libnsl.so 
-Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2 -Wl,-rpath-link=/hom
e/trippels/glibc_build:/home/trippels/glibc_build/math:/home/trippels/glibc_build/elf:/home/trippels/glibc_build/dlfcn:/home/trippels/glibc_build/nss:/home/trippels/glibc_bui
ld/nis:/home/trippels/glibc_build/rt:/home/trippels/glibc_build/resolv:/home/trippels/glibc_build/crypt:/home/trippels/glibc_build/nptl
/home/trippels/glibc_build/libc.so.6 /
home/trippels/glibc_build/libc_nonshared.a -Wl,--as-needed
/home/trippels/glibc_build/elf/ld.so -Wl,--no-as-needed -lgcc 
`/home/trippels/gcc_test/usr/local/bin/gcc  --print-
file-name=crtendS.o` /home/trippels/glibc_build/csu/crtn.o
/home/trippels/bin/ld: /home/trippels/glibc_build/nscd/nscd.o: relocation
R_X86_64_PC32 against undefined symbol `program_invocation_name@@GLIBC_2.2.5'
can not be used when m
aking a shared object; recompile with -fPIC
/home/trippels/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [/home/trippels/glibc_build/nscd/nscd] Error 1
make[2]: Leaving directory `/home/trippels/glibc/nscd'
make[1]: *** [nscd/others] Error 2
make[1]: Leaving directory `/home/trippels/glibc'

 % ld -v
GNU ld (GNU Binutils) 2.25.51.20141204

 % CC=~/gcc_test/usr/local/bin/gcc CXX=~/gcc_test/usr/local/bin/g++
CFLAGS="-march=native -O2 -pipe" CXXFLAGS="-march=native -O2 -pipe"
../glibc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib
--with-headers=/usr/include --enable-add-ons --with-tls --with-__thread
--enable-bind-now --without-gd --without-cvs --disable-profile
--disable-multi-arch

Reply via email to