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

Richard Sandiford wrote:

one the changes I promised (threatened?) for 4.3 was to make -mno-shared
the default for MIPS GNU/Linux if gcc is configured to use a version of
binutils that supports -mno-shared.  See the link above for the rationale.

The patch below does this.  Regression tested on mips64-linux-gnu
(all three ABIs).  I also built a new cross sysroot with this patch,
and it was that sysroot I used for the gcc regression tests.  Everything
seemed to go well.  Applied to trunk.

If you find any fallout from this patch, please do let me know.


gcc/ * (HAVE_AS_NO_SHARED): New AC_DEFINE. Test for the -mno-shared assembler option on mips targets. * configure, Regenerate. * config/mips/linux.h (NO_SHARED_SPECS): New macro. (DRIVER_SELF_SPECS): Define to NO_SHARED_SPECS if non-empty. * config/mips/linux64.h (DRIVER_SELF_SPECS): Include NO_SHARED_SPECS.

I am all for the patch, I have been compiling all my non-shared code with this option ever since we fixed the linker to make it possible.

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.

David Daney

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