[oe-commits] [openembedded-core] 01/44: ltp: set -fomit-frame-pointer explicitly for x86-64

git at git.openembedded.org git at git.openembedded.org
Fri Jun 15 10:17:19 UTC 2018


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

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

commit 3084ff86d61b54011e0647ee17cbba521bafc9df
Author: Mingli Yu <Mingli.Yu at windriver.com>
AuthorDate: Fri Jun 15 17:28:01 2018 +0800

    ltp: set -fomit-frame-pointer explicitly for x86-64
    
    Since ltp contains x86-64 assembler which uses the
    frame-pointer register, it will trigger below error
    when build ltp with -fno-omit-frame-pointer on
    x86-64.
    | cve-2015-3290.c: In function 'child_thread':
    | cve-2015-3290.c:416:1: error: bp cannot be used in asm here
    
    And there is also some comment as below in the source
    file ltp/20180515-r0/git/testcases/cve/cve-2015-3290.c
    * Build with -O2.  Don't use -fno-omit-frame-pointer.
    
    So explicitly set -fomit-frame-pointer on x86-64 for
    compiler to fix the above build error.
    
    Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-extended/ltp/ltp_20180515.bb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb b/meta/recipes-extended/ltp/ltp_20180515.bb
index b07c1b9..21ff498 100644
--- a/meta/recipes-extended/ltp/ltp_20180515.bb
+++ b/meta/recipes-extended/ltp/ltp_20180515.bb
@@ -19,6 +19,13 @@ LIC_FILES_CHKSUM = "\
 DEPENDS = "attr libaio libcap acl openssl zip-native"
 DEPENDS_append_libc-musl = " fts "
 EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+
+# since ltp contains x86-64 assembler which uses the frame-pointer register,
+# set -fomit-frame-pointer x86-64 to handle cases where optimisation
+# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer
+# earlier in CFLAGS, etc.
+CFLAGS_append_x86-64 = " -fomit-frame-pointer"
+
 CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
 CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
 SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27"

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


More information about the Openembedded-commits mailing list