diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2017-12-28 13:53:00 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-02-01 07:32:04 -0800 |
commit | e8abea891199f077bd471d371a79d5f863a2f44a (patch) | |
tree | 354bd6cdbe41e8e19575f5c8470300233cbce223 /meta-oe/recipes-extended/leveldb/leveldb | |
parent | ed6ed8d6ffff188d1a42072f8248bf377b1b651b (diff) | |
download | meta-openembedded-e8abea891199f077bd471d371a79d5f863a2f44a.tar.gz |
leveldb: fix checking for SSE flag
The build_detect_platform-Check-for-__SSE4_2__.patch tries to use fgrep
with pipe to get the SSE flag. But actually it would fail with error:
fgrep: /tmp/leveldb_build_detect_platform-cxx.25886: No such file or
directory
That means it can not get the correct SSE flag.
We should make sure the fgrep command runs after g++ command has
finished and redirect the stdout and stderr to /dev/null to avoid make
error:
Makefile:18: *** missing separator. Stop.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit fa211625598c9cc2ef965bf95548d21930622aaa)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/leveldb/leveldb')
-rw-r--r-- | meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch b/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch index bbabf688d..8f93cb325 100644 --- a/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch +++ b/meta-oe/recipes-extended/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch | |||
@@ -19,14 +19,15 @@ Index: git/build_detect_platform | |||
19 | =================================================================== | 19 | =================================================================== |
20 | --- git.orig/build_detect_platform | 20 | --- git.orig/build_detect_platform |
21 | +++ git/build_detect_platform | 21 | +++ git/build_detect_platform |
22 | @@ -230,13 +230,12 @@ EOF | 22 | @@ -224,13 +224,13 @@ EOF |
23 | rm -f $CXXOUTPUT 2>/dev/null | 23 | rm -f $CXXOUTPUT 2>/dev/null |
24 | 24 | ||
25 | # Test if gcc SSE 4.2 is supported | 25 | # Test if gcc SSE 4.2 is supported |
26 | - $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF | 26 | - $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF |
27 | + $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null | fgrep __SSE4_2__ $CXXOUTPUT 2>/dev/null <<EOF | 27 | + $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null <<EOF |
28 | int main() {} | 28 | int main() {} |
29 | EOF | 29 | EOF |
30 | + eval fgrep __SSE4_2__ $CXXOUTPUT >/dev/null 2>&1 | ||
30 | if [ "$?" = 0 ]; then | 31 | if [ "$?" = 0 ]; then |
31 | PLATFORM_SSEFLAGS="-msse4.2" | 32 | PLATFORM_SSEFLAGS="-msse4.2" |
32 | fi | 33 | fi |