This is the mail archive of the mailing list for the GCC 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: Make -mno-shared the default for MIPS GNU/Linux

David Daney <> writes:
> However at least once a month I get bitten by the problem of putting 
> code compiled with -mno-shared in a shared library and having it 
> immediately SIGSEGV.  I should probably be more careful.  At least for 
> the o32 ABI, supplying -fpic did not used to matter, I expect others to 
> have problems as well.

Is this when compiling your own sources, or when building a package
you've downloaded?  THe reason I tried building a sysroot with this
patch was to test how many of the packages assume that -fpic or -fPIC
was the default for the MIPS.  The only one seemed to be glibc, where
PIC in .S files was being assembled without -fPIC.  I patched glibc a
while ago and haven't seen any problems since.  Because using -fpic or
-fPIC for PIC is standard for other targets, most packages do it out of
the box.

As for silently linking broken libraries: I guess it would be easy to
warn if __gnu_local_gp were used in shared library links.  I'll add that
to my list of things to do.


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