diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-12-04 09:01:44 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-12-14 20:17:23 +0300 |
commit | 37a0e4ddff58c0120cc5cfef104b60d0e180638c (patch) | |
tree | 1628857a2eb33ab517ba93d6a3ca25e55bd3e628 /import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch | |
parent | 3c4c45d1e9a2324191a8640b22df1b71f15f3037 (diff) | |
download | openbmc-37a0e4ddff58c0120cc5cfef104b60d0e180638c.tar.xz |
Squashed 'import-layers/yocto-poky/' changes from dc8508f6099..67491b0c104
Yocto 2.2.2 (Morty)
Change-Id: Id9a452e28940d9f166957de243d9cb1d8818704e
git-subtree-dir: import-layers/yocto-poky
git-subtree-split: 67491b0c104101bb9f366d697edd23c895be4302
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch new file mode 100644 index 000000000..ccdbee215 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch @@ -0,0 +1,45 @@ +From 6186bcf1bcaaa0f16e79339e07c64c841d4d957d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 2 Dec 2016 20:52:40 +0200 +Subject: [PATCH] Enforce -no-pie, if the compiler supports it. + +Add a -no-pie as recent (2 Dec 2016) Debian testing compiler +seems to default to enabling PIE when linking. See +https://wiki.ubuntu.com/SecurityTeam/PIE + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + acinclude.m4 | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 19200b0..a713923 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -416,7 +416,7 @@ int main() { + + [# `$CC -c -o ...' might not be portable. But, oh, well... Is calling + # `ac_compile' like this correct, after all? +-if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then] ++if eval "$ac_compile -S -o conftest.s" 2> /dev/null && eval "$CC -dumpspecs 2>/dev/null | grep -e no-pie" ; then] + AC_MSG_RESULT([yes]) + [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? + rm -f conftest.s +diff --git a/configure.ac b/configure.ac +index df20991..506c6b4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -603,7 +603,7 @@ grub_CHECK_PIE + [# Need that, because some distributions ship compilers that include + # `-fPIE' in the default specs. + if [ x"$pie_possible" = xyes ]; then +- TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE" ++ TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -no-pie" + fi] + + # Position independent executable. +-- +2.10.2 + |