public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* remove intl/ directory?
@ 2022-06-18 17:01 Bruno Haible
  2022-06-18 17:42 ` Iain Sandoe
  2022-06-20 19:45 ` Eric Gallager
  0 siblings, 2 replies; 16+ messages in thread
From: Bruno Haible @ 2022-06-18 17:01 UTC (permalink / raw)
  To: gcc

Hi,

As the long-term GNU gettext maintainer, I would suggest to remove the intl/
directory from the GCC distribution.

The effect for the users would be:
  * On systems without glibc, users who want an internationalized GCC
    installation would have to install GNU gettext first. Then the GCC
    binaries would be linked with the shared library libintl.so
    (unless gettext was built with --disable-shared); they would no longer
    contain the libintl code in 'cc1', 'cc1plus', etc.
  * On systems with glibc, no change.

The effect for the GCC maintainers would be:
  * Easier to stay up-to-date with upstream libintl.
  * Less maintenance work with *.m4 files such as
      codeset.m4
      glibc21.m4
      intdiv0.m4
      inttypes_h.m4
      inttypes.m4
      inttypes-pri.m4
      lcmessage.m4
      stdint_h.m4
      uintmax_t.m4
      ulonglong.m4
  * Reduced risk of a CVE that would impact GCC binaries.

Rationale:
  * This intl/ code is from 2003; of course several bugs have been
    fixed in it over the last 19 years.
  * At that time GNU packages were still favouring static libraries.
    GNU libtool became widely reliable only about in 2005.
  * Since then, distros have been favouring shared libraries over
    static libraries, in order to be able to fix CVEs without
    rebuilding many dependent binaries.
  * For this reason, GNU gettext removed the support for this way
    of packaging libintl in version 0.20 (May 2019). The NEWS entry
    said:
    - The --intl option of the gettextize program (deprecated since 2010) is
      no longer available. Instead of including the intl sources in your
      package, we suggest making the libintl library an optional prerequisite
      of your package. This will simplify the build system of your package.
    - Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone
      as well.

This point came up while discussing with Eric Gallager, who is working on
the GCC configury.

I don't volunteer to implement this suggestion, but I can give advice where
needed.

Bruno




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-18 17:01 remove intl/ directory? Bruno Haible
@ 2022-06-18 17:42 ` Iain Sandoe
  2022-06-18 18:14   ` David Edelsohn
  2022-06-19  0:32   ` Bruno Haible
  2022-06-20 19:45 ` Eric Gallager
  1 sibling, 2 replies; 16+ messages in thread
From: Iain Sandoe @ 2022-06-18 17:42 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

Hi Bruno,

> On 18 Jun 2022, at 18:01, Bruno Haible <bruno@clisp.org> wrote:

> As the long-term GNU gettext maintainer, I would suggest to remove the intl/
> directory from the GCC distribution.
> 
> The effect for the users would be:
>  * On systems without glibc, users who want an internationalized GCC
>    installation would have to install GNU gettext first. Then the GCC
>    binaries would be linked with the shared library libintl.so
>    (unless gettext was built with --disable-shared); they would no longer
>    contain the libintl code in 'cc1', 'cc1plus', etc.

As a maintainer for GCC on a non-glibc system, I would:

 (a) welcome a more modern version of intl, wih the bug-fixes etc.
 (b) not want to [force] add a shared lib dependency for my downstream.

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

For such [non-glibs] systems where these libraries are not ’normally’
installed, it is still very much preferable to be able to statically link them
so that a compiler can be distributed with no deps other than those
provided by the OS (and we can test what we ship and ship what we test).

thanks,
Iain


>  * On systems with glibc, no change.
> 
> The effect for the GCC maintainers would be:
>  * Easier to stay up-to-date with upstream libintl.
>  * Less maintenance work with *.m4 files such as
>      codeset.m4
>      glibc21.m4
>      intdiv0.m4
>      inttypes_h.m4
>      inttypes.m4
>      inttypes-pri.m4
>      lcmessage.m4
>      stdint_h.m4
>      uintmax_t.m4
>      ulonglong.m4
>  * Reduced risk of a CVE that would impact GCC binaries.
> 
> Rationale:
>  * This intl/ code is from 2003; of course several bugs have been
>    fixed in it over the last 19 years.
>  * At that time GNU packages were still favouring static libraries.
>    GNU libtool became widely reliable only about in 2005.
>  * Since then, distros have been favouring shared libraries over
>    static libraries, in order to be able to fix CVEs without
>    rebuilding many dependent binaries.
>  * For this reason, GNU gettext removed the support for this way
>    of packaging libintl in version 0.20 (May 2019). The NEWS entry
>    said:
>    - The --intl option of the gettextize program (deprecated since 2010) is
>      no longer available. Instead of including the intl sources in your
>      package, we suggest making the libintl library an optional prerequisite
>      of your package. This will simplify the build system of your package.
>    - Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone
>      as well.
> 
> This point came up while discussing with Eric Gallager, who is working on
> the GCC configury.
> 
> I don't volunteer to implement this suggestion, but I can give advice where
> needed.
> 
> Bruno
> 
> 
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-18 17:42 ` Iain Sandoe
@ 2022-06-18 18:14   ` David Edelsohn
  2022-06-19  0:53     ` Bruno Haible
  2022-06-19  0:32   ` Bruno Haible
  1 sibling, 1 reply; 16+ messages in thread
From: David Edelsohn @ 2022-06-18 18:14 UTC (permalink / raw)
  To: Iain Sandoe, Bruno Haible; +Cc: GCC Development

On Sat, Jun 18, 2022 at 1:44 PM Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi Bruno,
>
> > On 18 Jun 2022, at 18:01, Bruno Haible <bruno@clisp.org> wrote:
>
> > As the long-term GNU gettext maintainer, I would suggest to remove the intl/
> > directory from the GCC distribution.
> >
> > The effect for the users would be:
> >  * On systems without glibc, users who want an internationalized GCC
> >    installation would have to install GNU gettext first. Then the GCC
> >    binaries would be linked with the shared library libintl.so
> >    (unless gettext was built with --disable-shared); they would no longer
> >    contain the libintl code in 'cc1', 'cc1plus', etc.
>
> As a maintainer for GCC on a non-glibc system, I would:
>
>  (a) welcome a more modern version of intl, with the bug-fixes etc.
>  (b) not want to [force] add a shared lib dependency for my downstream.
>
> - 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.
>
> For such [non-glibs] systems where these libraries are not ’normally’
> installed, it is still very much preferable to be able to statically link them
> so that a compiler can be distributed with no deps other than those
> provided by the OS (and we can test what we ship and ship what we test).

As another maintainer for GCC of a non-GLIBC system, I echo Iain's request.

The broad list of systems supported by GCC requires effort, but is one
of its advantages. Making it more difficult to support GCC on
non-GLIBC systems will be detrimental to GCC.

Thanks, David

>
> thanks,
> Iain
>
>
> >  * On systems with glibc, no change.
> >
> > The effect for the GCC maintainers would be:
> >  * Easier to stay up-to-date with upstream libintl.
> >  * Less maintenance work with *.m4 files such as
> >      codeset.m4
> >      glibc21.m4
> >      intdiv0.m4
> >      inttypes_h.m4
> >      inttypes.m4
> >      inttypes-pri.m4
> >      lcmessage.m4
> >      stdint_h.m4
> >      uintmax_t.m4
> >      ulonglong.m4
> >  * Reduced risk of a CVE that would impact GCC binaries.
> >
> > Rationale:
> >  * This intl/ code is from 2003; of course several bugs have been
> >    fixed in it over the last 19 years.
> >  * At that time GNU packages were still favouring static libraries.
> >    GNU libtool became widely reliable only about in 2005.
> >  * Since then, distros have been favouring shared libraries over
> >    static libraries, in order to be able to fix CVEs without
> >    rebuilding many dependent binaries.
> >  * For this reason, GNU gettext removed the support for this way
> >    of packaging libintl in version 0.20 (May 2019). The NEWS entry
> >    said:
> >    - The --intl option of the gettextize program (deprecated since 2010) is
> >      no longer available. Instead of including the intl sources in your
> >      package, we suggest making the libintl library an optional prerequisite
> >      of your package. This will simplify the build system of your package.
> >    - Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone
> >      as well.
> >
> > This point came up while discussing with Eric Gallager, who is working on
> > the GCC configury.
> >
> > I don't volunteer to implement this suggestion, but I can give advice where
> > needed.
> >
> > Bruno
> >
> >
> >
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-18 17:42 ` Iain Sandoe
  2022-06-18 18:14   ` David Edelsohn
@ 2022-06-19  0:32   ` Bruno Haible
  2022-06-19  8:40     ` Iain Sandoe
  1 sibling, 1 reply; 16+ messages in thread
From: Bruno Haible @ 2022-06-19  0:32 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Development

Iain Sandoe wrote:
> As a maintainer for GCC on a non-glibc system, I would:
> 
>  (a) welcome a more modern version of intl, wih the bug-fixes etc.

That's why we make releases of GNU gettext. The newest release is 0.21.
Find below the list of improvements in libintl that will be relevant to GCC.

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

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

> For such [non-glibs] systems where these libraries are not ’normally’
> installed, it is still very much preferable to be able to statically link them
> so that a compiler can be distributed with no deps other than those
> provided by the OS (and we can test what we ship and ship what we test).

OK. If that's your preference, just pass the option '--disable-shared'
to the gettext-runtime/configure script (like shown above).

Bruno

==== Fixes in the libintl library for non-glibc systems, since 2003: ====

Version 0.20.2 - April 2020

* The interpretation of the language preferences on macOS has been improved,
  especially in the case where a system locale does not exist for the
  combination of the selected primary language and the selected territory.

* Fixed a multithread-safety bug on Cygwin and native Windows.

Version 0.20 - April 2019

* The interpretation of the language preferences on macOS has been fixed.

* Per-thread locales are now also supported on Solaris 11.4.

* The replacements for the printf()/fprintf()/... functions that are
  provided through <libintl.h> on native Windows and NetBSD are now POSIX
  compliant.  There is no conflict any more between these replacements
  and other possible replacements provided by gnulib or mingw.

Version 0.18.3 - July 2013

* On Mac OS X systems, the setlocale() function now properly
  invalidates loaded message catalogs when a locale has been set.

Version 0.18 - May 2010

* On MacOS X and Windows systems, <libintl.h> now extends setlocale() and
  newlocale() so that their determination of the default locale considers
  the choice the user has made in the system control panels.

* On MacOS X systems, the gettext()/dgettext()/... functions now respect the
  locale of the current thread, if a thread-specific locale has been set.
\f
Version 0.14.4 - April 2005

* Fix improved detection of the locale on MacOS X.
\f
Version 0.14.2 - January 2005

* Improved detection of the locale on MacOS X.
\f
Version 0.13 - November 2003

* On those few platforms (NetBSD and Woe32) for which the native
  printf()/fprintf()/... functions don't support POSIX/XSI format strings
  with positions, replacements are provided through <libintl.h>.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-18 18:14   ` David Edelsohn
@ 2022-06-19  0:53     ` Bruno Haible
  0 siblings, 0 replies; 16+ messages in thread
From: Bruno Haible @ 2022-06-19  0:53 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Iain Sandoe, GCC Development

David Edelsohn wrote:
> The broad list of systems supported by GCC requires effort, but is one
> of its advantages.

GNU gettext is supported on a wide list of systems as well. Before we make
a GNU gettext release, we test in on glibc systems, FreeBSD, NetBSD, OpenBSD,
macOS, AIX, Solaris, Cygwin, native Windows systems.

> Making it more difficult to support GCC on
> non-GLIBC systems will be detrimental to GCC.

You appear to be saying that using tested GNU gettext release tarballs will
make it "more difficult" for GCC than to continue to use an old code
from 2003, with occasional backports from upstream. Why?

