From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] cr_tests: Use toolchain prefixes and variables in Makefiles
Date: Fri, 5 Mar 2010 12:08:43 -0600 [thread overview]
Message-ID: <20100305180843.GA23409@us.ibm.com> (raw)
In-Reply-To: <8b495c1ce49380d01a34fc2e3ccf0e27802306f3.1267771287.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Quoting Matt Helsley (matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Applied, thanks.
-serge
> ---
> Makefile | 7 +++++++
> eventfd/Makefile | 4 ++--
> futex/module.mk | 2 +-
> pty/Makefile | 2 +-
> selinux/Makefile | 2 +-
> 5 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e8eb048..f17a9be 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -23,6 +23,13 @@ override CFLAGS += -Wall
>
> all:
>
> +# Prefix CC, AS, LD, AR for cross compilation
> +CROSS_COMPILE ?=
> +CC ?= $(CROSS_COMPILE)gcc
> +LD ?= $(CROSS_COMPILE)ld
> +AS ?= $(CROSS_COMPILE)as
> +AR ?= $(CROSS_COMPILE)ar
> +
> include $(addsuffix /module.mk,$(modules))
>
> progs += mysu
> diff --git a/eventfd/Makefile b/eventfd/Makefile
> index 82456e8..1bcd587 100644
> --- a/eventfd/Makefile
> +++ b/eventfd/Makefile
> @@ -13,10 +13,10 @@ all: $(PROGS)
> $(MAKE) -C ../libcrtest libcrtest.a
>
> libeptest.a: libeptest.o libeptest.h
> - ar cr libeptest.a libeptest.o
> + $(AR) cr libeptest.a libeptest.o
>
> $(PROGS): %: %.c $(LIBS)
> - gcc -Wall $(CFLAGS) -o $@ $< $(LIBS)
> + $(CC) -Wall $(CFLAGS) -o $@ $< $(LIBS)
>
> clean:
> rm -f *.o libeptest.a $(PROGS)
> diff --git a/futex/module.mk b/futex/module.mk
> index 6ab0449..412216b 100644
> --- a/futex/module.mk
> +++ b/futex/module.mk
> @@ -1,7 +1,7 @@
> local_dir := futex
> local_progs := $(addprefix $(local_dir)/,plain robust pi)
>
> -MACHINE := $(shell gcc -dumpmachine)
> +MACHINE := $(shell $(CC) -dumpmachine)
> ifeq ($(MACHINE:i386-%=i386),i386)
> ARCHOPTS := -march=i486
> endif
> diff --git a/pty/Makefile b/pty/Makefile
> index fe93a00..438f9bc 100644
> --- a/pty/Makefile
> +++ b/pty/Makefile
> @@ -6,7 +6,7 @@ SLIBS = ../libcrtest/libcrtest.a
> LIBCMD = -I../libcrtest -L../libcrtest $(SLIBS)
>
> ptyloop: ptyloop.c ../clone.h $(SLIBS)
> - gcc -o ptyloop ptyloop.c $(LIBCMD)
> + $(CC) -o ptyloop ptyloop.c $(LIBCMD)
>
> clean:
> rm -f $(targets) out* ckpt-out read-ok read-bad
> diff --git a/selinux/Makefile b/selinux/Makefile
> index 2ae8d96..f96384d 100644
> --- a/selinux/Makefile
> +++ b/selinux/Makefile
> @@ -3,7 +3,7 @@ targets = ckpt wrap
> all: $(targets)
>
> ckpt: ckpt.c ../cr.h
> - gcc -o ckpt ckpt.c
> + $(CC) -o ckpt ckpt.c
>
> clean:
> rm -rf $(targets) out context cr-test.out cr-test-module restart wrap
> --
> 1.6.3.3
prev parent reply other threads:[~2010-03-05 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 6:41 [PATCH] cr_tests: Use toolchain prefixes and variables in Makefiles Matt Helsley
[not found] ` <8b495c1ce49380d01a34fc2e3ccf0e27802306f3.1267771287.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-05 18:08 ` Serge E. Hallyn [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=20100305180843.GA23409@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/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