[oe-commits] [openembedded-core] 03/14: gcc-6: Add fix for missing no-PIE flags

git at git.openembedded.org git at git.openembedded.org
Sun Mar 11 04:36:09 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch morty-next
in repository openembedded-core.

commit e54f26a0dbfc8de22ce8326ac77d1097d13f6e2c
Author: Stephen Arnold <stephen.arnold42 at gmail.com>
AuthorDate: Sun Feb 12 18:25:27 2017 -0800

    gcc-6: Add fix for missing no-PIE flags
    
    Fixes build on hardened PAX host with gcc-5 (linker error on relocs).
    Completes no-PIE config by adding to ALL_* flags variables.
    Borrowed from Gentoo gcc patches, tested on 2 hardened amd64 hosts.
    
    Upstream-Status: Inappropriate [configuration]
    
    Commited by: Gentoo Toolchain Project <toolchain at gentoo.org>
    (From OE-Core rev: c178791cd78d5a9ebc4d7b7790e647a9bafe9cf2)
    
    Signed-off-by: Stephen Arnold <stephen.arnold42 at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    (cherry picked from commit fcb236ea7cd1ac052719187fefed60ebf1a30ac8)
---
 meta/recipes-devtools/gcc/gcc-6.3.inc              |  1 +
 .../gcc/gcc-6.3/0054_all_nopie-all-flags.patch     | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc
index 7cf25ab..4f04c01 100644
--- a/meta/recipes-devtools/gcc/gcc-6.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.3.inc
@@ -79,6 +79,7 @@ SRC_URI = "\
            file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
            file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
            file://0048-sync-gcc-stddef.h-with-musl.patch \
+           file://0054_all_nopie-all-flags.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0054_all_nopie-all-flags.patch b/meta/recipes-devtools/gcc/gcc-6.3/0054_all_nopie-all-flags.patch
new file mode 100644
index 0000000..73ab950
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.3/0054_all_nopie-all-flags.patch
@@ -0,0 +1,22 @@
+Need to pass NO_PIE_CFLAGS to ALL_* so gcc doesn't fail when
+we compile it with older gcc and pie.
+
+Upstream-Status: Inappropriate [configuration]
+
+Maintained by: Gentoo Toolchain Project <toolchain at gentoo.org>
+Signed-off-by: Stephen Arnold <stephen.arnold42 at gmail.com>
+
+--- a/gcc/Makefile.in	2015-06-25 19:18:12.000000000 +0200
++++ b/gcc/Makefile.in	2016-04-22 00:12:54.029178860 +0200
+@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
+ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
+
+ # This is the variable to use when using $(COMPILER).
+-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
++ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+
+ # This is the variable to use when using $(LINKER).
+-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
++ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+
+ # Build and host support libraries.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list