Bruno




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-19  0:32   ` Bruno Haible
@ 2022-06-19  8:40     ` Iain Sandoe
  2022-06-19 20:15       ` Iain Sandoe
  0 siblings, 1 reply; 16+ messages in thread
From: Iain Sandoe @ 2022-06-19  8:40 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

Hi Bruno,

> On 19 Jun 2022, at 01:32, Bruno Haible <bruno@clisp.org> 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-19  8:40     ` Iain Sandoe
@ 2022-06-19 20:15       ` Iain Sandoe
  2022-06-21  2:05         ` Bruno Haible
  0 siblings, 1 reply; 16+ messages in thread
From: Iain Sandoe @ 2022-06-19 20:15 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

[-- Attachment #1: Type: text/plain, Size: 2583 bytes --]

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 <bruno@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 #2: 0001-config-Quick-hack-to-try-using-gettext-runtime-in-pl.patch --]
[-- Type: application/octet-stream, Size: 82613 bytes --]

From 93182e959af9a04a8e3cd75c82d9dd40a478023f Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Sun, 19 Jun 2022 20:54:40 +0100
Subject: [PATCH] config: Quick hack to try using gettext-runtime in place of
 intl.

To use this, symlink (or, I guessm untar) gettext and then link the
gettext-runtime dir into the top level of the GCC source tree.

Building the runtime and specifying the dependencies is not too
hard; the main issue to be solved is using the runtime 'uninstalled'.
Here, the intl/ version has a helpful 'config.intl' which summarises
the required config parameters - which we have to otherwise pull
somewhat painfully from the configured Makefile in the gettext-runtime
dir.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

ChangeLog:

	* Makefile.def: Build gettext-runtime if it is there.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Add gettext-runtime.

config/ChangeLog:

	* gettext-sister.m4: Fish the values out of gettext-runtime
	Makefile if there is a gettext-runtime build in the tree.

gcc/ChangeLog:

	* configure: Regenerate.

libcpp/ChangeLog:

	* configure: Regenerate.
---
 Makefile.def             |   12 +-
 Makefile.in              | 1362 +++++++++++++++++++++++++++++++++++++-
 config/gettext-sister.m4 |   33 +-
 configure                |    2 +-
 configure.ac             |    2 +-
 gcc/configure            |   23 +-
 libcpp/configure         |   19 +-
 7 files changed, 1405 insertions(+), 48 deletions(-)

diff --git a/Makefile.def b/Makefile.def
index 72d58549645..4aed2937736 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -70,6 +70,9 @@ host_modules= { module= isl; lib_path=.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@';
 		extra_make_flags='V=1';
 		no_install= true; };
+host_modules= { module= gettext-runtime; bootstrap=true; no_install=true;
+               extra_configure_flags='--disable-shared --disable-java --disable-csharp';
+               lib_path=intl/.libs; };
 host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
 		extra_configure_flags='--disable-shared';
 		no_install= true; };
@@ -343,7 +346,7 @@ dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
 dependencies = { module=all-build-libcpp; on=all-build-libiberty; };
 
 // Host modules specific to gcc.
-dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=configure-gettext-runtime; };
 dependencies = { module=configure-gcc; on=all-gmp; };
 dependencies = { module=configure-gcc; on=all-mpfr; };
 dependencies = { module=configure-gcc; on=all-mpc; };
@@ -357,6 +360,7 @@ dependencies = { module=configure-gcc; on=all-libelf; };
 dependencies = { module=configure-gcc; on=all-libiconv; };
 dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
 dependencies = { module=all-gcc; on=all-intl; };
+dependencies = { module=all-gcc; on=all-gettext-runtime; };
 dependencies = { module=all-gcc; on=all-mpfr; };
 dependencies = { module=all-gcc; on=all-mpc; };
 dependencies = { module=all-gcc; on=all-isl; };
@@ -385,10 +389,10 @@ dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; };
 dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
 
 dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
-dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=configure-libcpp; on=configure-gettext-runtime; };
 dependencies = { module=configure-libcpp; on=all-libiconv; };
 dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
-dependencies = { module=all-libcpp; on=all-intl; };
+dependencies = { module=all-libcpp; on=all-gettext-runtime; };
 dependencies = { module=all-libcpp; on=all-libiconv; };
 
 dependencies = { module=all-fixincludes; on=all-libiberty; };
@@ -411,10 +415,12 @@ dependencies = { module=all-gotools; on=all-target-libgo; };
 dependencies = { module=all-utils; on=all-libiberty; };
 
 dependencies = { module=configure-intl; on=all-libiconv; };
+dependencies = { module=configure-gettext-runtime; on=all-libiconv; };
 dependencies = { module=configure-mpfr; on=all-gmp; };
 dependencies = { module=configure-mpc; on=all-mpfr; };
 dependencies = { module=configure-isl; on=all-gmp; };
 dependencies = { module=all-intl; on=all-libiconv; };
+dependencies = { module=all-gettext-runtime; on=all-libiconv; };
 
 // Host modules specific to gdb.
 dependencies = { module=configure-gdb; on=all-intl; };
diff --git a/Makefile.in b/Makefile.in
index 593495e1650..c84bbcc2bf5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -754,7 +754,7 @@ TARGET_LIB_PATH_libatomic = $$r/$(TARGET_SUBDIR)/libatomic/.libs:
 
 # This is the list of directories that may be needed in RPATH_ENVVAR
 # so that programs built for the host machine work.
-HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_libelf)
+HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_gettext-runtime)$(HOST_LIB_PATH_libelf)
 
 # Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
 @if gcc
@@ -782,6 +782,11 @@ HOST_LIB_PATH_isl = \
   $$r/$(HOST_SUBDIR)/isl/.libs:$$r/$(HOST_SUBDIR)/prev-isl/.libs:
 @endif isl
 
+@if gettext-runtime
+HOST_LIB_PATH_gettext-runtime = \
+  $$r/$(HOST_SUBDIR)/gettext-runtime/intl/.libs:$$r/$(HOST_SUBDIR)/prev-gettext-runtime/intl/.libs:
+@endif gettext-runtime
+
 @if libelf
 HOST_LIB_PATH_libelf = \
   $$r/$(HOST_SUBDIR)/libelf/.libs:$$r/$(HOST_SUBDIR)/prev-libelf/.libs:
@@ -1078,6 +1083,7 @@ configure-host:  \
     maybe-configure-mpfr \
     maybe-configure-mpc \
     maybe-configure-isl \
+    maybe-configure-gettext-runtime \
     maybe-configure-libelf \
     maybe-configure-gold \
     maybe-configure-gprof \
@@ -1229,6 +1235,9 @@ all-host: maybe-all-mpc
 @if isl-no-bootstrap
 all-host: maybe-all-isl
 @endif isl-no-bootstrap
+@if gettext-runtime-no-bootstrap
+all-host: maybe-all-gettext-runtime
+@endif gettext-runtime-no-bootstrap
 @if libelf-no-bootstrap
 all-host: maybe-all-libelf
 @endif libelf-no-bootstrap
@@ -1370,6 +1379,7 @@ info-host: maybe-info-gmp
 info-host: maybe-info-mpfr
 info-host: maybe-info-mpc
 info-host: maybe-info-isl
+info-host: maybe-info-gettext-runtime
 info-host: maybe-info-libelf
 info-host: maybe-info-gold
 info-host: maybe-info-gprof
@@ -1460,6 +1470,7 @@ dvi-host: maybe-dvi-gmp
 dvi-host: maybe-dvi-mpfr
 dvi-host: maybe-dvi-mpc
 dvi-host: maybe-dvi-isl
+dvi-host: maybe-dvi-gettext-runtime
 dvi-host: maybe-dvi-libelf
 dvi-host: maybe-dvi-gold
 dvi-host: maybe-dvi-gprof
@@ -1550,6 +1561,7 @@ pdf-host: maybe-pdf-gmp
 pdf-host: maybe-pdf-mpfr
 pdf-host: maybe-pdf-mpc
 pdf-host: maybe-pdf-isl
+pdf-host: maybe-pdf-gettext-runtime
 pdf-host: maybe-pdf-libelf
 pdf-host: maybe-pdf-gold
 pdf-host: maybe-pdf-gprof
@@ -1640,6 +1652,7 @@ html-host: maybe-html-gmp
 html-host: maybe-html-mpfr
 html-host: maybe-html-mpc
 html-host: maybe-html-isl
+html-host: maybe-html-gettext-runtime
 html-host: maybe-html-libelf
 html-host: maybe-html-gold
 html-host: maybe-html-gprof
@@ -1730,6 +1743,7 @@ TAGS-host: maybe-TAGS-gmp
 TAGS-host: maybe-TAGS-mpfr
 TAGS-host: maybe-TAGS-mpc
 TAGS-host: maybe-TAGS-isl
+TAGS-host: maybe-TAGS-gettext-runtime
 TAGS-host: maybe-TAGS-libelf
 TAGS-host: maybe-TAGS-gold
 TAGS-host: maybe-TAGS-gprof
@@ -1820,6 +1834,7 @@ install-info-host: maybe-install-info-gmp
 install-info-host: maybe-install-info-mpfr
 install-info-host: maybe-install-info-mpc
 install-info-host: maybe-install-info-isl
+install-info-host: maybe-install-info-gettext-runtime
 install-info-host: maybe-install-info-libelf
 install-info-host: maybe-install-info-gold
 install-info-host: maybe-install-info-gprof
@@ -1910,6 +1925,7 @@ install-dvi-host: maybe-install-dvi-gmp
 install-dvi-host: maybe-install-dvi-mpfr
 install-dvi-host: maybe-install-dvi-mpc
 install-dvi-host: maybe-install-dvi-isl
+install-dvi-host: maybe-install-dvi-gettext-runtime
 install-dvi-host: maybe-install-dvi-libelf
 install-dvi-host: maybe-install-dvi-gold
 install-dvi-host: maybe-install-dvi-gprof
@@ -2000,6 +2016,7 @@ install-pdf-host: maybe-install-pdf-gmp
 install-pdf-host: maybe-install-pdf-mpfr
 install-pdf-host: maybe-install-pdf-mpc
 install-pdf-host: maybe-install-pdf-isl
+install-pdf-host: maybe-install-pdf-gettext-runtime
 install-pdf-host: maybe-install-pdf-libelf
 install-pdf-host: maybe-install-pdf-gold
 install-pdf-host: maybe-install-pdf-gprof
@@ -2090,6 +2107,7 @@ install-html-host: maybe-install-html-gmp
 install-html-host: maybe-install-html-mpfr
 install-html-host: maybe-install-html-mpc
 install-html-host: maybe-install-html-isl
+install-html-host: maybe-install-html-gettext-runtime
 install-html-host: maybe-install-html-libelf
 install-html-host: maybe-install-html-gold
 install-html-host: maybe-install-html-gprof
@@ -2180,6 +2198,7 @@ installcheck-host: maybe-installcheck-gmp
 installcheck-host: maybe-installcheck-mpfr
 installcheck-host: maybe-installcheck-mpc
 installcheck-host: maybe-installcheck-isl
+installcheck-host: maybe-installcheck-gettext-runtime
 installcheck-host: maybe-installcheck-libelf
 installcheck-host: maybe-installcheck-gold
 installcheck-host: maybe-installcheck-gprof
@@ -2270,6 +2289,7 @@ mostlyclean-host: maybe-mostlyclean-gmp
 mostlyclean-host: maybe-mostlyclean-mpfr
 mostlyclean-host: maybe-mostlyclean-mpc
 mostlyclean-host: maybe-mostlyclean-isl
+mostlyclean-host: maybe-mostlyclean-gettext-runtime
 mostlyclean-host: maybe-mostlyclean-libelf
 mostlyclean-host: maybe-mostlyclean-gold
 mostlyclean-host: maybe-mostlyclean-gprof
@@ -2360,6 +2380,7 @@ clean-host: maybe-clean-gmp
 clean-host: maybe-clean-mpfr
 clean-host: maybe-clean-mpc
 clean-host: maybe-clean-isl
+clean-host: maybe-clean-gettext-runtime
 clean-host: maybe-clean-libelf
 clean-host: maybe-clean-gold
 clean-host: maybe-clean-gprof
@@ -2450,6 +2471,7 @@ distclean-host: maybe-distclean-gmp
 distclean-host: maybe-distclean-mpfr
 distclean-host: maybe-distclean-mpc
 distclean-host: maybe-distclean-isl
