[oe-commits] [meta-openembedded] 27/42: leveldb: fix checking for SSE flag
git at git.openembedded.org
git at git.openembedded.org
Sun Feb 4 10:09:59 UTC 2018
This is an automated email from the git hooks/post-receive script.
armin_kuster pushed a commit to branch rocko-next
in repository meta-openembedded.
commit df66128a8ae428b8f4f90b0958232917edb6e160
Author: Yi Zhao <yi.zhao at windriver.com>
AuthorDate: Thu Dec 28 13:53:00 2017 +0800
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 at windriver.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
(cherry picked from commit fa211625598c9cc2ef965bf95548d21930622aaa)
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
.../leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch | 5 +++--
1 file 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 bbabf68..8f93cb3 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
===================================================================
--- git.orig/build_detect_platform
+++ git/build_detect_platform
-@@ -230,13 +230,12 @@ EOF
+@@ -224,13 +224,13 @@ EOF
rm -f $CXXOUTPUT 2>/dev/null
# Test if gcc SSE 4.2 is supported
- $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF
-+ $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null | fgrep __SSE4_2__ $CXXOUTPUT 2>/dev/null <<EOF
++ $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null <<EOF
int main() {}
EOF
++ eval fgrep __SSE4_2__ $CXXOUTPUT >/dev/null 2>&1
if [ "$?" = 0 ]; then
PLATFORM_SSEFLAGS="-msse4.2"
fi
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list