Hi Bruno,
> On 19 Jun 2022, at 01:32, Bruno Haible <[email protected]> wrote:
>
> Iain Sandoe wrote:
>> As a maintainer for GCC on a non-glibc system, I would:
>> (b) not want to [force] add a shared lib dependency for my downstream.
>
> In order to avoid shared libs, the user merely has to pass the option
> '--disable-shared' to GNU gettext's configure.
Well, we try to make things easy for end-users, so actually the objective would
be that (for those who are prepared to download a pre-built binary) that they do
not have to find and build _any_ other libs.
“Distributions” might choose to go the shared library route - on the basis that
they have already presumably automated the installation of dependencies
- so it’s just that the user has to wait a little longer for the install...
For people intending to build from source, we can try to automate with scripts
and pre-fetching of prerequisites etc. .. OTOH GCC is complex enough in its
own right, it’s better to keep things as simple as possible.
>
>> - so, please could we follow the pattern for GMP et. al. where the library
>> can be provided with —with-intl= pointing to an installation
>
> That convention is already built-in in the gettext.m4 macro; the option is
> called --with-libintl-prefix there.
>
>> , or be built in-tree by symlinking an approved version into the GCC tree.
>
> If you are referring to the sentence found in the GCC documentation for
> ISL, MPFR, etc.
> "If an isl source distribution is found in a subdirectory of your GCC
> sources named isl, it will be built together with GCC."
yes, exactly - that is usually how I build GCC - in addition to the
simplification of distributing a built compiler, it also has the advantage that
the same deps that one tested with are fixed into the binary.
> I believe that this can be achieved easily by adding a few lines to the
> Makefile.def, such as:
>
> host_modules= { module= gettext-runtime; no_install=true;
> extra_configure_flags='--disable-shared';
> lib_path=intl/.libs; };
>
> The symlink 'gettext-runtime' will need to point to the 'gettext-runtime'
> *subdirectory* of an unpacked GNU gettext tarball.
Thanks, that’s very helpful information - it could be something to trial
relatively
easily.
** NOTE: this is not a GCC-only decision, intl is used by a number of other
pieces
(GDB, GDB-server, binutils etc. etc) These projects share the top-level build
infrastructure — [see Makefile.def and grep intl].
I suppose one could try s/intl/gettext-runtime/ and then rebuild the top-level
makefiles..
thanks,
Iain