+distclean-host: maybe-distclean-gettext-runtime
 distclean-host: maybe-distclean-libelf
 distclean-host: maybe-distclean-gold
 distclean-host: maybe-distclean-gprof
@@ -2540,6 +2562,7 @@ maintainer-clean-host: maybe-maintainer-clean-gmp
 maintainer-clean-host: maybe-maintainer-clean-mpfr
 maintainer-clean-host: maybe-maintainer-clean-mpc
 maintainer-clean-host: maybe-maintainer-clean-isl
+maintainer-clean-host: maybe-maintainer-clean-gettext-runtime
 maintainer-clean-host: maybe-maintainer-clean-libelf
 maintainer-clean-host: maybe-maintainer-clean-gold
 maintainer-clean-host: maybe-maintainer-clean-gprof
@@ -2688,6 +2711,7 @@ check-host:  \
     maybe-check-mpfr \
     maybe-check-mpc \
     maybe-check-isl \
+    maybe-check-gettext-runtime \
     maybe-check-libelf \
     maybe-check-gold \
     maybe-check-gprof \
@@ -2825,6 +2849,7 @@ install-host-nogcc:  \
     maybe-install-mpfr \
     maybe-install-mpc \
     maybe-install-isl \
+    maybe-install-gettext-runtime \
     maybe-install-libelf \
     maybe-install-gold \
     maybe-install-gprof \
@@ -2880,6 +2905,7 @@ install-host:  \
     maybe-install-mpfr \
     maybe-install-mpc \
     maybe-install-isl \
+    maybe-install-gettext-runtime \
     maybe-install-libelf \
     maybe-install-gold \
     maybe-install-gprof \
@@ -2990,6 +3016,7 @@ install-strip-host:  \
     maybe-install-strip-mpfr \
     maybe-install-strip-mpc \
     maybe-install-strip-isl \
+    maybe-install-strip-gettext-runtime \
     maybe-install-strip-libelf \
     maybe-install-strip-gold \
     maybe-install-strip-gprof \
@@ -17675,6 +17702,1143 @@ maintainer-clean-isl:
 
 
 
