From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 7/9] package/opencv3: fix CMAKE_CXX_FLAGS
Date: Sat, 15 Oct 2016 23:03:47 +0200 [thread overview]
Message-ID: <20161015210349.29432-8-s.martin49@gmail.com> (raw)
In-Reply-To: <20161015210349.29432-1-s.martin49@gmail.com>
From: Max Filippov <jcmvbkbc@gmail.com>
The commit 4904c4c "package/opencv3: use BR2_TOOLCHAIN_HAS_LIBATOMIC"
overrides CMAKE_CXX_FLAGS with the single -latomic, losing all ABI
CFLAGS that are passed there by default. This breaks build on xtensa
where ABI CFLAGS contain important code generation options.
Append $(TARGET_CXXFLAGS) to CMAKE_CXX_FLAGS along with -latomic.
Fixes:
http://autobuild.buildroot.net/results/7f1c96abd8fbb5b358a07100ab623316e9bb9dcd
http://autobuild.buildroot.net/results/e0c93d0f6d1da0d62d4dbba211a275bfe75e9645
http://autobuild.buildroot.net/results/53e7e4b4b6a7b48b8012799d7507f7594dbf01b2
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
changes v4->v5:
- none
changes v3->v4 [Samuel]:
- update A/R/T tags
---
package/opencv3/opencv3.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index 2529de9..10660a9 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -12,7 +12,7 @@ OPENCV3_LICENSE_FILES = LICENSE
# Uses __atomic_fetch_add_4
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-OPENCV3_CONF_OPTS += -DCMAKE_CXX_FLAGS="-latomic"
+OPENCV3_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
endif
# OpenCV component options
--
2.10.0
next prev parent reply other threads:[~2016-10-15 21:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-15 21:03 [Buildroot] [PATCH v5 0/9] Misc. CMake fixes Samuel Martin
2016-10-15 21:03 ` [Buildroot] [PATCH v5 1/9] package/pkg-cmake.mk: fix build type and optimization flags Samuel Martin
2016-10-15 22:14 ` Arnout Vandecappelle
2016-10-15 21:03 ` [Buildroot] [PATCH v5 2/9] package/pkg-cmake.mk: move CMAKE_BUILD_TYPE definition into toolchainfile.cmake Samuel Martin
2016-10-15 22:42 ` Arnout Vandecappelle
2016-10-15 21:03 ` [Buildroot] [PATCH v5 3/9] toolchainfile.cmake: set per-config appended {C, CXX}FLAGS Samuel Martin
2016-10-15 21:03 ` [Buildroot] [PATCH v5 4/9] package/gflags: include TARGET_CXXFLAGS to the overloaded CXXFLAGS Samuel Martin
2016-10-15 21:03 ` [Buildroot] [PATCH v5 5/9] package/gnuradio: include TARGET_CFLAGS to the overloaded CFLAGS Samuel Martin
2016-10-15 21:03 ` [Buildroot] [PATCH v5 6/9] package/libcec: include TARGET_{C, CXX}FLAGS to the overloaded {C, CXX}FLAGS Samuel Martin
2016-10-15 21:03 ` Samuel Martin [this message]
2016-10-15 21:03 ` [Buildroot] [PATCH v5 8/9] package/rpi-userland: include TARGET_CFLAGS to the overloaded CFLAGS Samuel Martin
2016-10-15 21:03 ` [Buildroot] [PATCH v5 9/9] toochainfile.cmake: rework the way Buildroot sets flags Samuel Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161015210349.29432-8-s.martin49@gmail.com \
--to=s.martin49@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox