manpagez: man pages & more
info gcc
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.39 Solaris 2 Options

These ‘-m’ options are supported on Solaris 2:


-mimpure-text’, used in addition to ‘-shared’, tells the compiler to not pass ‘-z text’ to the linker when linking a shared object. Using this option, you can link position-dependent code into a shared object.

-mimpure-text’ suppresses the “relocations remain against allocatable but non-writable sections” linker error message. However, the necessary relocations trigger copy-on-write, and the shared object is not actually shared across processes. Instead of using ‘-mimpure-text’, you should compile all source code with ‘-fpic’ or ‘-fPIC’.

These switches are supported in addition to the above on Solaris 2:


Add support for multithreading using the POSIX threads library. This option sets flags for both the preprocessor and linker. This option does not affect the thread safety of object code produced by the compiler or that of libraries supplied with it.


This is a synonym for ‘-pthreads’.

This document was generated on October 19, 2013 using texi2html 5.0.