+.PHONY: configure-gettext-runtime maybe-configure-gettext-runtime
+maybe-configure-gettext-runtime:
+@if gcc-bootstrap
+configure-gettext-runtime: stage_current
+@endif gcc-bootstrap
+@if gettext-runtime
+maybe-configure-gettext-runtime: configure-gettext-runtime
+configure-gettext-runtime: 
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	$(HOST_EXPORTS)  \
+	echo Configuring in $(HOST_SUBDIR)/gettext-runtime; \
+	cd "$(HOST_SUBDIR)/gettext-runtime" || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) \
+	  $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} --disable-shared --disable-java --disable-csharp \
+	  || exit 1
+@endif gettext-runtime
+
+
+
+.PHONY: configure-stage1-gettext-runtime maybe-configure-stage1-gettext-runtime
+maybe-configure-stage1-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stage1-gettext-runtime: configure-stage1-gettext-runtime
+configure-stage1-gettext-runtime:
+	@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE1_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 1 in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	   \
+	  $(STAGE1_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stage2-gettext-runtime maybe-configure-stage2-gettext-runtime
+maybe-configure-stage2-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stage2-gettext-runtime: configure-stage2-gettext-runtime
+configure-stage2-gettext-runtime:
+	@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE2_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 2 in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE2_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stage3-gettext-runtime maybe-configure-stage3-gettext-runtime
+maybe-configure-stage3-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stage3-gettext-runtime: configure-stage3-gettext-runtime
+configure-stage3-gettext-runtime:
+	@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE3_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 3 in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE3_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stage4-gettext-runtime maybe-configure-stage4-gettext-runtime
+maybe-configure-stage4-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stage4-gettext-runtime: configure-stage4-gettext-runtime
+configure-stage4-gettext-runtime:
+	@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE4_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 4 in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE4_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stageprofile-gettext-runtime maybe-configure-stageprofile-gettext-runtime
+maybe-configure-stageprofile-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stageprofile-gettext-runtime: configure-stageprofile-gettext-runtime
+configure-stageprofile-gettext-runtime:
+	@[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEprofile_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage profile in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEprofile_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stagetrain-gettext-runtime maybe-configure-stagetrain-gettext-runtime
+maybe-configure-stagetrain-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stagetrain-gettext-runtime: configure-stagetrain-gettext-runtime
+configure-stagetrain-gettext-runtime:
+	@[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEtrain_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEtrain_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEtrain_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEtrain_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage train in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEtrain_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stagefeedback-gettext-runtime maybe-configure-stagefeedback-gettext-runtime
+maybe-configure-stagefeedback-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stagefeedback-gettext-runtime: configure-stagefeedback-gettext-runtime
+configure-stagefeedback-gettext-runtime:
+	@[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage feedback in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEfeedback_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stageautoprofile-gettext-runtime maybe-configure-stageautoprofile-gettext-runtime
+maybe-configure-stageautoprofile-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stageautoprofile-gettext-runtime: configure-stageautoprofile-gettext-runtime
+configure-stageautoprofile-gettext-runtime:
+	@[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEautoprofile_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEautoprofile_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEautoprofile_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage autoprofile in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEautoprofile_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+.PHONY: configure-stageautofeedback-gettext-runtime maybe-configure-stageautofeedback-gettext-runtime
+maybe-configure-stageautofeedback-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-configure-stageautofeedback-gettext-runtime: configure-stageautofeedback-gettext-runtime
+configure-stageautofeedback-gettext-runtime:
+	@[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEautofeedback_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/gettext-runtime/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEautofeedback_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEautofeedback_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage autofeedback in $(HOST_SUBDIR)/gettext-runtime; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext-runtime; \
+	cd $(HOST_SUBDIR)/gettext-runtime || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/gettext-runtime/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=gettext-runtime; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEautofeedback_CONFIGURE_FLAGS) \
+	  --disable-shared --disable-java --disable-csharp
+@endif gettext-runtime-bootstrap
+
+
+
+
+
+.PHONY: all-gettext-runtime maybe-all-gettext-runtime
+maybe-all-gettext-runtime:
+@if gcc-bootstrap
+all-gettext-runtime: stage_current
+@endif gcc-bootstrap
+@if gettext-runtime
+TARGET-gettext-runtime=all
+maybe-all-gettext-runtime: all-gettext-runtime
+all-gettext-runtime: configure-gettext-runtime
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS)  \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+		$(TARGET-gettext-runtime))
+@endif gettext-runtime
+
+
+
+.PHONY: all-stage1-gettext-runtime maybe-all-stage1-gettext-runtime
+.PHONY: clean-stage1-gettext-runtime maybe-clean-stage1-gettext-runtime
+maybe-all-stage1-gettext-runtime:
+maybe-clean-stage1-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stage1-gettext-runtime: all-stage1-gettext-runtime
+all-stage1: all-stage1-gettext-runtime
+TARGET-stage1-gettext-runtime = $(TARGET-gettext-runtime)
+all-stage1-gettext-runtime: configure-stage1-gettext-runtime
+	@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE1_TFLAGS)"; \
+	$(HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE1_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGE1_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+		LIBCFLAGS="$(LIBCFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS)  \
+		$(STAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE1_TFLAGS)"  \
+		$(TARGET-stage1-gettext-runtime)
+
+maybe-clean-stage1-gettext-runtime: clean-stage1-gettext-runtime
+clean-stage1: clean-stage1-gettext-runtime
+clean-stage1-gettext-runtime:
+	@if [ $(current_stage) = stage1 ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage1-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stage1-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS)  \
+	$(STAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stage2-gettext-runtime maybe-all-stage2-gettext-runtime
+.PHONY: clean-stage2-gettext-runtime maybe-clean-stage2-gettext-runtime
+maybe-all-stage2-gettext-runtime:
+maybe-clean-stage2-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stage2-gettext-runtime: all-stage2-gettext-runtime
+all-stage2: all-stage2-gettext-runtime
+TARGET-stage2-gettext-runtime = $(TARGET-gettext-runtime)
+all-stage2-gettext-runtime: configure-stage2-gettext-runtime
+	@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE2_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE2_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGE2_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE2_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE2_TFLAGS)"  \
+		$(TARGET-stage2-gettext-runtime)
+
+maybe-clean-stage2-gettext-runtime: clean-stage2-gettext-runtime
+clean-stage2: clean-stage2-gettext-runtime
+clean-stage2-gettext-runtime:
+	@if [ $(current_stage) = stage2 ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage2-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stage2-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stage3-gettext-runtime maybe-all-stage3-gettext-runtime
+.PHONY: clean-stage3-gettext-runtime maybe-clean-stage3-gettext-runtime
+maybe-all-stage3-gettext-runtime:
+maybe-clean-stage3-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stage3-gettext-runtime: all-stage3-gettext-runtime
+all-stage3: all-stage3-gettext-runtime
+TARGET-stage3-gettext-runtime = $(TARGET-gettext-runtime)
+all-stage3-gettext-runtime: configure-stage3-gettext-runtime
+	@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE3_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE3_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGE3_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE3_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE3_TFLAGS)"  \
+		$(TARGET-stage3-gettext-runtime)
+
+maybe-clean-stage3-gettext-runtime: clean-stage3-gettext-runtime
+clean-stage3: clean-stage3-gettext-runtime
+clean-stage3-gettext-runtime:
+	@if [ $(current_stage) = stage3 ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage3-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stage3-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stage4-gettext-runtime maybe-all-stage4-gettext-runtime
+.PHONY: clean-stage4-gettext-runtime maybe-clean-stage4-gettext-runtime
+maybe-all-stage4-gettext-runtime:
+maybe-clean-stage4-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stage4-gettext-runtime: all-stage4-gettext-runtime
+all-stage4: all-stage4-gettext-runtime
+TARGET-stage4-gettext-runtime = $(TARGET-gettext-runtime)
+all-stage4-gettext-runtime: configure-stage4-gettext-runtime
+	@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE4_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE4_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGE4_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE4_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE4_TFLAGS)"  \
+		$(TARGET-stage4-gettext-runtime)
+
+maybe-clean-stage4-gettext-runtime: clean-stage4-gettext-runtime
+clean-stage4: clean-stage4-gettext-runtime
+clean-stage4-gettext-runtime:
+	@if [ $(current_stage) = stage4 ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage4-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stage4-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stageprofile-gettext-runtime maybe-all-stageprofile-gettext-runtime
+.PHONY: clean-stageprofile-gettext-runtime maybe-clean-stageprofile-gettext-runtime
+maybe-all-stageprofile-gettext-runtime:
+maybe-clean-stageprofile-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stageprofile-gettext-runtime: all-stageprofile-gettext-runtime
+all-stageprofile: all-stageprofile-gettext-runtime
+TARGET-stageprofile-gettext-runtime = $(TARGET-gettext-runtime)
+all-stageprofile-gettext-runtime: configure-stageprofile-gettext-runtime
+	@[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEprofile_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGEprofile_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGEprofile_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGEprofile_TFLAGS)"  \
+		$(TARGET-stageprofile-gettext-runtime)
+
+maybe-clean-stageprofile-gettext-runtime: clean-stageprofile-gettext-runtime
+clean-stageprofile: clean-stageprofile-gettext-runtime
+clean-stageprofile-gettext-runtime:
+	@if [ $(current_stage) = stageprofile ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stageprofile-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stageprofile-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stagetrain-gettext-runtime maybe-all-stagetrain-gettext-runtime
+.PHONY: clean-stagetrain-gettext-runtime maybe-clean-stagetrain-gettext-runtime
+maybe-all-stagetrain-gettext-runtime:
+maybe-clean-stagetrain-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stagetrain-gettext-runtime: all-stagetrain-gettext-runtime
+all-stagetrain: all-stagetrain-gettext-runtime
+TARGET-stagetrain-gettext-runtime = $(TARGET-gettext-runtime)
+all-stagetrain-gettext-runtime: configure-stagetrain-gettext-runtime
+	@[ $(current_stage) = stagetrain ] || $(MAKE) stagetrain-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEtrain_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGEtrain_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGEtrain_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGEtrain_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGEtrain_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGEtrain_TFLAGS)"  \
+		$(TARGET-stagetrain-gettext-runtime)
+
+maybe-clean-stagetrain-gettext-runtime: clean-stagetrain-gettext-runtime
+clean-stagetrain: clean-stagetrain-gettext-runtime
+clean-stagetrain-gettext-runtime:
+	@if [ $(current_stage) = stagetrain ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stagetrain-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stagetrain-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stagefeedback-gettext-runtime maybe-all-stagefeedback-gettext-runtime
+.PHONY: clean-stagefeedback-gettext-runtime maybe-clean-stagefeedback-gettext-runtime
+maybe-all-stagefeedback-gettext-runtime:
+maybe-clean-stagefeedback-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stagefeedback-gettext-runtime: all-stagefeedback-gettext-runtime
+all-stagefeedback: all-stagefeedback-gettext-runtime
+TARGET-stagefeedback-gettext-runtime = $(TARGET-gettext-runtime)
+all-stagefeedback-gettext-runtime: configure-stagefeedback-gettext-runtime
+	@[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGEfeedback_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGEfeedback_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGEfeedback_TFLAGS)"  \
+		$(TARGET-stagefeedback-gettext-runtime)
+
+maybe-clean-stagefeedback-gettext-runtime: clean-stagefeedback-gettext-runtime
+clean-stagefeedback: clean-stagefeedback-gettext-runtime
+clean-stagefeedback-gettext-runtime:
+	@if [ $(current_stage) = stagefeedback ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stagefeedback-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stagefeedback-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stageautoprofile-gettext-runtime maybe-all-stageautoprofile-gettext-runtime
+.PHONY: clean-stageautoprofile-gettext-runtime maybe-clean-stageautoprofile-gettext-runtime
+maybe-all-stageautoprofile-gettext-runtime:
+maybe-clean-stageautoprofile-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stageautoprofile-gettext-runtime: all-stageautoprofile-gettext-runtime
+all-stageautoprofile: all-stageautoprofile-gettext-runtime
+TARGET-stageautoprofile-gettext-runtime = $(TARGET-gettext-runtime)
+all-stageautoprofile-gettext-runtime: configure-stageautoprofile-gettext-runtime
+	@[ $(current_stage) = stageautoprofile ] || $(MAKE) stageautoprofile-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEautoprofile_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$$s/gcc/config/i386/$(AUTO_PROFILE) \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGEautoprofile_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGEautoprofile_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGEautoprofile_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGEautoprofile_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGEautoprofile_TFLAGS)"  \
+		$(TARGET-stageautoprofile-gettext-runtime)
+
+maybe-clean-stageautoprofile-gettext-runtime: clean-stageautoprofile-gettext-runtime
+clean-stageautoprofile: clean-stageautoprofile-gettext-runtime
+clean-stageautoprofile-gettext-runtime:
+	@if [ $(current_stage) = stageautoprofile ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stageautoprofile-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stageautoprofile-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+.PHONY: all-stageautofeedback-gettext-runtime maybe-all-stageautofeedback-gettext-runtime
+.PHONY: clean-stageautofeedback-gettext-runtime maybe-clean-stageautofeedback-gettext-runtime
+maybe-all-stageautofeedback-gettext-runtime:
+maybe-clean-stageautofeedback-gettext-runtime:
+@if gettext-runtime-bootstrap
+maybe-all-stageautofeedback-gettext-runtime: all-stageautofeedback-gettext-runtime
+all-stageautofeedback: all-stageautofeedback-gettext-runtime
+TARGET-stageautofeedback-gettext-runtime = $(TARGET-gettext-runtime)
+all-stageautofeedback-gettext-runtime: configure-stageautofeedback-gettext-runtime
+	@[ $(current_stage) = stageautofeedback ] || $(MAKE) stageautofeedback-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEautofeedback_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	 \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGEautofeedback_CFLAGS)" \
+		GENERATOR_CFLAGS="$(STAGEautofeedback_GENERATOR_CFLAGS)" \
+		CXXFLAGS="$(STAGEautofeedback_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGEautofeedback_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \
+		$(TARGET-stageautofeedback-gettext-runtime)
+
+maybe-clean-stageautofeedback-gettext-runtime: clean-stageautofeedback-gettext-runtime
+clean-stageautofeedback: clean-stageautofeedback-gettext-runtime
+clean-stageautofeedback-gettext-runtime:
+	@if [ $(current_stage) = stageautofeedback ]; then \
+	  [ -f $(HOST_SUBDIR)/gettext-runtime/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stageautofeedback-gettext-runtime/Makefile ] || exit 0; \
+	  $(MAKE) stageautofeedback-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/gettext-runtime && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif gettext-runtime-bootstrap
+
+
+
+
+
+.PHONY: check-gettext-runtime maybe-check-gettext-runtime
+maybe-check-gettext-runtime:
+@if gettext-runtime
+maybe-check-gettext-runtime: check-gettext-runtime
+
+check-gettext-runtime:
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(FLAGS_TO_PASS)  $(EXTRA_BOOTSTRAP_FLAGS) check)
+
+@endif gettext-runtime
+
+.PHONY: install-gettext-runtime maybe-install-gettext-runtime
+maybe-install-gettext-runtime:
+@if gettext-runtime
+maybe-install-gettext-runtime: install-gettext-runtime
+
+install-gettext-runtime:
+
+@endif gettext-runtime
+
+.PHONY: install-strip-gettext-runtime maybe-install-strip-gettext-runtime
+maybe-install-strip-gettext-runtime:
+@if gettext-runtime
+maybe-install-strip-gettext-runtime: install-strip-gettext-runtime
+
+install-strip-gettext-runtime:
+
+@endif gettext-runtime
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gettext-runtime info-gettext-runtime
+maybe-info-gettext-runtime:
+@if gettext-runtime
+maybe-info-gettext-runtime: info-gettext-runtime
+
+info-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing info in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          info) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-dvi-gettext-runtime dvi-gettext-runtime
+maybe-dvi-gettext-runtime:
+@if gettext-runtime
+maybe-dvi-gettext-runtime: dvi-gettext-runtime
+
+dvi-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing dvi in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          dvi) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-pdf-gettext-runtime pdf-gettext-runtime
+maybe-pdf-gettext-runtime:
+@if gettext-runtime
+maybe-pdf-gettext-runtime: pdf-gettext-runtime
+
+pdf-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing pdf in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          pdf) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-html-gettext-runtime html-gettext-runtime
+maybe-html-gettext-runtime:
+@if gettext-runtime
+maybe-html-gettext-runtime: html-gettext-runtime
+
+html-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing html in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          html) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-TAGS-gettext-runtime TAGS-gettext-runtime
+maybe-TAGS-gettext-runtime:
+@if gettext-runtime
+maybe-TAGS-gettext-runtime: TAGS-gettext-runtime
+
+TAGS-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing TAGS in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          TAGS) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-install-info-gettext-runtime install-info-gettext-runtime
+maybe-install-info-gettext-runtime:
+@if gettext-runtime
+maybe-install-info-gettext-runtime: install-info-gettext-runtime
+
+install-info-gettext-runtime: \
+    configure-gettext-runtime \
+    info-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-info in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-info) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-install-dvi-gettext-runtime install-dvi-gettext-runtime
+maybe-install-dvi-gettext-runtime:
+@if gettext-runtime
+maybe-install-dvi-gettext-runtime: install-dvi-gettext-runtime
+
+install-dvi-gettext-runtime: \
+    configure-gettext-runtime \
+    dvi-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-dvi in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-dvi) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-install-pdf-gettext-runtime install-pdf-gettext-runtime
+maybe-install-pdf-gettext-runtime:
+@if gettext-runtime
+maybe-install-pdf-gettext-runtime: install-pdf-gettext-runtime
+
+install-pdf-gettext-runtime: \
+    configure-gettext-runtime \
+    pdf-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-pdf in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-pdf) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-install-html-gettext-runtime install-html-gettext-runtime
+maybe-install-html-gettext-runtime:
+@if gettext-runtime
+maybe-install-html-gettext-runtime: install-html-gettext-runtime
+
+install-html-gettext-runtime: \
+    configure-gettext-runtime \
+    html-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-html in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-html) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-installcheck-gettext-runtime installcheck-gettext-runtime
+maybe-installcheck-gettext-runtime:
+@if gettext-runtime
+maybe-installcheck-gettext-runtime: installcheck-gettext-runtime
+
+installcheck-gettext-runtime: \
+    configure-gettext-runtime 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing installcheck in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          installcheck) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-mostlyclean-gettext-runtime mostlyclean-gettext-runtime
+maybe-mostlyclean-gettext-runtime:
+@if gettext-runtime
+maybe-mostlyclean-gettext-runtime: mostlyclean-gettext-runtime
+
+mostlyclean-gettext-runtime: 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing mostlyclean in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          mostlyclean) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-clean-gettext-runtime clean-gettext-runtime
+maybe-clean-gettext-runtime:
+@if gettext-runtime
+maybe-clean-gettext-runtime: clean-gettext-runtime
+
+clean-gettext-runtime: 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing clean in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          clean) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-distclean-gettext-runtime distclean-gettext-runtime
+maybe-distclean-gettext-runtime:
+@if gettext-runtime
+maybe-distclean-gettext-runtime: distclean-gettext-runtime
+
+distclean-gettext-runtime: 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing distclean in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          distclean) \
+	  || exit 1
+
+@endif gettext-runtime
+
+.PHONY: maybe-maintainer-clean-gettext-runtime maintainer-clean-gettext-runtime
+maybe-maintainer-clean-gettext-runtime:
+@if gettext-runtime
+maybe-maintainer-clean-gettext-runtime: maintainer-clean-gettext-runtime
+
+maintainer-clean-gettext-runtime: 
+	@[ -f ./gettext-runtime/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing maintainer-clean in gettext-runtime"; \
+	(cd $(HOST_SUBDIR)/gettext-runtime && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          maintainer-clean) \
+	  || exit 1
+
+@endif gettext-runtime
+
+
+
 .PHONY: configure-libelf maybe-configure-libelf
 maybe-configure-libelf:
 @if gcc-bootstrap
@@ -61875,6 +63039,11 @@ stage1-start::
 	  mkdir stage1-isl; \
 	mv stage1-isl isl
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stage1-gettext-runtime ] || \
+	  mkdir stage1-gettext-runtime; \
+	mv stage1-gettext-runtime gettext-runtime
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stage1-libelf ] || \
 	  mkdir stage1-libelf; \
@@ -62000,6 +63169,11 @@ stage1-end::
 	  cd $(HOST_SUBDIR); mv isl stage1-isl; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stage1-gettext-runtime; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stage1-libelf; \
@@ -62178,6 +63352,12 @@ stage2-start::
 	mv stage2-isl isl; \
 	mv stage1-isl prev-isl || test -f stage1-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stage2-gettext-runtime ] || \
+	  mkdir stage2-gettext-runtime; \
+	mv stage2-gettext-runtime gettext-runtime; \
+	mv stage1-gettext-runtime prev-gettext-runtime || test -f stage1-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stage2-libelf ] || \
 	  mkdir stage2-libelf; \
@@ -62328,6 +63508,12 @@ stage2-end::
 	  mv prev-isl stage1-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stage2-gettext-runtime; \
+	  mv prev-gettext-runtime stage1-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stage2-libelf; \
@@ -62544,6 +63730,12 @@ stage3-start::
 	mv stage3-isl isl; \
 	mv stage2-isl prev-isl || test -f stage2-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stage3-gettext-runtime ] || \
+	  mkdir stage3-gettext-runtime; \
+	mv stage3-gettext-runtime gettext-runtime; \
+	mv stage2-gettext-runtime prev-gettext-runtime || test -f stage2-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stage3-libelf ] || \
 	  mkdir stage3-libelf; \
@@ -62694,6 +63886,12 @@ stage3-end::
 	  mv prev-isl stage2-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stage3-gettext-runtime; \
