[Buildroot] [PATCH 1/6] package infra: remove CPPFLAGS from CFLAGS

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue May 14 07:17:27 UTC 2013


Dear Arnout Vandecappelle,

On Tue, 14 May 2013 01:02:45 +0200, Arnout Vandecappelle wrote:

>   TARGET_CPPFLAGS is _only_ used to set the largefile defines. So I think 
> it's much easier to leave it out entirely, and pass those defines in 
> CFLAGS. There may be one or two packages that break because they rely on 
> correct CPPFLAGS, but for these we can send the largefile defines explicitly.
> 
>   So:
> 
> TARGET_LARGEFILE_CFLAGS = -D_LARGEFILE_SOURCE ...
> 
> TARGET_CFLAGS = $(TARGET_LARGEFILE_CFLAGS) ...
> 
> Remove the CPPFLAGS="$(TARGET_CPPFLAGS)" from TARGET_CONFIGURE_OPTS

No, that's precisely the problem Gustavo had: newer autotools version
do *NOT* want to have -D_BLABLA in CFLAGS, they only accept it in
CPPFLAGS.

See the original patch from Gustavo:

"""
CPPFLAGS don't belong in CFLAGS, and newer autoconf versions just error
out when it's used that way.
"""

So the whole purpose of the discussion is precisely that we can't any
longer pass the -D_LARGEFILE_SOURCE in TARGET_CFLAGS :)

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list