diff options
author | Mingli Yu <Mingli.Yu@windriver.com> | 2018-06-15 17:28:01 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-15 17:56:24 +0100 |
commit | 834b24d507fae83bd0c377258d3c766073d7dd73 (patch) | |
tree | 2345098d76bda9f94c2ad507197b6693a8efc2f1 /meta/recipes-extended/ltp | |
parent | 073dbcedf528ba817f828cc9d0a604a4c8c99927 (diff) | |
download | poky-834b24d507fae83bd0c377258d3c766073d7dd73.tar.gz |
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.
(From OE-Core rev: 3084ff86d61b54011e0647ee17cbba521bafc9df)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp')
-rw-r--r-- | meta/recipes-extended/ltp/ltp_20180515.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp_20180515.bb b/meta/recipes-extended/ltp/ltp_20180515.bb index b07c1b9268..21ff49830a 100644 --- a/meta/recipes-extended/ltp/ltp_20180515.bb +++ b/meta/recipes-extended/ltp/ltp_20180515.bb | |||
@@ -19,6 +19,13 @@ LIC_FILES_CHKSUM = "\ | |||
19 | DEPENDS = "attr libaio libcap acl openssl zip-native" | 19 | DEPENDS = "attr libaio libcap acl openssl zip-native" |
20 | DEPENDS_append_libc-musl = " fts " | 20 | DEPENDS_append_libc-musl = " fts " |
21 | EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " | 21 | EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " |
22 | |||
23 | # since ltp contains x86-64 assembler which uses the frame-pointer register, | ||
24 | # set -fomit-frame-pointer x86-64 to handle cases where optimisation | ||
25 | # is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer | ||
26 | # earlier in CFLAGS, etc. | ||
27 | CFLAGS_append_x86-64 = " -fomit-frame-pointer" | ||
28 | |||
22 | CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" | 29 | CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" |
23 | CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" | 30 | CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" |
24 | SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" | 31 | SRCREV = "96cbf48313afa65ef4d693d3441cbfd60a8d9b27" |