Hi Bruno,

> On 19 Jun 2022, at 09:40, Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
> 
>> On 19 Jun 2022, at 01:32, Bruno Haible <br...@clisp.org> wrote:

>>> - so, please could we follow the pattern for GMP et. al. where the library
>>> can be provided with —with-intl= pointing to an installation
>>> , or be built in-tree by symlinking an approved version into the GCC tree.

>> 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.

So, indeed, part of this is quite straight forward - we can amend the 
Makefile.def
to specify that GCC should use gettext-runtime (it will be used if the 
directory is
present, otherwise there will be no intl support).

The tricky part is that we need to use the runtime ‘uninstalled’, and here is 
where
intl is helpful - it provides a ‘config.intl’ that can be sourced via 
gettext-sister.m4
to provide the neccessary configure input to directories that want to use intl.

I have hacked a change to gettext-sister.m4 that fishes the same information out
of gettext-runtime/Makefile (as configured in $build) - obviously this is going 
to be
fragile w.r.t different versions of gettext-runtime (so I am not suggesting 
this is a
viable patch) - simply something to illustrate what needs to be figured out.

So - the changes are in Makefile.def and config/gettext-sister.m4 (the patch 
includes
the regenerated files for convenience of use).

I tried this with gettext-0.21 on macOS 10.15 and, AFAICT, it DTRT - but needs 
work
to resolve the main point above.

This has been tried with / without deleting intl;  from the GCC perspective it 
works the
same both ways, except that there’s a redundant build of intl when 
gettext-runtime is
present (but it does mean that the other packages - GDB et. al, are not 
changed).

I’d be interested in your ideas for how to solve the ‘uninstalled’ use.

Iain

P.S. I am slighty surprised that configuring with —disable-java does not appear 
to stop
the on-screen popup appearing that tells me I need to install Java to use this 
… that
would be an irritation when using this on a headless box.

Attachment: 0001-config-Quick-hack-to-try-using-gettext-runtime-in-pl.patch
Description: Binary data

Reply via email to