+	  mv prev-gettext-runtime stage2-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stage3-libelf; \
@@ -62966,6 +64164,12 @@ stage4-start::
 	mv stage4-isl isl; \
 	mv stage3-isl prev-isl || test -f stage3-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stage4-gettext-runtime ] || \
+	  mkdir stage4-gettext-runtime; \
+	mv stage4-gettext-runtime gettext-runtime; \
+	mv stage3-gettext-runtime prev-gettext-runtime || test -f stage3-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stage4-libelf ] || \
 	  mkdir stage4-libelf; \
@@ -63116,6 +64320,12 @@ stage4-end::
 	  mv prev-isl stage3-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stage4-gettext-runtime; \
+	  mv prev-gettext-runtime stage3-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stage4-libelf; \
@@ -63376,6 +64586,12 @@ stageprofile-start::
 	mv stageprofile-isl isl; \
 	mv stage1-isl prev-isl || test -f stage1-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stageprofile-gettext-runtime ] || \
+	  mkdir stageprofile-gettext-runtime; \
+	mv stageprofile-gettext-runtime gettext-runtime; \
+	mv stage1-gettext-runtime prev-gettext-runtime || test -f stage1-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stageprofile-libelf ] || \
 	  mkdir stageprofile-libelf; \
@@ -63526,6 +64742,12 @@ stageprofile-end::
 	  mv prev-isl stage1-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stageprofile-gettext-runtime; \
+	  mv prev-gettext-runtime stage1-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stageprofile-libelf; \
@@ -63719,6 +64941,12 @@ stagetrain-start::
 	mv stagetrain-isl isl; \
 	mv stageprofile-isl prev-isl || test -f stageprofile-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stagetrain-gettext-runtime ] || \
+	  mkdir stagetrain-gettext-runtime; \
+	mv stagetrain-gettext-runtime gettext-runtime; \
+	mv stageprofile-gettext-runtime prev-gettext-runtime || test -f stageprofile-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stagetrain-libelf ] || \
 	  mkdir stagetrain-libelf; \
@@ -63869,6 +65097,12 @@ stagetrain-end::
 	  mv prev-isl stageprofile-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stagetrain-gettext-runtime; \
+	  mv prev-gettext-runtime stageprofile-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stagetrain-libelf; \
@@ -64062,6 +65296,12 @@ stagefeedback-start::
 	mv stagefeedback-isl isl; \
 	mv stagetrain-isl prev-isl || test -f stagetrain-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stagefeedback-gettext-runtime ] || \
+	  mkdir stagefeedback-gettext-runtime; \
+	mv stagefeedback-gettext-runtime gettext-runtime; \
+	mv stagetrain-gettext-runtime prev-gettext-runtime || test -f stagetrain-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stagefeedback-libelf ] || \
 	  mkdir stagefeedback-libelf; \
@@ -64212,6 +65452,12 @@ stagefeedback-end::
 	  mv prev-isl stagetrain-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stagefeedback-gettext-runtime; \
+	  mv prev-gettext-runtime stagetrain-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stagefeedback-libelf; \
@@ -64428,6 +65674,12 @@ stageautoprofile-start::
 	mv stageautoprofile-isl isl; \
 	mv stage1-isl prev-isl || test -f stage1-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stageautoprofile-gettext-runtime ] || \
+	  mkdir stageautoprofile-gettext-runtime; \
+	mv stageautoprofile-gettext-runtime gettext-runtime; \
+	mv stage1-gettext-runtime prev-gettext-runtime || test -f stage1-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stageautoprofile-libelf ] || \
 	  mkdir stageautoprofile-libelf; \
@@ -64578,6 +65830,12 @@ stageautoprofile-end::
 	  mv prev-isl stage1-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stageautoprofile-gettext-runtime; \
+	  mv prev-gettext-runtime stage1-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stageautoprofile-libelf; \
@@ -64771,6 +66029,12 @@ stageautofeedback-start::
 	mv stageautofeedback-isl isl; \
 	mv stageautoprofile-isl prev-isl || test -f stageautoprofile-lean 
 @endif isl
+@if gettext-runtime
+	@cd $(HOST_SUBDIR); [ -d stageautofeedback-gettext-runtime ] || \
+	  mkdir stageautofeedback-gettext-runtime; \
+	mv stageautofeedback-gettext-runtime gettext-runtime; \
+	mv stageautoprofile-gettext-runtime prev-gettext-runtime || test -f stageautoprofile-lean 
+@endif gettext-runtime
 @if libelf
 	@cd $(HOST_SUBDIR); [ -d stageautofeedback-libelf ] || \
 	  mkdir stageautofeedback-libelf; \
@@ -64921,6 +66185,12 @@ stageautofeedback-end::
 	  mv prev-isl stageautoprofile-isl; : ; \
 	fi
 @endif isl
+@if gettext-runtime
+	@if test -d $(HOST_SUBDIR)/gettext-runtime; then \
+	  cd $(HOST_SUBDIR); mv gettext-runtime stageautofeedback-gettext-runtime; \
+	  mv prev-gettext-runtime stageautoprofile-gettext-runtime; : ; \
+	fi
+@endif gettext-runtime
 @if libelf
 	@if test -d $(HOST_SUBDIR)/libelf; then \
 	  cd $(HOST_SUBDIR); mv libelf stageautofeedback-libelf; \
@@ -65261,16 +66531,16 @@ all-build-libiberty: maybe-all-build-texinfo
 all-build-m4: maybe-all-build-texinfo
 all-build-fixincludes: maybe-all-build-libiberty
 all-build-libcpp: maybe-all-build-libiberty
-configure-gcc: maybe-configure-intl
-configure-stage1-gcc: maybe-configure-stage1-intl
-configure-stage2-gcc: maybe-configure-stage2-intl
-configure-stage3-gcc: maybe-configure-stage3-intl
-configure-stage4-gcc: maybe-configure-stage4-intl
-configure-stageprofile-gcc: maybe-configure-stageprofile-intl
-configure-stagetrain-gcc: maybe-configure-stagetrain-intl
-configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
-configure-stageautoprofile-gcc: maybe-configure-stageautoprofile-intl
-configure-stageautofeedback-gcc: maybe-configure-stageautofeedback-intl
+configure-gcc: maybe-configure-gettext-runtime
+configure-stage1-gcc: maybe-configure-stage1-gettext-runtime
+configure-stage2-gcc: maybe-configure-stage2-gettext-runtime
+configure-stage3-gcc: maybe-configure-stage3-gettext-runtime
+configure-stage4-gcc: maybe-configure-stage4-gettext-runtime
+configure-stageprofile-gcc: maybe-configure-stageprofile-gettext-runtime
+configure-stagetrain-gcc: maybe-configure-stagetrain-gettext-runtime
+configure-stagefeedback-gcc: maybe-configure-stagefeedback-gettext-runtime
+configure-stageautoprofile-gcc: maybe-configure-stageautoprofile-gettext-runtime
+configure-stageautofeedback-gcc: maybe-configure-stageautofeedback-gettext-runtime
 configure-gcc: maybe-all-gmp
 configure-stage1-gcc: maybe-all-stage1-gmp
 configure-stage2-gcc: maybe-all-stage2-gmp
@@ -65401,6 +66671,16 @@ all-stagetrain-gcc: maybe-all-stagetrain-intl
 all-stagefeedback-gcc: maybe-all-stagefeedback-intl
 all-stageautoprofile-gcc: maybe-all-stageautoprofile-intl
 all-stageautofeedback-gcc: maybe-all-stageautofeedback-intl
+all-gcc: maybe-all-gettext-runtime
+all-stage1-gcc: maybe-all-stage1-gettext-runtime
+all-stage2-gcc: maybe-all-stage2-gettext-runtime
+all-stage3-gcc: maybe-all-stage3-gettext-runtime
+all-stage4-gcc: maybe-all-stage4-gettext-runtime
+all-stageprofile-gcc: maybe-all-stageprofile-gettext-runtime
+all-stagetrain-gcc: maybe-all-stagetrain-gettext-runtime
+all-stagefeedback-gcc: maybe-all-stagefeedback-gettext-runtime
+all-stageautoprofile-gcc: maybe-all-stageautoprofile-gettext-runtime
+all-stageautofeedback-gcc: maybe-all-stageautofeedback-gettext-runtime
 all-gcc: maybe-all-mpfr
 all-stage1-gcc: maybe-all-stage1-mpfr
 all-stage2-gcc: maybe-all-stage2-mpfr
@@ -65635,16 +66915,16 @@ configure-stagetrain-libcpp: configure-stagetrain-libiberty
 configure-stagefeedback-libcpp: configure-stagefeedback-libiberty
 configure-stageautoprofile-libcpp: configure-stageautoprofile-libiberty
 configure-stageautofeedback-libcpp: configure-stageautofeedback-libiberty
-configure-libcpp: maybe-configure-intl
-configure-stage1-libcpp: maybe-configure-stage1-intl
-configure-stage2-libcpp: maybe-configure-stage2-intl
-configure-stage3-libcpp: maybe-configure-stage3-intl
-configure-stage4-libcpp: maybe-configure-stage4-intl
-configure-stageprofile-libcpp: maybe-configure-stageprofile-intl
-configure-stagetrain-libcpp: maybe-configure-stagetrain-intl
-configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
-configure-stageautoprofile-libcpp: maybe-configure-stageautoprofile-intl
-configure-stageautofeedback-libcpp: maybe-configure-stageautofeedback-intl
+configure-libcpp: maybe-configure-gettext-runtime
+configure-stage1-libcpp: maybe-configure-stage1-gettext-runtime
+configure-stage2-libcpp: maybe-configure-stage2-gettext-runtime
+configure-stage3-libcpp: maybe-configure-stage3-gettext-runtime
+configure-stage4-libcpp: maybe-configure-stage4-gettext-runtime
+configure-stageprofile-libcpp: maybe-configure-stageprofile-gettext-runtime
+configure-stagetrain-libcpp: maybe-configure-stagetrain-gettext-runtime
+configure-stagefeedback-libcpp: maybe-configure-stagefeedback-gettext-runtime
+configure-stageautoprofile-libcpp: maybe-configure-stageautoprofile-gettext-runtime
+configure-stageautofeedback-libcpp: maybe-configure-stageautofeedback-gettext-runtime
 configure-libcpp: maybe-all-libiconv
 configure-stage1-libcpp: maybe-all-stage1-libiconv
 configure-stage2-libcpp: maybe-all-stage2-libiconv
@@ -65665,16 +66945,16 @@ all-stagetrain-libcpp: all-stagetrain-libiberty
 all-stagefeedback-libcpp: all-stagefeedback-libiberty
 all-stageautoprofile-libcpp: all-stageautoprofile-libiberty
 all-stageautofeedback-libcpp: all-stageautofeedback-libiberty
-all-libcpp: maybe-all-intl
-all-stage1-libcpp: maybe-all-stage1-intl
-all-stage2-libcpp: maybe-all-stage2-intl
-all-stage3-libcpp: maybe-all-stage3-intl
-all-stage4-libcpp: maybe-all-stage4-intl
-all-stageprofile-libcpp: maybe-all-stageprofile-intl
-all-stagetrain-libcpp: maybe-all-stagetrain-intl
-all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
-all-stageautoprofile-libcpp: maybe-all-stageautoprofile-intl
-all-stageautofeedback-libcpp: maybe-all-stageautofeedback-intl
+all-libcpp: maybe-all-gettext-runtime
+all-stage1-libcpp: maybe-all-stage1-gettext-runtime
+all-stage2-libcpp: maybe-all-stage2-gettext-runtime
+all-stage3-libcpp: maybe-all-stage3-gettext-runtime
+all-stage4-libcpp: maybe-all-stage4-gettext-runtime
+all-stageprofile-libcpp: maybe-all-stageprofile-gettext-runtime
+all-stagetrain-libcpp: maybe-all-stagetrain-gettext-runtime
+all-stagefeedback-libcpp: maybe-all-stagefeedback-gettext-runtime
+all-stageautoprofile-libcpp: maybe-all-stageautoprofile-gettext-runtime
+all-stageautofeedback-libcpp: maybe-all-stageautofeedback-gettext-runtime
 all-libcpp: maybe-all-libiconv
 all-stage1-libcpp: maybe-all-stage1-libiconv
 all-stage2-libcpp: maybe-all-stage2-libiconv
