From 5282f537c9fe969e17a4a1796e51dde79fd85517 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 2 Aug 2014 17:55:51 -0700 Subject: [PATCH] systemd: work around broken configure test for -Wl,-fuse-ld=gold --- ...fuse-ld-gold-does-not-work-correctly.patch | 47 +++++++++++++++++++ ...-215-r10.ebuild => systemd-215-r11.ebuild} | 4 ++ .../sys-apps/systemd/systemd-9999.ebuild | 2 + 3 files changed, 53 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-215-r10.ebuild => systemd-215-r11.ebuild} (99%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch new file mode 100644 index 0000000000..c8d5a52ae3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch @@ -0,0 +1,47 @@ +From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +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 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r11.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r11.ebuild index a1feadf44f..51ea10f3e3 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r10.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r11.ebuild @@ -20,6 +20,7 @@ EGIT_BRANCH=v${PV%%.*}-stable inherit git-r3 fi +AUTOTOOLS_AUTORECONF=yes AUTOTOOLS_PRUNE_LIBTOOL_FILES=all PYTHON_COMPAT=( python{2_7,3_2,3_3} ) inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \ @@ -116,6 +117,9 @@ fi # backports from master 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 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild index 1db1d29f58..7d2351bc22 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild @@ -110,6 +110,8 @@ if [[ ${PV} == *9999 ]]; then echo 'EXTRA_DIST =' > docs/gtk-doc.make fi fi + # remove -Wl,-fuse-ld=gold + epatch "${FILESDIR}"/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch # Bug 463376 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die