diff options
author | Mingli Yu <Mingli.Yu@windriver.com> | 2017-02-06 11:41:00 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-02-13 18:43:30 +0100 |
commit | 3527257c137d12fd10d7e56270d97834de75bb08 (patch) | |
tree | 5814d5bd1386df538bd39ffacae955afeca89441 /meta-oe/recipes-support/libatasmart | |
parent | 2ede2eb6e73ef2118f138b75663e61689b57de3e (diff) | |
download | meta-openembedded-3527257c137d12fd10d7e56270d97834de75bb08.tar.gz |
libatasmart: unify the complier and CFLAGS for host build
* When build libatasmart, we need first build strpool in host
env. To build strpool, the compiler is host compiler, but
the CFLAGS and LDFLAGS are for cross-compiler, so unify them
to fix below error.
| make -C strpool strpool
| make[1]: Entering directory '../libatasmart/0.19-r0/build/strpool'
| gcc -DHAVE_CONFIG_H -I. -I../../git/strpool -I.. -isystem../build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -O2 -pipe -g -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -c -o strpool.o `test -f '../strpool.c' || echo '../../git/strpool/'`../strpool.c
| gcc: error: unrecognized command line option ‘-fstack-protector-strong’
| make[1]: *** [Makefile:404: strpool.o] Error 1
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/libatasmart')
-rw-r--r-- | meta-oe/recipes-support/libatasmart/files/0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb | 4 |
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/libatasmart/files/0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch b/meta-oe/recipes-support/libatasmart/files/0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch new file mode 100644 index 000000000..8c867acca --- /dev/null +++ b/meta-oe/recipes-support/libatasmart/files/0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 75c1d3b8667328d874590a5321eb244256b7d932 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Wed, 18 Jan 2017 07:35:58 +0000 | ||
4 | Subject: [PATCH] Makefile.am: add CFLAGS and LDFLAGS definiton | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | * When build libatasmart, we need first build strpool in host | ||
10 | env. To build strpool, the compiler is host compiler, but | ||
11 | the CFLAGS and LDFLAGS are for cross-compiler, so unify them | ||
12 | to fix below error. | ||
13 | | make -C strpool strpool | ||
14 | | make[1]: Entering directory '../libatasmart/0.19-r0/build/strpool' | ||
15 | | gcc -DHAVE_CONFIG_H -I. -I../../git/strpool -I.. -isystem../build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -O2 -pipe -g -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -c -o strpool.o `test -f '../strpool.c' || echo '../../git/strpool/'`../strpool.c | ||
16 | | gcc: error: unrecognized command line option ‘-fstack-protector-strong’ | ||
17 | | make[1]: *** [Makefile:404: strpool.o] Error 1 | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | |||
21 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
22 | --- | ||
23 | strpool/Makefile.am | 2 ++ | ||
24 | 1 file changed, 2 insertions(+) | ||
25 | |||
26 | diff --git a/strpool/Makefile.am b/strpool/Makefile.am | ||
27 | index b041cea..013fcd3 100644 | ||
28 | --- a/strpool/Makefile.am | ||
29 | +++ b/strpool/Makefile.am | ||
30 | @@ -17,6 +17,8 @@ | ||
31 | # <http://www.gnu.org/licenses/>. | ||
32 | |||
33 | CC = @CC_FOR_BUILD@ | ||
34 | +CFLAGS = @BUILD_CFLAGS@ | ||
35 | +LDFLAGS = @BUILD_LDFLAGS@ | ||
36 | AM_CFLAGS = @BUILD_CFLAGS@ | ||
37 | AM_LDFLAGS = @BUILD_LDFLAGS@ | ||
38 | |||
39 | -- | ||
40 | 2.11.0 | ||
41 | |||
diff --git a/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb b/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb index 16657b4b1..4cfb73293 100644 --- a/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb +++ b/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb | |||
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1" | |||
5 | DEPENDS = "udev" | 5 | DEPENDS = "udev" |
6 | 6 | ||
7 | SRCREV = "de6258940960443038b4c1651dfda3620075e870" | 7 | SRCREV = "de6258940960443038b4c1651dfda3620075e870" |
8 | SRC_URI = "git://git.0pointer.de/libatasmart.git" | 8 | SRC_URI = "git://git.0pointer.de/libatasmart.git \ |
9 | file://0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch \ | ||
10 | " | ||
9 | 11 | ||
10 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
11 | 13 | ||