From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] pkg-cmake.mk: Set CMAKE_SYSTEM_PROCESSOR.
Date: Tue, 9 Dec 2014 23:59:28 +0100 [thread overview]
Message-ID: <20141209235928.15c3181f@free-electrons.com> (raw)
In-Reply-To: <1416254561-12691-1-git-send-email-volker.krause@kdab.com>
Dear Volker Krause,
On Mon, 17 Nov 2014 21:02:41 +0100, Volker Krause wrote:
> This is rarely needed by packages, but convenient to have when it is.
>
> Signed-off-by: Volker Krause <volker.krause@kdab.com>
Thanks, I've applied your patch, with a few changes (see below).
> +# CMAKE_SYSTEM_PROCESSOR should match uname -m
> +ifeq ($(BR2_ARM_CPU_ARMV4),y)
> +ARM_VARIANT = armv4
> +else ifeq ($(BR2_ARM_CPU_ARMV5),y)
> +ARM_VARIANT = armv5
> +else ifeq ($(BR2_ARM_CPU_ARMV6),y)
> +ARM_VARIANT = armv6
> +else ifeq ($(BR2_ARM_CPU_ARMV7A),y)
> +ARM_VARIANT = armv7
> +endif
The namespace of variables is global, and we don't want pkg-cmake.mk to
define a variable with a name as "global" as ARM_VARIANT. So I've
renamed this variable to CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT.
> +
> +ifeq ($(BR2_arm),y)
> +CMAKE_SYSTEM_PROCESSOR = $(ARM_VARIANT)l
> +else ifeq ($(BR2_armeb),y)
> +CMAKE_SYSTEM_PROCESSOR = $(ARM_VARIANT)b
> +endif
> +
> +ifndef CMAKE_SYSTEM_PROCESSOR
> +CMAKE_SYSTEM_PROCESSOR = $(BR2_ARCH)
> +endif
I've changed this to the more logical (IMO):
ifeq ($(BR2_arm),y)
...
else ifeq ($(BR2_armeb),y)
...
else
... = $(BR2_ARCH)
endif
See:
http://git.buildroot.net/buildroot/commit/?id=c1e41153e662c7d49d7e0d1bf5e7a953d784f849
For the result.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2014-12-09 22:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 20:02 [Buildroot] [PATCH v3] pkg-cmake.mk: Set CMAKE_SYSTEM_PROCESSOR Volker Krause
2014-11-18 17:06 ` Bernd Kuhls
2014-11-22 0:22 ` Romain Naour
2014-12-09 21:53 ` Samuel Martin
2014-12-09 22:59 ` Thomas Petazzoni [this message]
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=20141209235928.15c3181f@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.