Boost logo

Boost-Build :

Subject: Re: [Boost-build] Problem with the Sun toolset and C compiles
From: Vladimir Prus (ghost_at_[hidden])
Date: 2013-12-29 08:11:38

On 29.12.2013 10:45, Edward Diener wrote:
> The problem I have uncovered is if the Sun toolset is being used and one is compiling C, as opposed to C++, files with it. In this case the
> toolset correctly invokes the Sun compiler using 'cc' rather than 'CC'. Unfortunately when it invokes the 'cc' compiler it still passes the
> -KPIC option to the compiler and this produces an error from the compiler of:
> cc: error: unrecognized command line option ˜-KPIC™
> and the compilation fails.
> Could this please be corrected in the Boost Build toolset for this compiler so that invoking the C compiler does not pass this option ? If
> necessary I will be glad to create a Trac item for this but I wanted to bring it to the attention of Boost Build here.


That does not sound right. If you don't pass this option when compiling C sources, then it will likely cause C sources to be not
compiled as PIC code when building shared libraries, and that's a bad thing. It seems strange to me that this option is not accepted
by a C compiler. Can you investigate why is so, and how do I make C compiler generate PIC on Sun?


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at