@@ -65727,6 +67007,16 @@ configure-stagetrain-intl: maybe-all-stagetrain-libiconv
 configure-stagefeedback-intl: maybe-all-stagefeedback-libiconv
 configure-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
 configure-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
+configure-gettext-runtime: maybe-all-libiconv
+configure-stage1-gettext-runtime: maybe-all-stage1-libiconv
+configure-stage2-gettext-runtime: maybe-all-stage2-libiconv
+configure-stage3-gettext-runtime: maybe-all-stage3-libiconv
+configure-stage4-gettext-runtime: maybe-all-stage4-libiconv
+configure-stageprofile-gettext-runtime: maybe-all-stageprofile-libiconv
+configure-stagetrain-gettext-runtime: maybe-all-stagetrain-libiconv
+configure-stagefeedback-gettext-runtime: maybe-all-stagefeedback-libiconv
+configure-stageautoprofile-gettext-runtime: maybe-all-stageautoprofile-libiconv
+configure-stageautofeedback-gettext-runtime: maybe-all-stageautofeedback-libiconv
 configure-mpfr: maybe-all-gmp
 configure-stage1-mpfr: maybe-all-stage1-gmp
 configure-stage2-mpfr: maybe-all-stage2-gmp
@@ -65767,6 +67057,16 @@ all-stagetrain-intl: maybe-all-stagetrain-libiconv
 all-stagefeedback-intl: maybe-all-stagefeedback-libiconv
 all-stageautoprofile-intl: maybe-all-stageautoprofile-libiconv
 all-stageautofeedback-intl: maybe-all-stageautofeedback-libiconv
+all-gettext-runtime: maybe-all-libiconv
+all-stage1-gettext-runtime: maybe-all-stage1-libiconv
+all-stage2-gettext-runtime: maybe-all-stage2-libiconv
+all-stage3-gettext-runtime: maybe-all-stage3-libiconv
+all-stage4-gettext-runtime: maybe-all-stage4-libiconv
+all-stageprofile-gettext-runtime: maybe-all-stageprofile-libiconv
+all-stagetrain-gettext-runtime: maybe-all-stagetrain-libiconv
+all-stagefeedback-gettext-runtime: maybe-all-stagefeedback-libiconv
+all-stageautoprofile-gettext-runtime: maybe-all-stageautoprofile-libiconv
+all-stageautofeedback-gettext-runtime: maybe-all-stageautofeedback-libiconv
 configure-gdb: maybe-configure-sim
 configure-gdb: maybe-all-gnulib
 configure-gdb: maybe-all-gdbsupport
diff --git a/config/gettext-sister.m4 b/config/gettext-sister.m4
index e8e6b668416..bc5b8c4b57a 100644
--- a/config/gettext-sister.m4
+++ b/config/gettext-sister.m4
@@ -12,17 +12,34 @@
 AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR],
 [# If we haven't got the data from the intl directory,
 # assume NLS is disabled.
-USE_NLS=no	AC_SUBST(USE_NLS)
-LIBINTL=	AC_SUBST(LIBINTL)
-LIBINTL_DEP=	AC_SUBST(LIBINTL_DEP)
-INCINTL=	AC_SUBST(INCINTL)
-XGETTEXT=	AC_SUBST(XGETTEXT)
-GMSGFMT=	AC_SUBST(GMSGFMT)
-POSUB=		AC_SUBST(POSUB)
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
 
-if test -f  ifelse([$1],,[../intl],[$1])/config.intl; then
+if test -f  ifelse([$1],,[../gettext-runtime],[$1])/Makefile; then
+  BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //`
+  USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //`
+  LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //`
+  INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //`
+  XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //`
+  GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //`
+  POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //`
+  LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS"
+  INCINTL="-I\${top_builddir}/../gettext-runtime/intl"
+elif test -f  ifelse([$1],,[../intl],[$1])/config.intl; then
   .  ifelse([$1],,[../intl],[$1])/config.intl
 fi
+AC_SUBST(USE_NLS)
+AC_SUBST(LIBINTL)
+AC_SUBST(LIBINTL_DEP)
+AC_SUBST(INCINTL)
+AC_SUBST(XGETTEXT)
+AC_SUBST(GMSGFMT)
+AC_SUBST(POSUB)
 AC_MSG_CHECKING([whether NLS is requested])
 if test x"$USE_NLS" != xyes; then
   AC_MSG_RESULT(no)
diff --git a/configure b/configure
index 5dcaab14ae9..f0f78420175 100755
--- a/configure
+++ b/configure
@@ -2807,7 +2807,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
 
 # these libraries are used by various programs built for the host environment
 #f
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
+host_libs="gettext-runtime intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
diff --git a/configure.ac b/configure.ac
index 85977482aee..22e8819a082 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
 
 # these libraries are used by various programs built for the host environment
 #f
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
+host_libs="gettext-runtime intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libelf libiconv libctf"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
diff --git a/gcc/configure b/gcc/configure
index f43dc989d02..3e1e64693cd 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -13105,9 +13105,26 @@ XGETTEXT=
 GMSGFMT=
 POSUB=
 
-if test -f  ../intl/config.intl; then
+if test -f  ../gettext-runtime/Makefile; then
+  BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //`
+  USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //`
+  LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //`
+  INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //`
+  XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //`
+  GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //`
+  POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //`
+  LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS"
+  INCINTL="-I\${top_builddir}/../gettext-runtime/intl"
+elif test -f  ../intl/config.intl; then
   .  ../intl/config.intl
 fi
+
+
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
 $as_echo_n "checking whether NLS is requested... " >&6; }
 if test x"$USE_NLS" != xyes; then
@@ -19674,7 +19691,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19679 "configure"
+#line 19694 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19780,7 +19797,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19785 "configure"
+#line 19800 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
diff --git a/libcpp/configure b/libcpp/configure
index 75145390215..54fe9634981 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -6549,9 +6549,26 @@ XGETTEXT=
 GMSGFMT=
 POSUB=
 
-if test -f  ../intl/config.intl; then
+if test -f  ../gettext-runtime/Makefile; then
+  BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //`
+  USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //`
+  LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //`
+  INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //`
+  XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //`
+  GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //`
+  POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //`
+  LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS"
+  INCINTL="-I\${top_builddir}/../gettext-runtime/intl"
+elif test -f  ../intl/config.intl; then
   .  ../intl/config.intl
 fi
+
+
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
 $as_echo_n "checking whether NLS is requested... " >&6; }
 if test x"$USE_NLS" != xyes; then
-- 
2.24.3 (Apple Git-128)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-18 17:01 remove intl/ directory? Bruno Haible
  2022-06-18 17:42 ` Iain Sandoe
@ 2022-06-20 19:45 ` Eric Gallager
  2022-06-21  2:09   ` Bruno Haible
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Gallager @ 2022-06-20 19:45 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

On Sat, Jun 18, 2022 at 1:01 PM Bruno Haible <bruno@clisp.org> wrote:
>
> Hi,
>
> As the long-term GNU gettext maintainer, I would suggest to remove the intl/
> directory from the GCC distribution.
>
> The effect for the users would be:
>   * On systems without glibc, users who want an internationalized GCC
>     installation would have to install GNU gettext first. Then the GCC
>     binaries would be linked with the shared library libintl.so
>     (unless gettext was built with --disable-shared); they would no longer
>     contain the libintl code in 'cc1', 'cc1plus', etc.
>   * On systems with glibc, no change.
>
> The effect for the GCC maintainers would be:
>   * Easier to stay up-to-date with upstream libintl.
>   * Less maintenance work with *.m4 files such as
>       codeset.m4
>       glibc21.m4
>       intdiv0.m4
>       inttypes_h.m4
>       inttypes.m4
>       inttypes-pri.m4
>       lcmessage.m4
>       stdint_h.m4
>       uintmax_t.m4
>       ulonglong.m4
>   * Reduced risk of a CVE that would impact GCC binaries.
>
> Rationale:
>   * This intl/ code is from 2003; of course several bugs have been
>     fixed in it over the last 19 years.
>   * At that time GNU packages were still favouring static libraries.
>     GNU libtool became widely reliable only about in 2005.
>   * Since then, distros have been favouring shared libraries over
>     static libraries, in order to be able to fix CVEs without
>     rebuilding many dependent binaries.
>   * For this reason, GNU gettext removed the support for this way
>     of packaging libintl in version 0.20 (May 2019). The NEWS entry
>     said:
>     - The --intl option of the gettextize program (deprecated since 2010) is
>       no longer available. Instead of including the intl sources in your
>       package, we suggest making the libintl library an optional prerequisite
>       of your package. This will simplify the build system of your package.
>     - Accordingly, the Autoconf macro AM_GNU_GETTEXT_INTL_SUBDIR is gone
>       as well.
>
> This point came up while discussing with Eric Gallager, who is working on
> the GCC configury.
>

Hi, just for some additional context for anyone reading from the
archives, but this conversation came out of autoconf sr #110324:
https://savannah.gnu.org/support/?110324
My work can be seen in the
refs/users/egallager/heads/autotools-tinkering branch, which I'm also
mirroring on GitHub here:
https://github.com/cooljeanius/gcc/tree/me/autotools-tinkering
The latest pending patch I've submitted from this branch is here:
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596654.html
As for the underlying topic of this thread, personally I see removing
the intl/ subdirectory as just one possible solution to the issue of
its autoconf macros being outdated, the other would be to fix
autoupdate so that it can handle things properly, but I can see how
that would be harder. Whichever solution turns out to be the simplest
for everyone involved will be the one I'll support.
Thanks,
Eric

> I don't volunteer to implement this suggestion, but I can give advice where
> needed.
>
> Bruno
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-19 20:15       ` Iain Sandoe
@ 2022-06-21  2:05         ` Bruno Haible
  2022-06-22 20:21           ` Iain Sandoe
  0 siblings, 1 reply; 16+ messages in thread
From: Bruno Haible @ 2022-06-21  2:05 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Development

Hi Iain,

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

Excellent! Glad to see that you are going ahead so quickly.

I have now added the necessary support for this "uninstalled" situation from
the gettext side:
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=6f048e30a88282ed6712ce8d6000302fd287daad
This is in a form that is maintainable from gettext's side.

I believe that with this, you can change these lines from gettext-sister.m4

  BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //`
  USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //`
  LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //`
  INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //`
  XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //`
  GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //`
  POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //`
  LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS"
  INCINTL="-I\${top_builddir}/../gettext-runtime/intl"

roughly to this:

  relative_builddir='${top_builddir}/../gettext-runtime'
  . ${top_builddir}/../gettext-runtime/uninstalled-config.sh

There is also a GCC specific quirk, that I upstreamed into GNU gettext:
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b

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

Thanks for reporting this; it should be fixed now, through
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=971dcbdbebb05d7ae8aa6399a0c79442fa996c5c

You find a tarball from the current gettext git, that contains all these
changes, in https://alpha.gnu.org/gnu/gettext/gettext-20220620.tar.gz .
Obviously, the GCC documentation will have to say that all this works only
with GNU gettext 0.22 or newer, i.e. after I make the next release.

Bruno




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-20 19:45 ` Eric Gallager
@ 2022-06-21  2:09   ` Bruno Haible
  0 siblings, 0 replies; 16+ messages in thread
From: Bruno Haible @ 2022-06-21  2:09 UTC (permalink / raw)
  To: Eric Gallager; +Cc: GCC Development

Eric Gallager wrote:
> personally I see removing
> the intl/ subdirectory as just one possible solution to the issue of
> its autoconf macros being outdated

The autoconf macros are only the smaller part of the problem. The bigger
part is the C code of libintl. [1][2]

Bruno

[1] https://gcc.gnu.org/pipermail/gcc/2022-June/238920.html
[2] https://gcc.gnu.org/pipermail/gcc/2022-June/238925.html




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-21  2:05         ` Bruno Haible
@ 2022-06-22 20:21           ` Iain Sandoe
  2022-06-23  4:24             ` Bruno Haible
  0 siblings, 1 reply; 16+ messages in thread
From: Iain Sandoe @ 2022-06-22 20:21 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

Hi Bruno,

+1 on the C reasons for removing intl.
(however, once we have a rough working patch, it would still need buy-in from GDB + binutils)

> On 21 Jun 2022, at 03:05, Bruno Haible <bruno@clisp.org> wrote:

>> 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.
> 
> Excellent! Glad to see that you are going ahead so quickly.
> 
> I have now added the necessary support for this "uninstalled" situation from
> the gettext side:
> https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=6f048e30a88282ed6712ce8d6000302fd287daad
> This is in a form that is maintainable from gettext's side.
> 
> I believe that with this, you can change these lines from gettext-sister.m4
> 
>  BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //`
>  USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //`
>  LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //`
>  INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //`
>  XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //`
>  GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //`
>  POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //`
>  LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS"
>  INCINTL="-I\${top_builddir}/../gettext-runtime/intl"
> 
> roughly to this:
> 
>  relative_builddir='${top_builddir}/../gettext-runtime'
>  . ${top_builddir}/../gettext-runtime/uninstalled-config.sh

Yes (
# We can use an in-tree build of libintl.
if test -f  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh; then
  relative_builddir='ifelse([$1],,[${top_builddir}/..],[$1]/..)/gettext-runtime'
  .  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh
elif test -f  ifelse([$1],,[../intl],[$1])/config.intl; then
  .  ifelse([$1],,[../intl],[$1])/config.intl
fi
)
and it works ...

… although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )

-----

FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
…  is there any reason that all platforms with non-’so’ suffixes would not work with that change?

+# LIBINTL is a set of compiler options, to use when linking without libtool,
+# that ensures that the library that contains the *gettext() family of functions
+# gets found.
+if test @USE_INCLUDED_LIBINTL@ = yes; then
+  if test '@ENABLE_SHARED@' = yes; then
+    # NB: This case is not supported on AIX and HP-UX.
+    LIBINTL="${relative_builddir}/intl/.libs/libintl.so -Wl,-rpath,${relative_builddir}/intl/.libs @LIBICONV@ @INTL_MACOSX_LIBS@"
+  else
+    LIBINTL="${relative_builddir}/intl/.libs/libintl.a @LIBICONV@ @INTL_MACOSX_LIBS@"
+  fi
+else
+  # The functionality is provided by libc.
+  LIBINTL=
+fi

> There is also a GCC specific quirk, that I upstreamed into GNU gettext:
> https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b

IMHO we need to fix this ^ in GCC config - since gettext-runtime accepts “—with-pic” we should amend the GCC configury to pass —with-pic [to GMP et. al. as well, currently to build in-tree with host-shared, needs a manual —with-pic on the configure too]

I added a change that looks at the [host-shared] flag in the top-level configure, it just needs to be moved and used to add the —with-pic flags where needed (where ‘just’ is more than 5mins work, and needs testing widely …)
 
>> 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.
> 
> Thanks for reporting this; it should be fixed now, through
> https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=971dcbdbebb05d7ae8aa6399a0c79442fa996c5c

yes, thanks!

> You find a tarball from the current gettext git, that contains all these
> changes, in https://alpha.gnu.org/gnu/gettext/gettext-20220620.tar.gz .
> Obviously, the GCC documentation will have to say that all this works only
> with GNU gettext 0.22 or newer, i.e. after I make the next release.

Indeed, we can set a minimum version.

I think that we now need to deal with the GCC-side of the configury …

1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)
2) if the in-tree source is available, I believe that the current status-quo is that it will override anything set with (1).

(1) might be slightly more tricky to do than GMP et. al. since they operate by jamming the -I, -L and -lxxx into the CFLAGS/LDFLAGS, where the in-tree intl scheme inserts the information into the configured variables, so we would need to emulate that for an installed libintl.

-----

Anyways, it’s 10.4 release time so all my resources (machines and time) are tied up with that - so probably nothing happening on this (from me at least) until that release (and my darwin-specific follow-on) is done.

thanks for working on this!
Iain





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-22 20:21           ` Iain Sandoe
@ 2022-06-23  4:24             ` Bruno Haible
  2022-06-23  6:51               ` Iain Sandoe
  2022-06-23 15:13               ` Eric Gallager
  0 siblings, 2 replies; 16+ messages in thread
From: Bruno Haible @ 2022-06-23  4:24 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Development

Iain Sandoe wrote:
> Yes (
> # We can use an in-tree build of libintl.
> if test -f  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh; then
>   relative_builddir='ifelse([$1],,[${top_builddir}/..],[$1]/..)/gettext-runtime'
>   .  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh
> elif test -f  ifelse([$1],,[../intl],[$1])/config.intl; then
>   .  ifelse([$1],,[../intl],[$1])/config.intl
> fi
> )
> and it works ...

Good!

> … although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )

You can get warnings if you _move_ the gettext-runtime directory so that it
becomes a sibling directory of 'gcc'. You should *not* get warnings if you
create a symlink, sibling of the 'gcc' directory, to the
gettext-20220620/gettext-runtime/ directory.

> FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
> …  is there any reason that all platforms with non-’so’ suffixes would not work with that change?

On macOS (with .dylib instead of .so) it would probably work.

However, AIX and HP-UX will not work, because (as I understand it) if you want
to have a binary, say cc1, which depends on libintl, then
  - the cc1 that accesses /usr/local/lib/libintl.$suffix
and
  - the cc1 that accesses /home/user/build/gcc-snap/gettext-runtime/intl/.libs/libintl.$suffix
must necessarily be different. You cannot just install the second one in
public locations, because it will have the wrong shared library filename
hardcoded into it. This is why on these systems, libtool has to rebuild
executables during "make install".

Anyway, you said that for GCC, the important case is to build libintl as a
static (non-shared) library.

> > There is also a GCC specific quirk, that I upstreamed into GNU gettext:
> > https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b
> 
> IMHO we need to fix this ^ in GCC config - since gettext-runtime accepts “—with-pic” we should amend the GCC configury to pass —with-pic [to GMP et. al. as well, currently to build in-tree with host-shared, needs a manual —with-pic on the configure too]

Indeed, the option '--with-pic' (from libtool) has the same effect as
'--enable-host-shared'. If you can arrange to pass '--with-pic' instead
of '--enable-host-shared', I can revert the addition of the option
'--enable-host-shared' in gettext-runtime/intl from two days ago.

> I think that we now need to deal with the GCC-side of the configury …
> 
> 1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)

Are you aware that gettext.m4 already introduces the configure options
  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
  --without-libintl-prefix     don't search for libintl in includedir and libdir
?

Bruno




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-23  4:24             ` Bruno Haible
@ 2022-06-23  6:51               ` Iain Sandoe
  2022-06-23 15:40                 ` Iain Sandoe
  2022-06-23 15:13               ` Eric Gallager
  1 sibling, 1 reply; 16+ messages in thread
From: Iain Sandoe @ 2022-06-23  6:51 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development

Hi Bruno,

> On 23 Jun 2022, at 05:24, Bruno Haible <bruno@clisp.org> wrote:
> 
> Iain Sandoe wrote:

>> … although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )
> 
> You can get warnings if you _move_ the gettext-runtime directory so that it
> becomes a sibling directory of 'gcc'. You should *not* get warnings if you
> create a symlink, sibling of the 'gcc' directory, to the
> gettext-20220620/gettext-runtime/ directory.

I did symlink, and agree it should work - I’ll need to try and repeat when next I have some time.
> 
>> FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
>> …  is there any reason that all platforms with non-’so’ suffixes would not work with that change?
> 
> On macOS (with .dylib instead of .so) it would probably work.
> 
> However, AIX and HP-UX will not work, because (as I understand it) if you want
> to have a binary, say cc1, which depends on libintl, then
>  - the cc1 that accesses /usr/local/lib/libintl.$suffix
> and
>  - the cc1 that accesses /home/user/build/gcc-snap/gettext-runtime/intl/.libs/libintl.$suffix
> must necessarily be different. You cannot just install the second one in
> public locations, because it will have the wrong shared library filename
> hardcoded into it. This is why on these systems, libtool has to rebuild
> executables during "make install".

Ah, actually a similar situation might apply to the macOS case, you would either need
to build it “@rpath” and install the library in the exe’s dir or build and install it into
‘prefix’ (that puts the full pathname into the dylib, in a similar way to AIX / HP-UX).
This is also requires a bit of juggling on macOS (I have patches in flight to make all
the runtimes for GCC built with ‘@rpath’ and using embedded rpaths in exe) hopefully
for GCC-13
 … so let’s quietly forget the shared case for now...

> Anyway, you said that for GCC, the important case is to build libintl as a
> static (non-shared) library.

Yes, in a 1:1 replacement for ‘intl’ that’s the case, we can figure out shared stuff as a follow-on.

>> I think that we now need to deal with the GCC-side of the configury …
>> 
>> 1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)
> 
> Are you aware that gettext.m4 already introduces the configure options
>  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
>  --without-libintl-prefix     don't search for libintl in includedir and libdir

Hmm - the following cases:
a) there’s no gettext-runtime in the source tree and the user needs to configure —with-libintl-prefix= 
b) there is a  gettext-runtime in the source tree and the user decides to configure —with-libintl-prefix= (which will be ignored if we take the way the other in-tree builds are handled as ’status quo’
c) there is a  gettext-runtime in the source tree  and no —with-libintl-prefix= is given (we expect to pick up the in-tree build silently and automatically).

… in case (a) we’d need to arrange for the gettext macro to be called in configure, but I don’t think it will play nicely with gettext-sister .. so there’s some work needed here.
in case (b) I’m not sure what will happen - will the configure for libintl just point the variables to the install suggested?

case (c) works today.

cheers
Iain




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-23  4:24             ` Bruno Haible
  2022-06-23  6:51               ` Iain Sandoe
@ 2022-06-23 15:13               ` Eric Gallager
  1 sibling, 0 replies; 16+ messages in thread
From: Eric Gallager @ 2022-06-23 15:13 UTC (permalink / raw)
  To: Bruno Haible; +Cc: Iain Sandoe, GCC Development

On Thu, Jun 23, 2022 at 12:25 AM Bruno Haible <bruno@clisp.org> wrote:
>
> Iain Sandoe wrote:
> > Yes (
> > # We can use an in-tree build of libintl.
> > if test -f  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh; then
> >   relative_builddir='ifelse([$1],,[${top_builddir}/..],[$1]/..)/gettext-runtime'
> >   .  ifelse([$1],,[../gettext-runtime],[$1])/uninstalled-config.sh
> > elif test -f  ifelse([$1],,[../intl],[$1])/config.intl; then
> >   .  ifelse([$1],,[../intl],[$1])/config.intl
> > fi
> > )
> > and it works ...
>
> Good!
>
> > … although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )
>
> You can get warnings if you _move_ the gettext-runtime directory so that it
> becomes a sibling directory of 'gcc'. You should *not* get warnings if you
> create a symlink, sibling of the 'gcc' directory, to the
> gettext-20220620/gettext-runtime/ directory.
>
> > FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
> > …  is there any reason that all platforms with non-’so’ suffixes would not work with that change?
>
> On macOS (with .dylib instead of .so) it would probably work.
>
> However, AIX and HP-UX will not work, because (as I understand it) if you want
> to have a binary, say cc1, which depends on libintl, then
>   - the cc1 that accesses /usr/local/lib/libintl.$suffix
> and
>   - the cc1 that accesses /home/user/build/gcc-snap/gettext-runtime/intl/.libs/libintl.$suffix
> must necessarily be different. You cannot just install the second one in
> public locations, because it will have the wrong shared library filename
> hardcoded into it. This is why on these systems, libtool has to rebuild
> executables during "make install".
>
> Anyway, you said that for GCC, the important case is to build libintl as a
> static (non-shared) library.
>
> > > There is also a GCC specific quirk, that I upstreamed into GNU gettext:
> > > https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b
> >
> > IMHO we need to fix this ^ in GCC config - since gettext-runtime accepts “—with-pic” we should amend the GCC configury to pass —with-pic [to GMP et. al. as well, currently to build in-tree with host-shared, needs a manual —with-pic on the configure too]
>
> Indeed, the option '--with-pic' (from libtool) has the same effect as
> '--enable-host-shared'. If you can arrange to pass '--with-pic' instead
> of '--enable-host-shared', I can revert the addition of the option
> '--enable-host-shared' in gettext-runtime/intl from two days ago.
>
> > I think that we now need to deal with the GCC-side of the configury …
> >
> > 1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)
>
> Are you aware that gettext.m4 already introduces the configure options
>   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
>   --without-libintl-prefix     don't search for libintl in includedir and libdir
> ?
>

N.B. that there's already at least one issue open about those flags
that I can think of OTTOMH; it's part of the reason I wanted to go
about updating GCC configury in the first place:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78251

> Bruno
>
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-23  6:51               ` Iain Sandoe
@ 2022-06-23 15:40                 ` Iain Sandoe
  2022-06-23 15:50                   ` Iain Sandoe
  0 siblings, 1 reply; 16+ messages in thread
