aboutsummaryrefslogtreecommitdiffstats
path: root/fix-libtool-from-moving-options-after-libs
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2011-02-05 19:36:23 +0000
committerThomas Backlund <tmb@mageia.org>2011-02-05 19:36:23 +0000
commitacffc72f16c13a81f622f9353a5da40a35ebb5ee (patch)
tree78ba5ee52ec2b72caca4df8846ac6d31a533e4c0 /fix-libtool-from-moving-options-after-libs
parent9f5ce6a5be6bc9679ad32dd2a80e3a3eaada3cfd (diff)
downloadrpm-setup-acffc72f16c13a81f622f9353a5da40a35ebb5ee.tar
rpm-setup-acffc72f16c13a81f622f9353a5da40a35ebb5ee.tar.gz
rpm-setup-acffc72f16c13a81f622f9353a5da40a35ebb5ee.tar.bz2
rpm-setup-acffc72f16c13a81f622f9353a5da40a35ebb5ee.tar.xz
rpm-setup-acffc72f16c13a81f622f9353a5da40a35ebb5ee.zip
merge under/overlinking scripts from rpm-manbo-setup
Diffstat (limited to 'fix-libtool-from-moving-options-after-libs')
-rwxr-xr-xfix-libtool-from-moving-options-after-libs15
1 files changed, 15 insertions, 0 deletions
diff --git a/fix-libtool-from-moving-options-after-libs b/fix-libtool-from-moving-options-after-libs
new file mode 100755
index 0000000..e8db899
--- /dev/null
+++ b/fix-libtool-from-moving-options-after-libs
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+CONFIGURE_TOP="${1:-.}"
+if [ -e $CONFIGURE_TOP/configure ] && grep -q -F '$deplibs $compiler_flags' $CONFIGURE_TOP/configure; then
+ echo "Fixing libtool inside configure to pass -Wl,xxx options before libraries"
+
+ # a similar patch has been applied in libtool in libtool package (#47273)
+ # but this works even if autoreconf is not called
+
+ sed -i \
+ -e 's,$deplibs $compiler_flags,$compiler_flags $deplibs,' \
+ -e 's,$deplibs $postdep_objects $compiler_flags,$compiler_flags $deplibs $postdep_objects,' \
+ $CONFIGURE_TOP/configure
+fi
+