mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-20 05:51:18 +02:00
systemd: work around broken configure test for -Wl,-fuse-ld=gold
This commit is contained in:
parent
f3217852ed
commit
5282f537c9
@ -0,0 +1,47 @@
|
|||||||
|
From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Marineau <michael.marineau@coreos.com>
|
||||||
|
Date: Sat, 2 Aug 2014 17:45:00 -0700
|
||||||
|
Subject: [PATCH] hack: testing -Wl,-fuse-ld=gold does not work correctly on
|
||||||
|
hardened
|
||||||
|
|
||||||
|
Not sure why this test falsely passes with the hardened compiler when it
|
||||||
|
normally will report the following error:
|
||||||
|
|
||||||
|
ld: -f may not be used without -shared
|
||||||
|
|
||||||
|
But apparently the default options hardened uses makes interpreting the
|
||||||
|
option as -f valid usage. For reference the option is:
|
||||||
|
|
||||||
|
-f name
|
||||||
|
--auxiliary=name
|
||||||
|
When creating an ELF shared object, set the internal DT_AUXILIARY
|
||||||
|
field to the specified name. This tells the dynamic linker that
|
||||||
|
the symbol table of the shared object should be used as an
|
||||||
|
auxiliary filter on the symbol table of the shared object name.
|
||||||
|
|
||||||
|
This in turn causes a stray library to show up in ldd output:
|
||||||
|
|
||||||
|
use-ld=gold => not found
|
||||||
|
|
||||||
|
Which seems mostly harmless but does cause some confusion.
|
||||||
|
---
|
||||||
|
configure.ac | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index ae88382..85966b9 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -216,8 +216,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
|
||||||
|
-Wl,--gc-sections \
|
||||||
|
-Wl,-z,relro \
|
||||||
|
-Wl,-z,now \
|
||||||
|
- -pie \
|
||||||
|
- -Wl,-fuse-ld=gold])
|
||||||
|
+ -pie])
|
||||||
|
AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(pid_t)
|
||||||
|
--
|
||||||
|
1.8.5.5
|
||||||
|
|
@ -20,6 +20,7 @@ EGIT_BRANCH=v${PV%%.*}-stable
|
|||||||
inherit git-r3
|
inherit git-r3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AUTOTOOLS_AUTORECONF=yes
|
||||||
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
|
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
|
||||||
PYTHON_COMPAT=( python{2_7,3_2,3_3} )
|
PYTHON_COMPAT=( python{2_7,3_2,3_3} )
|
||||||
inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \
|
inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \
|
||||||
@ -116,6 +117,9 @@ fi
|
|||||||
# backports from master
|
# backports from master
|
||||||
epatch "${FILESDIR}"/215-*.patch
|
epatch "${FILESDIR}"/215-*.patch
|
||||||
|
|
||||||
|
# remove -Wl,-fuse-ld=gold
|
||||||
|
epatch "${FILESDIR}"/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch
|
||||||
|
|
||||||
# Bug 463376
|
# Bug 463376
|
||||||
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
||||||
|
|
@ -110,6 +110,8 @@ if [[ ${PV} == *9999 ]]; then
|
|||||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# remove -Wl,-fuse-ld=gold
|
||||||
|
epatch "${FILESDIR}"/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch
|
||||||
|
|
||||||
# Bug 463376
|
# Bug 463376
|
||||||
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
||||||
|
Loading…
x
Reference in New Issue
Block a user