This is the mail archive of the
mailing list for the binutils project.
Re: [RFA] Add --with-libz-prefix option in config/zlib.m4
- From: Tristan Gingold <gingold at adacore dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Wed, 7 Jan 2015 17:00:59 +0100
- Subject: Re: [RFA] Add --with-libz-prefix option in config/zlib.m4
- Authentication-results: sourceware.org; auth=none
- References: <20150107144548 dot GX5432 at adacore dot com>
> On 07 Jan 2015, at 15:45, Joel Brobecker <email@example.com> wrote:
> This patch enhances config/zlib.m4 to introduce an extra option
> --with-libz-prefix which allows us to provide the location of
> the zlib library we want to use during the build.
I prefer the gcc way to provide external library:
--with-zlib -> system zlib used
--with-zlib=pathname -> zlib from pathname is used
I have never needed different include and lib paths, but
this is supported by gcc.
(Furthermore, I think that --with-zlib vs --with-libz-prefix is confusing).
If you want to build GCC but do not have the GMP library, the MPFR library and/or the MPC library installed in a standard location and do not have their sources present in the GCC source tree then you can explicitly specify the directory where they are installed (â--with-gmp=gmpinstalldirâ, â--with-mpfr=mpfrinstalldirâ, â--with-mpc=mpcinstalldirâ). The --with-gmp=gmpinstalldir option is shorthand for --with-gmp-lib=gmpinstalldir/lib and --with-gmp-include=gmpinstalldir/include. Likewise the --with-mpfr=mpfrinstalldir option is shorthand for --with-mpfr-lib=mpfrinstalldir/lib and --with-mpfr-include=mpfrinstalldir/include, also the --with-mpc=mpcinstalldir option is shorthand for --with-mpc-lib=mpcinstalldir/lib and --with-mpc-include=mpcinstalldir/include. If these shorthand assumptions are not correct, you can use the explicit include and lib options directly. You might also need to ensure the shared libraries can be found by the dynamic linker when building and using GCC, for example by setting the runtime shared library path variable (LD_LIBRARY_PATH on GNU/Linux and Solaris systems).
These flags are applicable to the host platform only. When building a cross compiler, they will not be used to configure target libraries.