From 3cb81eddcc5e7b5080810d526a3e9f24c5e50b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Mon, 1 Jun 2020 22:29:58 +0300 Subject: build.macros: add _configure_gnuconfig_hack macro based on one from Fedora to update config.{guess,sub} By default _configure_gnuconfig_hack is set to 1 and thus enabled. --- build.macros.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.macros.in b/build.macros.in index 7a15019..b9a0143 100644 --- a/build.macros.in +++ b/build.macros.in @@ -213,9 +213,17 @@ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%o %__fix_libtool_from_moving_options_after_libs @RPMVENDORDIR@/fix-libtool-from-moving-options-after-libs %__fix_dlsearch_path_in_libtool_for_multilib @RPMVENDORDIR@/fix-dlsearch-path-in-libtool-for-multilib +# Update config.{guess,sub} +%_configure_gnuconfig_hack 1 + %before_configure \ %set_build_flags \ CONFIGURE_TOP="${CONFIGURE_TOP:-.}"; \ + if [ "%_configure_gnuconfig_hack" = "1" ]; then \ + for i in $(find ${CONFIGURE_TOP} -name config.guess -o -name config.sub); do \ + [ -f %{_rpmconfigdir}/%{_real_vendor}/$(basename $i) ] && cp -af %{_rpmconfigdir}/%{_real_vendor}/$(basename $i) $i; \ + done; \ + fi; \ %{?!_disable_ld_as_needed:@RPMVENDORDIR@/force-as-needed-for-shared-lib-in-libtool ;} \ %{?!_disable_ld_no_undefined:@RPMVENDORDIR@/drop-ld-no-undefined-for-shared-lib-modules-in-libtool ;} \ %{__fix_libtool_ltmain_from_overlinking} ; \ -- cgit v1.2.1