aboutsummaryrefslogtreecommitdiff
path: root/libgloss/aarch64
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-23 23:24:52 -0500
committerMike Frysinger <vapier@gentoo.org>2022-02-01 23:07:11 -0500
commit8622002ffc71ff5777a7221232ba02c7a7e7d004 (patch)
tree7733e63e5264de6215e27a5dc937a6bbabd5ba34 /libgloss/aarch64
parent30f244155b8e82aa948ddcb8f2350654fc1adb92 (diff)
downloadnewlib-8622002ffc71ff5777a7221232ba02c7a7e7d004.zip
newlib-8622002ffc71ff5777a7221232ba02c7a7e7d004.tar.gz
newlib-8622002ffc71ff5777a7221232ba02c7a7e7d004.tar.bz2
libgloss: move to ../config/multi.m4 for multilib logic
The current libgloss multilib logic is almost exactly the same as the config/multi.m4, and the differences should be minor, so switch over to that to delete custom logic on ourside. The insertions here look larger and that's because none of the scripts were declaring --enable-multilib explicitly even though they checked the flag and changed behavior.
Diffstat (limited to 'libgloss/aarch64')
-rw-r--r--libgloss/aarch64/aclocal.m41
-rwxr-xr-xlibgloss/aarch64/configure69
-rw-r--r--libgloss/aarch64/configure.ac11
-rw-r--r--libgloss/aarch64/cpu-init/aclocal.m41
-rwxr-xr-xlibgloss/aarch64/cpu-init/configure69
-rw-r--r--libgloss/aarch64/cpu-init/configure.ac11
6 files changed, 134 insertions, 28 deletions
diff --git a/libgloss/aarch64/aclocal.m4 b/libgloss/aarch64/aclocal.m4
index 24271f3..fab8217 100644
--- a/libgloss/aarch64/aclocal.m4
+++ b/libgloss/aarch64/aclocal.m4
@@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
m4_include([../../config/depstand.m4])
m4_include([../../config/lead-dot.m4])
+m4_include([../../config/multi.m4])
m4_include([../../config/override.m4])
m4_include([../acinclude.m4])
diff --git a/libgloss/aarch64/configure b/libgloss/aarch64/configure
index 7238627..969a004 100755
--- a/libgloss/aarch64/configure
+++ b/libgloss/aarch64/configure
@@ -585,6 +585,7 @@ ac_unique_file="crt0.S"
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
+multi_basedir
subdirs
host_makefile_frag_path
objtype
@@ -663,6 +664,7 @@ ac_subst_files='host_makefile_frag'
ac_user_opts='
enable_option_checking
enable_dependency_tracking
+enable_multilib
'
ac_precious_vars='build_alias
host_alias
@@ -1290,6 +1292,7 @@ Optional Features:
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
+ --enable-multilib build many library versions (default)
Some influential environment variables:
CCAS assembler compiler command (defaults to CC)
@@ -2561,6 +2564,44 @@ subdirs="$subdirs cpu-init"
fi
+# Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../../.."
+ else
+ multi_basedir="$srcdir/$with_multisrctop../.."
+ fi
+else
+ multi_basedir="$srcdir/../.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -3277,12 +3318,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-srcdir=${srcdir}
-target=${target}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="${ac_configure_args} --enable-multilib"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GCJ="$GCJ"
_ACEOF
@@ -3293,6 +3342,7 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -3849,7 +3899,14 @@ $as_echo X"$file" |
done
}
;;
- "Makefile":F) . ${srcdir}/../../config-ml.in ;;
+ "default-1":C)
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+ ac_file=Makefile . ${multi_basedir}/config-ml.in
+ ;;
+esac ;;
esac
done # for ac_tag
diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac
index 303e513..b26f55e 100644
--- a/libgloss/aarch64/configure.ac
+++ b/libgloss/aarch64/configure.ac
@@ -43,12 +43,7 @@ if test -d "${srcdir}/cpu-init"; then
AC_SUBST(subdirs)
fi
-AC_CONFIG_FILES(Makefile,
-. ${srcdir}/../../config-ml.in,
-srcdir=${srcdir}
-target=${target}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="${ac_configure_args} --enable-multilib"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-)
+AM_ENABLE_MULTILIB(, ../..)
+
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/libgloss/aarch64/cpu-init/aclocal.m4 b/libgloss/aarch64/cpu-init/aclocal.m4
index 5ca7019..ee5abac 100644
--- a/libgloss/aarch64/cpu-init/aclocal.m4
+++ b/libgloss/aarch64/cpu-init/aclocal.m4
@@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
m4_include([../../../config/depstand.m4])
m4_include([../../../config/lead-dot.m4])
+m4_include([../../../config/multi.m4])
m4_include([../../../config/override.m4])
m4_include([../../acinclude.m4])
diff --git a/libgloss/aarch64/cpu-init/configure b/libgloss/aarch64/cpu-init/configure
index c815971..7b03053 100755
--- a/libgloss/aarch64/cpu-init/configure
+++ b/libgloss/aarch64/cpu-init/configure
@@ -584,6 +584,7 @@ PACKAGE_URL=
ac_unique_file="Makefile.in"
ac_subst_vars='LTLIBOBJS
LIBOBJS
+multi_basedir
host_makefile_frag_path
CCASFLAGS
CCAS
@@ -660,6 +661,7 @@ ac_subst_files='host_makefile_frag'
ac_user_opts='
enable_option_checking
enable_dependency_tracking
+enable_multilib
'
ac_precious_vars='build_alias
host_alias
@@ -1287,6 +1289,7 @@ Optional Features:
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
+ --enable-multilib build many library versions (default)
Some influential environment variables:
CCAS assembler compiler command (defaults to CC)
@@ -2540,6 +2543,44 @@ host_makefile_frag_path=$host_makefile_frag
+# Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../../../.."
+ else
+ multi_basedir="$srcdir/$with_multisrctop../../.."
+ fi
+else
+ multi_basedir="$srcdir/../../.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -3256,12 +3297,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-srcdir=${srcdir}
-target=${target}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="${ac_configure_args} --enable-multilib"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GCJ="$GCJ"
_ACEOF
@@ -3272,6 +3321,7 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -3828,7 +3878,14 @@ $as_echo X"$file" |
done
}
;;
- "Makefile":F) . ${srcdir}/../../../config-ml.in ;;
+ "default-1":C)
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+ ac_file=Makefile . ${multi_basedir}/config-ml.in
+ ;;
+esac ;;
esac
done # for ac_tag
diff --git a/libgloss/aarch64/cpu-init/configure.ac b/libgloss/aarch64/cpu-init/configure.ac
index 91aa221..91f9c70 100644
--- a/libgloss/aarch64/cpu-init/configure.ac
+++ b/libgloss/aarch64/cpu-init/configure.ac
@@ -28,12 +28,7 @@ host_makefile_frag_path=$host_makefile_frag
AC_SUBST(host_makefile_frag_path)
AC_SUBST_FILE(host_makefile_frag)
-AC_CONFIG_FILES(Makefile,
-. ${srcdir}/../../../config-ml.in,
-srcdir=${srcdir}
-target=${target}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="${ac_configure_args} --enable-multilib"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-)
+AM_ENABLE_MULTILIB(, ../../..)
+
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT