From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig
Date: Tue, 13 Mar 2012 10:53:24 +0100 [thread overview]
Message-ID: <20120313095324.GG29221@pengutronix.de> (raw)
In-Reply-To: <1331587504-16721-1-git-send-email-linux@bohmer.net>
On Mon, Mar 12, 2012 at 10:25:00PM +0100, Remy Bohmer wrote:
> The platformconfig can specify some valuable global flags for each
> package in the configuration to build, for example:
> * CPU optimisations (-march= and friends)
> * multilib toolchain selection between x86_64 and ia32 such as used for
> the Sourcery Codebench compiler toolchains as specified here:
> https://sourcery.mentor.com/sgpp/lite/ia32/portal/doc12648/getting-started.pdf
>
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
> patches/rt-tests-0.73/add-extra-cflags.patch | 23 +++++++++++++++++++++++
> patches/rt-tests-0.73/series | 1 +
> rules/rt-tests.make | 1 +
> 3 files changed, 25 insertions(+), 0 deletions(-)
> create mode 100644 patches/rt-tests-0.73/add-extra-cflags.patch
>
> diff --git a/patches/rt-tests-0.73/add-extra-cflags.patch b/patches/rt-tests-0.73/add-extra-cflags.patch
> new file mode 100644
> index 0000000..6809377
> --- /dev/null
> +++ b/patches/rt-tests-0.73/add-extra-cflags.patch
> @@ -0,0 +1,23 @@
> +CFLAGS are specified in environment as well
> +
> +If the environment already has specified CFLAGS we shall
> +not overwrite them
> +
> +Signed-off-by: Remy Bohmer <linux@bohmer.net>
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +Index: rt-tests-0.73/Makefile
> +===================================================================
> +--- rt-tests-0.73.orig/Makefile
> ++++ rt-tests-0.73/Makefile
> +@@ -14,7 +14,7 @@ bindir ?= $(prefix)/bin
> + mandir ?= $(prefix)/share/man
> + srcdir ?= $(prefix)/src
> +
> +-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
> ++CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CXXFLAGS)
This should be:
CFLAGS = $(CPPFLAGS) -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include $(CFLAGS)
CFLAGS is for C CXXFLAGS for C++ and CPPFLAGS in theory for the
preprocessor and therefore often used to pass flags for both.
And note the order.
And you should probably set:
LIBS = $(LDFLAGS) -lrt -lpthread
The flags should come first here.
Michael
> +
> + PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
> +
> diff --git a/patches/rt-tests-0.73/series b/patches/rt-tests-0.73/series
> index 74fbce0..caf1a74 100644
> --- a/patches/rt-tests-0.73/series
> +++ b/patches/rt-tests-0.73/series
> @@ -1 +1,2 @@
> fix_3_0_issue.diff
> +add-extra-cflags.patch
> diff --git a/rules/rt-tests.make b/rules/rt-tests.make
> index 3bc6568..1880beb 100644
> --- a/rules/rt-tests.make
> +++ b/rules/rt-tests.make
> @@ -34,6 +34,7 @@ RT_TESTS_DIR := $(BUILDDIR)/$(RT_TESTS)
>
> RT_TESTS_CONF_TOOL := NO
> RT_TESTS_MAKE_OPT := $(CROSS_ENV_CC) prefix=/usr
> +RT_TESTS_MAKE_ENV := $(CROSS_ENV_FLAGS)
> RT_TESTS_INSTALL_OPT := $(RT_TESTS_MAKE_OPT) install
>
> # ----------------------------------------------------------------------------
> --
> 1.7.5.4
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2012-03-13 9:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 21:25 Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 2/5] [x86_64] Add some support for multilib detection in the toolchain Remy Bohmer
2012-03-13 9:56 ` Michael Olbrich
2012-03-13 10:23 ` Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make Remy Bohmer
2012-03-13 9:59 ` Michael Olbrich
2012-03-13 10:26 ` Remy Bohmer
2012-03-13 12:46 ` Remy Bohmer
2012-03-13 13:06 ` Michael Olbrich
2012-03-13 21:31 ` Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 4/5] [x86_64, libc] on multilib do not put all dynamic linkers in /lib Remy Bohmer
2012-03-13 10:07 ` Michael Olbrich
2012-03-13 10:28 ` Remy Bohmer
2012-03-13 10:34 ` Remy Bohmer
2012-03-13 10:58 ` Michael Olbrich
2012-03-12 21:25 ` [ptxdist] [PATCH 5/5] [x86_64, libc] Link /usr/lib/libdl.so is not needed and wrong on x86_64 Remy Bohmer
2012-03-13 9:53 ` Michael Olbrich [this message]
2012-03-13 10:21 ` [ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig Remy Bohmer
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=20120313095324.GG29221@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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