Richard Biener changed bug 919819
What Removed Added
Status RESOLVED REOPENED
Resolution UPSTREAM ---

Comment # 6 on bug 919819 from
(In reply to Giacomo Comes from comment #5)
> (In reply to Richard Biener from comment #3)
> > Confirmed.  The issue is combining -pie -fPIE and -static.  On x86_64 you
> > instead get
> > 
> > > gcc -o ct  -fPIE -pie -static t.c
> > /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
> > /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbeginT.o: relocation R_X86_64_32
> > against `__TMC_END__' can not be used when making a shared object; recompile
> > with -fPIC
> > /usr/lib64/gcc/x86_64-suse-linux/4.8/crtbeginT.o: error adding symbols: Bad
> > value
> > collect2: error: ld returned 1 exit status
> > 
> > that's because there isn't a PIE static crtbegin.o.  On i?86 you are just
> > lucky.  Combining PIE and -static is simply not supported.
> 
> Tha fact that it is not supported is just fine. The problem is that
> configure hangs and do not complete on 32-bit. That's because ld does not
> terminate with an error but it hangs. You need to kill the ld process in
> order to let configure continue. 

Yes.  Note that with binutils 2.25 from Factory the test will succeed
(but the produced binary is non-sensical and cannot be executed - is the
test an execute or a link one?)

> > New linker from Factory seems to handle this fine (in some sense - it
> > produces
> > a shared object with no dependencies).
> > 
> > What is the configure test testing?
> 
> checking if gcc -std=gnu99 static flag -static works.
> The answer should be no, but on 32-bit it never gets there.

so where does it get -fPIE -pie from?

I think that
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=818d220a6fe3d0512a226188e9164245a02c9185
fixed the hang.

Sill you'd get a broken executable as result.

SLE12 is affected as well.  Might make sense to release a combined
update also picking all changes from the 2.14 branch that accumulated.


You are receiving this mail because: