diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-02-04 01:17:54 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-02-04 19:33:29 -0500 |
commit | 67c600b99545390c9ebaf96a84f47c3614e492ce (patch) | |
tree | 83cf6e07f573946fa817e5233bcafc9547809457 /libgloss/arm | |
parent | 899cf3c9529d21e56fb062324c0396d51a3566e6 (diff) | |
download | newlib-67c600b99545390c9ebaf96a84f47c3614e492ce.zip newlib-67c600b99545390c9ebaf96a84f47c3614e492ce.tar.gz newlib-67c600b99545390c9ebaf96a84f47c3614e492ce.tar.bz2 |
libgloss: restore multilib settings in subdir makefiles
Commit 754f8def0dfeeb43afa5a96ad1971fd0ef02c419 ("libgloss: merge stub
arch configure scripts up a level") had an unintended side-effect: the
MULTI* variables in the Makefiles no longer get rewritten at configure
time in the subdirs. Only the top-level Makefile still is. This is
because the configure integration of multilib (both the way libgloss
did it manually and the way AM_ENABLE_MULTILIB does it) only rewrites
"Makefile".
We could try propagating the MULTI* variables from libgloss/Makefile
down via FLAGS_TO_PASS, but this runs into a limitation: the multilib
logic uses this variable to switch from libgloss/ to each multilib
libgloss/, and libgloss uses this variable to enter subdirectories.
The latter we want, but the former ends up overridding the Makefile
environment. We could side-step that with some GNU Make directives,
but it feels like we're getting a bit too deep down the rabbit hole.
Instead, let's call config-ml.in ourselves for each subdir Makefile
that the top-level configure generates. This restores the previous
behavior and should be less risky in general.
This logic should be unnecessary when/if we switch libgloss over to
a non-recursive Automake build (since all build+install settings are
in the single libgloss/Makefile), but it'll be a while before we can
land that rework, so let's fix this up now.
Diffstat (limited to 'libgloss/arm')
-rwxr-xr-x | libgloss/arm/configure | 2 | ||||
-rw-r--r-- | libgloss/arm/configure.ac | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libgloss/arm/configure b/libgloss/arm/configure index 8e3866b..84878af 100755 --- a/libgloss/arm/configure +++ b/libgloss/arm/configure @@ -3926,6 +3926,8 @@ $as_echo X"$file" | done } ;; + "cpu-init/Makefile":F) ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in + ;; "default-1":C) # Only add multilib support code if we just rebuilt the top-level # Makefile. diff --git a/libgloss/arm/configure.ac b/libgloss/arm/configure.ac index 2b98b54..3d7ba7d 100644 --- a/libgloss/arm/configure.ac +++ b/libgloss/arm/configure.ac @@ -62,7 +62,9 @@ AC_SUBST_FILE(host_makefile_frag) # Configure cpu init plug-ins if test -d "${srcdir}/cpu-init"; then subdirs="${subdirs} cpu-init" - AC_CONFIG_FILES([cpu-init/Makefile]) + AC_CONFIG_FILES([cpu-init/Makefile], [dnl + ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in + ]) AC_SUBST(subdirs) fi |