This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Unable to disable shared-libraries
- From: Ajay Garg <ajaygargnsit at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 12 Jun 2018 17:46:38 +0530
- Subject: Re: Unable to disable shared-libraries
- References: <CAHP4M8XWGprwuCfwefkPejrS9og0rwn1j_c_DQ8y=5K4ihroCg@mail.gmail.com> <CAH6eHdQvXekT5FecNKDc-iZnAAy_FDZ71L5TqsA+NCWP0u5Gfw@mail.gmail.com>
Oh, sorry for that (and thanks for the quick reply ..).
Just a quick-question, is there a gcc option that can disable
compilation of *any* shared-libraries at gcc's level?
Thanks and Regards,
Ajay
On Tue, Jun 12, 2018 at 5:40 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 12 June 2018 at 12:23, Ajay Garg wrote:
>> Hi All.
>>
>> I am wanting to compile leptonica
>> (https://github.com/DanBloomberg/leptonica.git, branch => v1.71)
>> completely in static mode.
>>
>>
>> I have done the following :
>>
>> ############################################################################
>> ./configure --prefix=/usr --enable-shared=no --enable-static=yes
>>
>> make SHARED=no STATIC=yes CFLAGS='-g -O2 -nostartfiles -nodefaultlibs
>> -nostdlib -static' CXXFLAGS='-nostartfiles -nodefaultlibs -nostdlib
>> -static' CPPFLAGS='-nostartfiles -nodefaultlibs -nostdlib -static'
>> LIBS=' /newlib/newlib/libc.a'
>> ############################################################################
>>
>>
>> But I still manage to land on the following :
>>
>> ############################################################################
>> *** Warning: Linking the shared library liblept.la against the
>> *** static library /newlib/newlib/libc.a is not portable!
>> ############################################################################
>>
>>
>> Am I disabling the shared-flags correctly in gcc (doesn't seem so currently)?
>
> Your question doesn't seem to be about GCC. You're passing options to
> a configure script, and setting variables that control a makefile, not
> passing any options to GCC directly.