summaryrefslogtreecommitdiff
path: root/project/config/cfgfini.sh
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-10 10:48:36 +0000
committermidipix <writeonce@midipix.org>2021-06-10 10:48:36 +0000
commitf3cd938b0b881f78ff395f8c1c5d49f843e18cf4 (patch)
treee316785ce32706cb110b076f4a596e008c9771bb /project/config/cfgfini.sh
parentc167238026ef7cea89c03c6108e0979ade0b6dfc (diff)
downloadslibtool-f3cd938b0b881f78ff395f8c1c5d49f843e18cf4.tar.bz2
slibtool-f3cd938b0b881f78ff395f8c1c5d49f843e18cf4.tar.xz
toolchain integration: ensure accuracy of slibtool's --dumpmachine output.
Diffstat (limited to 'project/config/cfgfini.sh')
-rw-r--r--project/config/cfgfini.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/project/config/cfgfini.sh b/project/config/cfgfini.sh
new file mode 100644
index 0000000..fb8bd05
--- /dev/null
+++ b/project/config/cfgfini.sh
@@ -0,0 +1,34 @@
+# cfgfini.sh: require slibtool's --dumpmachine output to be
+# both accurate and complete also during the
+# toolchain's initial bootstrapping phase.
+# invoked from within the project-agnostic configure script.
+
+# this file is covered by COPYING.SLIBTOOL.
+
+slibtool_cfgfini_error_msg()
+{
+ printf '%s\n' "$@" >&2
+ printf '%s\n' "$@" >&3
+}
+
+slibtool_cfgfini()
+{
+ if [ "${mb_cchost_set:-}" = 'yes' ]; then
+ return 0;
+
+ elif [ -n "$ccenv_host_dumpmachine_switch" ]; then
+ return 0;
+ fi
+
+ slibtool_cfgfini_error_msg
+ slibtool_cfgfini_error_msg "$mb_package: the host compiler, \`$ccenv_host_cc\`, does not provide a -dumpmachine switch."
+ slibtool_cfgfini_error_msg "$mb_package: please specify the host manually either by passing the --cchost argument to"
+ slibtool_cfgfini_error_msg " $mb_package's configure script, or by setting the CCHOST environment variable."
+ slibtool_cfgfini_error_msg "$mb_package: this requirement aims to ensure a complete and accurate \`slibtool --dumpmachine\`"
+ slibtool_cfgfini_error_msg " output also during the toolchain's initial bootstrapping phase."
+ slibtool_cfgfini_error_msg
+
+ config_failure
+}
+
+slibtool_cfgfini