From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages
Date: Sun, 14 Sep 2014 18:27:35 +0200 [thread overview]
Message-ID: <20140914162735.GA21222@free.fr> (raw)
In-Reply-To: <1408653920-18954-3-git-send-email-s.martin49@gmail.com>
Samuel, All,
On 2014-08-21 22:45 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
As I am not a cmake expert, I'd like a bit more explanations in the
commit log.
What puzzles me is that, for the target case, these flags are passed via
support/misc/toolchainfile.cmake.in, while for the host, we pass them on
the command line. This is not consistent.
Why don't we also use a host.cmake.in file like we have for the target?
Note that us having support/misc/toolchainfile.cmake.in does not even
help for building a cmake package outside of Buildroot (but still using
our toolchain), since the user may forget to define CMAKE_TOOLCHAIN_FILE
when calling cmake on his own.
Note: I know you have a good answer, but I'm a bit lost as to all those
special-casing in cmake, which makes reviewing a bit difficult, and a
bit of comments in the commit log (a pointer to the cmake doc would be
enough!) would make it easier.
Regards,
Yann E. MORIN.
> ---
> changes v1 -> v2:
> - no change
> ---
> package/pkg-cmake.mk | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index f5aefae..3655751 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -86,6 +86,9 @@ define $(2)_CONFIGURE_CMDS
> -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
> -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
> -DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \
> + -DCMAKE_C_FLAGS="$$(HOST_CFLAGS)" \
> + -DCMAKE_CXX_FLAGS="$$(HOST_CXXFLAGS)" \
> + -DCMAKE_EXE_LINKER_FLAGS="$$(HOST_LDFLAGS)" \
> -DBUILD_TESTING=OFF \
> $$($$(PKG)_CONF_OPT) \
> )
> --
> 2.1.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-09-14 16:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
2014-09-14 16:19 ` Yann E. MORIN
2014-09-28 18:50 ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
2014-09-14 16:27 ` Yann E. MORIN [this message]
2014-09-28 18:52 ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
2014-09-14 16:34 ` Yann E. MORIN
2014-09-28 19:11 ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT Samuel Martin
2014-09-28 19:11 ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache Samuel Martin
2014-09-28 19:11 ` Peter Korsgaard
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=20140914162735.GA21222@free.fr \
--to=yann.morin.1998@free.fr \
--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