diff mbox series

[RISU,06/10] configure: support CPPFLAGS

Message ID 20171107150558.22131-7-alex.bennee@linaro.org
State New
Headers show
Series Initial support for SVE | expand

Commit Message

Alex Bennée Nov. 7, 2017, 3:05 p.m. UTC
Useful for accessing API's that are still brewing, e.g:

  CROSS_PREFIX=aarch64-linux-gnu- \
    CPPFLAGS=-I/home/alex/lsrc/qemu/risu.git/sve-headers/include \
    ../configure

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 README    | 6 ++++++
 configure | 1 +
 2 files changed, 7 insertions(+)

-- 
2.14.2

Comments

Dave Martin Nov. 8, 2017, 10:34 a.m. UTC | #1
On Tue, Nov 07, 2017 at 03:05:54PM +0000, Alex Bennée wrote:
> Useful for accessing API's that are still brewing, e.g:

> 

>   CROSS_PREFIX=aarch64-linux-gnu- \

>     CPPFLAGS=-I/home/alex/lsrc/qemu/risu.git/sve-headers/include \

>     ../configure

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  README    | 6 ++++++

>  configure | 1 +

>  2 files changed, 7 insertions(+)

> 

> diff --git a/README b/README

> index 9946e6e..fbe408d 100644

> --- a/README

> +++ b/README

> @@ -26,6 +26,12 @@ Most useful is

>     need this if you're not building on the target system

>     (Example: CROSS_PREFIX=arm-linux-gnueabihf- )

>  

> +Another useful flag is

> + CPPFLAGS= which specified pre-processor flags, usually -I statements

> +   for specifying extra include paths. Use this is you need something


s/is/if/

> +   from new kernel headers not installed on your system.

> +   (Example: CPPFLAGS=-I/path/to/sve-kernel-headers/include)

> +


You should probably point out that the path should refer to headers
installed by running 'make headers_install' in the Linux source.  This
means we really test the uapi headers properly, and I don't get spurious
bug reports about bad headers ;)

[...]

Cheers
---Dave
Alex Bennée Nov. 8, 2017, 11:02 a.m. UTC | #2
Dave Martin <Dave.Martin@arm.com> writes:

> On Tue, Nov 07, 2017 at 03:05:54PM +0000, Alex Bennée wrote:

>> Useful for accessing API's that are still brewing, e.g:

>>

>>   CROSS_PREFIX=aarch64-linux-gnu- \

>>     CPPFLAGS=-I/home/alex/lsrc/qemu/risu.git/sve-headers/include \

>>     ../configure

>>

>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>> ---

>>  README    | 6 ++++++

>>  configure | 1 +

>>  2 files changed, 7 insertions(+)

>>

>> diff --git a/README b/README

>> index 9946e6e..fbe408d 100644

>> --- a/README

>> +++ b/README

>> @@ -26,6 +26,12 @@ Most useful is

>>     need this if you're not building on the target system

>>     (Example: CROSS_PREFIX=arm-linux-gnueabihf- )

>>

>> +Another useful flag is

>> + CPPFLAGS= which specified pre-processor flags, usually -I statements

>> +   for specifying extra include paths. Use this is you need something

>

> s/is/if/

>

>> +   from new kernel headers not installed on your system.

>> +   (Example: CPPFLAGS=-I/path/to/sve-kernel-headers/include)

>> +

>

> You should probably point out that the path should refer to headers

> installed by running 'make headers_install' in the Linux source.  This

> means we really test the uapi headers properly, and I don't get spurious

> bug reports about bad headers ;)


Will do. Thanks.
>

> [...]

>

> Cheers

> ---Dave



--
Alex Bennée
diff mbox series

Patch

diff --git a/README b/README
index 9946e6e..fbe408d 100644
--- a/README
+++ b/README
@@ -26,6 +26,12 @@  Most useful is
    need this if you're not building on the target system
    (Example: CROSS_PREFIX=arm-linux-gnueabihf- )
 
+Another useful flag is
+ CPPFLAGS= which specified pre-processor flags, usually -I statements
+   for specifying extra include paths. Use this is you need something
+   from new kernel headers not installed on your system.
+   (Example: CPPFLAGS=-I/path/to/sve-kernel-headers/include)
+
 Passing --static will build a statically linked binary which is useful
 if you don't want to mess around with a chroot to run the binary.
 
diff --git a/configure b/configure
index c622a5e..65e1819 100755
--- a/configure
+++ b/configure
@@ -111,6 +111,7 @@  generate_makefilein() {
     echo "# Makefile.in - generated by the 'configure' script" > $m
     echo "ARCH:=${ARCH}" >> $m
     echo "CC:=${CC}" >> $m
+    echo "CPPFLAGS:=${CPPFLAGS}" >> $m
     echo "LDFLAGS:=${LDFLAGS}" >> $m
     echo "AS:=${AS}" >> $m
     echo "OBJCOPY:=${OBJCOPY}" >> $m