From: Iain Sandoe @ 2022-06-23 15:40 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development



> On 23 Jun 2022, at 07:51, Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
> 
>> On 23 Jun 2022, at 05:24, Bruno Haible <bruno@clisp.org> wrote:
>> 
>> Iain Sandoe wrote:
> 
>>> … although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )
>> 
>> You can get warnings if you _move_ the gettext-runtime directory so that it
>> becomes a sibling directory of 'gcc'. You should *not* get warnings if you
>> create a symlink, sibling of the 'gcc' directory, to the
>> gettext-20220620/gettext-runtime/ directory.
> 
> I did symlink, and agree it should work - I’ll need to try and repeat when next I have some time.
>> 
>>> FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
>>> …  is there any reason that all platforms with non-’so’ suffixes would not work with that change?
>> 
>> On macOS (with .dylib instead of .so) it would probably work.
>> 
>> However, AIX and HP-UX will not work, because (as I understand it) if you want
>> to have a binary, say cc1, which depends on libintl, then
>> - the cc1 that accesses /usr/local/lib/libintl.$suffix
>> and
>> - the cc1 that accesses /home/user/build/gcc-snap/gettext-runtime/intl/.libs/libintl.$suffix
>> must necessarily be different. You cannot just install the second one in
>> public locations, because it will have the wrong shared library filename
>> hardcoded into it. This is why on these systems, libtool has to rebuild
>> executables during "make install".
> 
> Ah, actually a similar situation might apply to the macOS case, you would either need
> to build it “@rpath” and install the library in the exe’s dir or build and install it into
> ‘prefix’ (that puts the full pathname into the dylib, in a similar way to AIX / HP-UX).
> This is also requires a bit of juggling on macOS (I have patches in flight to make all
> the runtimes for GCC built with ‘@rpath’ and using embedded rpaths in exe) hopefully
> for GCC-13
> … so let’s quietly forget the shared case for now...
> 
>> Anyway, you said that for GCC, the important case is to build libintl as a
>> static (non-shared) library.
> 
> Yes, in a 1:1 replacement for ‘intl’ that’s the case, we can figure out shared stuff as a follow-on.
> 
>>> I think that we now need to deal with the GCC-side of the configury …
>>> 
>>> 1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)
>> 
>> Are you aware that gettext.m4 already introduces the configure options
>> --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
>> --without-libintl-prefix     don't search for libintl in includedir and libdir
> 
> Hmm - the following cases:
> a) there’s no gettext-runtime in the source tree and the user needs to configure —with-libintl-prefix= 
> b) there is a  gettext-runtime in the source tree and the user decides to configure —with-libintl-prefix= (which will be ignored if we take the way the other in-tree builds are handled as ’status quo’
> c) there is a  gettext-runtime in the source tree  and no —with-libintl-prefix= is given (we expect to pick up the in-tree build silently and automatically).
> 
> … in case (a) we’d need to arrange for the gettext macro to be called in configure, but I don’t think it will play nicely with gettext-sister .. so there’s some work needed here.
> in case (b) I’m not sure what will happen - will the configure for libintl just point the variables to the install suggested?

.. update on (b).
OK, so there are two issues I can see [let’s put the flags pollution issues to one side for now, since people sometimes forget that the configuration namespace is flat and overload save_CFLAGS et. al]

1. —with-libintl-prefix= is not going to work on macOS, when the prefix contains only a convenience lib (which is what I prefer for GCC).
  This is because the configure has no way to know that libintl.a depends on -framework CoreFoundation, AFAICS there’s nowhere it could even look - the info is not in the libtool lib (and that does not seem to get installed anyway for the snapshot) 
  I'd suppose that a shared library would work (since there are no hidden deps) .. 

AFAICT, ‘intl/‘ works OK with this (iff I manually add -framework CoreFoundation to the LDFLAGS) and LIBINTL gets set to the right line for using the installed variant.

2/ .. the current gettext-runtime snapshot does not work, I think because it assumes if we’re not using the in-tree case, then the lib must be coming from libc - which is not the case for most non-glibc clients (so it seems to ignore the —with… and populate the uninstalled-gettext.sh with the in-tree data anyway)

====

(we still need to deal with case (a) but case (b) could be fixable, perhaps at a cost of having to ‘know’ that CoreFoundation is needed on macOS .. perhaps similar cases on other platforms, perhaps not).

Iain

> case (c) works today.
> 
> cheers
> Iain
> 
> 
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: remove intl/ directory?
  2022-06-23 15:40                 ` Iain Sandoe
@ 2022-06-23 15:50                   ` Iain Sandoe
  0 siblings, 0 replies; 16+ messages in thread
From: Iain Sandoe @ 2022-06-23 15:50 UTC (permalink / raw)
  To: Bruno Haible; +Cc: GCC Development



> On 23 Jun 2022, at 16:40, Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
> 
> 
> 
>> On 23 Jun 2022, at 07:51, Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
>> 
>>> On 23 Jun 2022, at 05:24, Bruno Haible <bruno@clisp.org> wrote:
>>> 
>>> Iain Sandoe wrote:
>> 
>>>> … although now I see some configure warnings about not being able to access build-aux (which I do not recall seeing with the previous hack - but that could be just bad memory ;) )
>>> 
>>> You can get warnings if you _move_ the gettext-runtime directory so that it
>>> becomes a sibling directory of 'gcc'. You should *not* get warnings if you
>>> create a symlink, sibling of the 'gcc' directory, to the
>>> gettext-20220620/gettext-runtime/ directory.
>> 
>> I did symlink, and agree it should work - I’ll need to try and repeat when next I have some time.
>>> 
>>>> FWIW this following snippet would be just as broken on macOS as other noted platforms - it would need auto-foo-provided shared lib extension - or the equivalent to be used.
>>>> …  is there any reason that all platforms with non-’so’ suffixes would not work with that change?
>>> 
>>> On macOS (with .dylib instead of .so) it would probably work.
>>> 
>>> However, AIX and HP-UX will not work, because (as I understand it) if you want
>>> to have a binary, say cc1, which depends on libintl, then
>>> - the cc1 that accesses /usr/local/lib/libintl.$suffix
>>> and
>>> - the cc1 that accesses /home/user/build/gcc-snap/gettext-runtime/intl/.libs/libintl.$suffix
>>> must necessarily be different. You cannot just install the second one in
>>> public locations, because it will have the wrong shared library filename
>>> hardcoded into it. This is why on these systems, libtool has to rebuild
>>> executables during "make install".
>> 
>> Ah, actually a similar situation might apply to the macOS case, you would either need
>> to build it “@rpath” and install the library in the exe’s dir or build and install it into
>> ‘prefix’ (that puts the full pathname into the dylib, in a similar way to AIX / HP-UX).
>> This is also requires a bit of juggling on macOS (I have patches in flight to make all
>> the runtimes for GCC built with ‘@rpath’ and using embedded rpaths in exe) hopefully
>> for GCC-13
>> … so let’s quietly forget the shared case for now...
>> 
>>> Anyway, you said that for GCC, the important case is to build libintl as a
>>> static (non-shared) library.
>> 
>> Yes, in a 1:1 replacement for ‘intl’ that’s the case, we can figure out shared stuff as a follow-on.
>> 
>>>> I think that we now need to deal with the GCC-side of the configury …
>>>> 
>>>> 1) add logic [like GMP et. al.] to specify an external source of the library (when there is no-in-tree source present)
>>> 
>>> Are you aware that gettext.m4 already introduces the configure options
>>> --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
>>> --without-libintl-prefix     don't search for libintl in includedir and libdir
>> 
>> Hmm - the following cases:
>> a) there’s no gettext-runtime in the source tree and the user needs to configure —with-libintl-prefix= 
>> b) there is a  gettext-runtime in the source tree and the user decides to configure —with-libintl-prefix= (which will be ignored if we take the way the other in-tree builds are handled as ’status quo’
>> c) there is a  gettext-runtime in the source tree  and no —with-libintl-prefix= is given (we expect to pick up the in-tree build silently and automatically).
>> 
>> … in case (a) we’d need to arrange for the gettext macro to be called in configure, but I don’t think it will play nicely with gettext-sister .. so there’s some work needed here.
>> in case (b) I’m not sure what will happen - will the configure for libintl just point the variables to the install suggested?
> 
> .. update on (b).
> OK, so there are two issues I can see [let’s put the flags pollution issues to one side for now, since people sometimes forget that the configuration namespace is flat and overload save_CFLAGS et. al]
> 
> 1. —with-libintl-prefix= is not going to work on macOS, when the prefix contains only a convenience lib (which is what I prefer for GCC).
>  This is because the configure has no way to know that libintl.a depends on -framework CoreFoundation, AFAICS there’s nowhere it could even look - the info is not in the libtool lib (and that does not seem to get installed anyway for the snapshot) 
>  I'd suppose that a shared library would work (since there are no hidden deps) .. 
> 
> AFAICT, ‘intl/‘ works OK with this (iff I manually add -framework CoreFoundation to the LDFLAGS) and LIBINTL gets set to the right line for using the installed variant.

this ^ is actually inconsistent with the other deps .. as noted  below.
> 
> 2/ .. the current gettext-runtime snapshot does not work, I think because it assumes if we’re not using the in-tree case, then the lib must be coming from libc - which is not the case for most non-glibc clients (so it seems to ignore the —with… and populate the uninstalled-gettext.sh with the in-tree data anyway)

Hmm, brain not working right it seems //// … that ^ is the right behaviour (if we take GMP et al as the model) i.e. we ignore —with-xxxx-prefix IFF xxxx is present as an in-tree build.
> 
> ====
> 
> (we still need to deal with case (a)

this means using gettext macro or something custom for the case that there is no in-tree gettext-runtime (no doubt the framework issue could materialise there too),

> but case (b) could be fixable, perhaps at a cost of having to ‘know’ that CoreFoundation is needed on macOS .. perhaps similar cases on other platforms, perhaps not).
> 
> Iain
> 
>> case (c) works today.
>> 
>> cheers
>> Iain
>> 
>> 
>> 
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-06-23 15:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18 17:01 remove intl/ directory? Bruno Haible
2022-06-18 17:42 ` Iain Sandoe
2022-06-18 18:14   ` David Edelsohn
2022-06-19  0:53     ` Bruno Haible
2022-06-19  0:32   ` Bruno Haible
2022-06-19  8:40     ` Iain Sandoe
2022-06-19 20:15       ` Iain Sandoe
2022-06-21  2:05         ` Bruno Haible
2022-06-22 20:21           ` Iain Sandoe
2022-06-23  4:24             ` Bruno Haible
2022-06-23  6:51               ` Iain Sandoe
2022-06-23 15:40                 ` Iain Sandoe
2022-06-23 15:50                   ` Iain Sandoe
2022-06-23 15:13               ` Eric Gallager
2022-06-20 19:45 ` Eric Gallager
2022-06-21  2:09   ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).