mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] systemd: add SYSTEMD_CPPFLAGS for kernel headers
@ 2014-11-25 13:24 Markus Niebel
  2014-11-26  9:49 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Niebel @ 2014-11-25 13:24 UTC (permalink / raw)
  To: ptxdist; +Cc: m.olbrich, Markus Niebel

From: Markus Niebel <Markus.Niebel@tq-group.com>

systemd uses cpp to generate tables for keymappings. Without setting
CPPFLAGS the toolchain headers will be used for generation but
local kernel headers for compilation. This can break compile.

tested with kernel 3.9

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
---
 rules/systemd.make | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rules/systemd.make b/rules/systemd.make
index b0f7ce0..8c425e4 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -44,6 +44,9 @@ SYSTEMD_CONF_ENV += cc_cv_CFLAGS__flto=no
 SYSTEMD_CFLAGS		:= \
 	-I$(KERNEL_HEADERS_INCLUDE_DIR)
 
+SYSTEMD_CPPFLAGS	:= \
+	-I$(KERNEL_HEADERS_INCLUDE_DIR)
+
 #
 # autoconf
 #
-- 
2.1.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] systemd: add SYSTEMD_CPPFLAGS for kernel headers
  2014-11-25 13:24 [ptxdist] [PATCH] systemd: add SYSTEMD_CPPFLAGS for kernel headers Markus Niebel
@ 2014-11-26  9:49 ` Michael Olbrich
  2014-11-26 12:03   ` Markus Niebel
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2014-11-26  9:49 UTC (permalink / raw)
  To: ptxdist

On Tue, Nov 25, 2014 at 02:24:39PM +0100, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tq-group.com>
> 
> systemd uses cpp to generate tables for keymappings. Without setting
> CPPFLAGS the toolchain headers will be used for generation but
> local kernel headers for compilation. This can break compile.
> 
> tested with kernel 3.9
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
> ---
>  rules/systemd.make | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/rules/systemd.make b/rules/systemd.make
> index b0f7ce0..8c425e4 100644
> --- a/rules/systemd.make
> +++ b/rules/systemd.make
> @@ -44,6 +44,9 @@ SYSTEMD_CONF_ENV += cc_cv_CFLAGS__flto=no
>  SYSTEMD_CFLAGS		:= \
>  	-I$(KERNEL_HEADERS_INCLUDE_DIR)
>  
> +SYSTEMD_CPPFLAGS	:= \
> +	-I$(KERNEL_HEADERS_INCLUDE_DIR)
> +

Hmmm, I think the correct solution is to set SYSTEMD_CPPFLAGS instead of
SYSTEMD_CFLAGS, right? Could you test that please? I don't a BSP right now,
where this fails, so I cannot test it.

Michael

>  #
>  # autoconf
>  #
> -- 
> 2.1.1
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] systemd: add SYSTEMD_CPPFLAGS for kernel headers
  2014-11-26  9:49 ` Michael Olbrich
@ 2014-11-26 12:03   ` Markus Niebel
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Niebel @ 2014-11-26 12:03 UTC (permalink / raw)
  To: ptxdist

Hello Michael

Am 26.11.2014 um 10:49 schrieb Michael Olbrich:
>> index b0f7ce0..8c425e4 100644
>> --- a/rules/systemd.make
>> +++ b/rules/systemd.make
>> @@ -44,6 +44,9 @@ SYSTEMD_CONF_ENV += cc_cv_CFLAGS__flto=no
>>  SYSTEMD_CFLAGS		:= \
>>  	-I$(KERNEL_HEADERS_INCLUDE_DIR)
>>  
>> +SYSTEMD_CPPFLAGS	:= \
>> +	-I$(KERNEL_HEADERS_INCLUDE_DIR)
>> +
> 
> Hmmm, I think the correct solution is to set SYSTEMD_CPPFLAGS instead of
> SYSTEMD_CFLAGS, right? Could you test that please? I don't a BSP right now,
> where this fails, so I cannot test it.

You are right. Will send v2.

Markus

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-26 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 13:24 [ptxdist] [PATCH] systemd: add SYSTEMD_CPPFLAGS for kernel headers Markus Niebel
2014-11-26  9:49 ` Michael Olbrich
2014-11-26 12:03   ` Markus Niebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox