lkml.org 
[lkml]   [2015]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 2/7] selftests: add CFLAGS_EXTRA
From
Date


On 08/24/2015 11:48 AM, Michael Ellerman wrote:
> On Fri, 2015-08-14 at 21:43 +0800, Bamvor Jian Zhang wrote:
>> One may pass the "-I /path/to/headers -L /path/to/lib" through
>> CFLAGS_EXTRA for cross compiling. mqueue could compile pass
>> in this way when we provide the popt.h and libpopt.so. And kdbus
>> could compile pass with sys/capability and libcap.so
>
> There should be no need to define a new variable.
>
> You should just update the relevant Makefiles to use CFLAGS += rather than
> CFLAGS =. And then you can just specifiy CFLAGS on the command line.
yeap, it works for me. There is only one line need to be changed:
diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 0e3b41e..ca8327f 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -O2
+CFLAGS += -O2

all:
$(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt
regards

bamvor
>
> cheers
>
>


\
 
 \ /
  Last update: 2015-08-25 15:21    [W:0.072 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site