[openib-general] Re: [PATCH] add LDFLAGS to perftest/Makefile

Michael S. Tsirkin mst at mellanox.co.il
Wed Dec 14 22:57:24 PST 2005


Quoting Nishanth Aravamudan <nacc at us.ibm.com>:
> Is there a reason the perftest/Makefile doesn't use LDFLAGS?
> Specifically, in automating userspace build & test, I put the IB
> libraries in a temporary directory, and exporting CFLAGS and LDFLAGS
> works with all other Makefiles (well, the ones I expect to work), but
> perftest does not seem to pick up my exports.
> 
> Would something like the following make sense (sorry if a different -p
> is preferred)? Or does it need to be +=?
> 
> Description: Add LDFLAGS to the perftest Makefile to allow library
> directories in non-standard locations to be specified.

Are you using gnu make? which version?
Gnu make should use LDFLAGS automatically:

	Linking a single object file
	`N' is made automatically from `N.o' by running the linker
	(usually called `ld') via the C compiler.  The precise command
	used is `$(CC) $(LDFLAGS) N.o $(LOADLIBES) $(LDLIBS)'.


> Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
> 
> --- Makefile	2005-12-14 14:57:04.000000000 -0800
> +++ Makefile.ldflags	2005-12-14 14:57:23.000000000 -0800
> @@ -2,6 +2,7 @@ TESTS = rdma_lat rdma_bw
>  
>  all: ${TESTS}
>  
> +LDFLAGS +=
>  CFLAGS += -Wall -O2 -g -D_GNU_SOURCE 
>  LOADLIBES += -libverbs
>  EXTRA_FILES = get_clock.c

This really does nothing. Does this patch help you?

-- 
MST



More information about the general mailing list