All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cliff Wickman <cpw@sgi.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-numa@vger.kernel.org
Subject: Re: [PATCH] cleanup build flags a bit
Date: Mon, 2 Mar 2009 07:56:41 -0600	[thread overview]
Message-ID: <20090302135641.GA1587@sgi.com> (raw)
In-Reply-To: <1234123372-9584-1-git-send-email-vapier@gentoo.org>

Hi Mike,

Thanks much for the patch.

It has sat in my inbox long enough (sorry).  I tested it along
with Amit's patches this morning.
The standard tests pass on ia64 (8 nodes).

The patch is in the numactl-2.0.3-rc2.tar.gz tarball at
ftp://oss.sgi.com/www/projects/libnuma/download/

Any other review and testing is welcome.

-Cliff

On Sun, Feb 08, 2009 at 03:02:52PM -0500, Mike Frysinger wrote:
> Make sure we respect LDFLAGS, use LDLIBS for libs and not LDFLAGS (so the
> link ordering is correct), and allow people to set AR/RANLIB to the right
> cross-toolchain.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  Makefile |   15 +++++++++------
>  1 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 52a7363..544cb54 100755
> --- a/Makefile
> +++ b/Makefile
> @@ -48,8 +48,8 @@ numactl: numactl.o util.o shm.o bitops.o libnuma.so
>  
>  migratepages: migratepages.c util.o bitops.o libnuma.so
>  
> +migspeed: LDLIBS += -lrt
>  migspeed: migspeed.o util.o libnuma.so
> -	${CC} migspeed.c -o migspeed util.o libnuma.so -lrt
>  
>  util.o: util.c
>  
> @@ -57,7 +57,7 @@ memhog: util.o memhog.o libnuma.so
>  
>  numactl.o: numactl.c
>  
> -numademo: override LDFLAGS += -lm
> +numademo: LDLIBS += -lm
>  # GNU make 3.80 appends BENCH_CFLAGS twice. Bug? It's harmless though.
>  numademo: CFLAGS += -DHAVE_STREAM_LIB -DHAVE_MT -DHAVE_CLEAR_CACHE ${BENCH_CFLAGS}
>  stream_lib.o: CFLAGS += ${BENCH_CFLAGS}
> @@ -72,24 +72,27 @@ numademo.o: numademo.c libnuma.so
>  
>  numamon: numamon.o
>  
> +stream: LDLIBS += -lm
>  stream: stream_lib.o stream_main.o  libnuma.so util.o
> -	${CC} -o stream ${CFLAGS} stream_lib.o stream_main.o util.o -L. -lnuma -lm
> +	${CC} ${CFLAGS} ${LDFLAGS} -o $@ $^ ${LDLIBS}
>  
>  stream_main.o: stream_main.c
>  
>  libnuma.so.1: versions.ldscript
>  
>  libnuma.so.1: libnuma.o syscall.o distance.o
> -	${CC} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -o libnuma.so.1 $(filter-out versions.ldscript,$^)
> +	${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -o libnuma.so.1 $(filter-out versions.ldscript,$^)
>  
>  libnuma.so: libnuma.so.1
>  	ln -sf libnuma.so.1 libnuma.so
>  
>  libnuma.o : CFLAGS += -fPIC
>  
> +AR ?= ar
> +RANLIB ?= ranlib
>  libnuma.a: libnuma.o syscall.o distance.o
> -	ar rc $@ $^
> -	ranlib $@
> +	$(AR) rc $@ $^
> +	$(RANLIB) $@
>  
>  distance.o : CFLAGS += -fPIC
>  
> -- 
> 1.6.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-numa" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Cliff Wickman
Silicon Graphics, Inc.
cpw@sgi.com
(651) 683-3824

  reply	other threads:[~2009-03-02 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 20:02 [PATCH] cleanup build flags a bit Mike Frysinger
2009-03-02 13:56 ` Cliff Wickman [this message]
2009-03-03  1:54   ` Mike Frysinger

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=20090302135641.GA1587@sgi.com \
    --to=cpw@sgi.com \
    --cc=linux-numa@vger.kernel.org \
    --cc=vapier@gentoo.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 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.