Re: [PATCH] cleanup build flags a bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Cliff Wickman
Silicon Graphics, Inc.
cpw@xxxxxxx
(651) 683-3824
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux