This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug build/20621] glibc 2.27 fails to compile on x86_64 with "operand type mismatch" in fpu/e_expl.S


https://sourceware.org/bugzilla/show_bug.cgi?id=20621

--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 20 Sep 2016, michael.tremer at ipfire dot org wrote:

> Indeed that seems to be it. I removed it from my CFLAGS, but it is added by the
> build systems again.
> 
> If I compile the file manually without -DPIC the file compiles, but that line
> looks like this:
> 
> >  jae __expl
> 
> What can I do? I want to keep -fPIC of course.

glibc currently expects PIC code to be used in shared libraries, and 
static libraries to be non-PIC, so -fPIC should not be in CFLAGS.

There is a theoretical use for static PIEs, which I expect would need new 
versions of some crt*.o files whether or not the lib*_pic.a used to build 
shared libraries are also usable for linking into static PIEs.  I expect 
supporting those would involve a fair-sized patch series for glibc as well 
as changes for GCC and possibly binutils.  Even with such support it would 
not mean -fPIC could be passed in CFLAGS, simply that there would be 
options to build additional library variants that can be used in static 
PIEs if such variants are needed.

I don't see anything other than static PIEs that would have a use for 
building static library code as PIC.  Of course, if there are conditionals 
on one of PIC and SHARED that should actually be conditionals on the 
other, fixes for those can be considered on their own merits as cleanups.

So whatever your problem is, using -fPIC in CFLAGS is not the right 
solution.  Perhaps we should have a configure test that gives an error for 
such a misconfiguration (taking care not to break building with 
default-PIE compilers or with MIPS compilers not using the non-PIC ABI).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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