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: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- To: Ajay Garg <ajaygargnsit at gmail dot com>, 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 20:29:54 +0800
- Subject: Re: Unable to disable shared-libraries
- References: <CAHP4M8XWGprwuCfwefkPejrS9og0rwn1j_c_DQ8y=5K4ihroCg@mail.gmail.com> <CAH6eHdQvXekT5FecNKDc-iZnAAy_FDZ71L5TqsA+NCWP0u5Gfw@mail.gmail.com> <CAHP4M8W+JovG5G2SFjGZ3DP=d=tXCQuecv_00L+kAuX6PRXF7g@mail.gmail.com>
On 2018-06-12 17:46 +0530, Ajay Garg wrote:
> 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?
You can write a shell script wrapping GCC to do that. But I don't think it
would be useful as the building process won't continue because of missing
libraries.
leptonica's CMake building system seems to use "cmake -DSTATIC=yes". And its
Makefile (src/makefile.static) doesn't produce shared libraries by default
(DON'T -DSHARED=no! just `make -f makefile.static`. It actually just tests
if SHARED is defined and doesn't check the value). For autoconf building
system (configure script) --disable-shared should work.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University