[Buildroot] $(TARGET_CONFIGURE_OPTS) $(MAKE) vs $(MAKE) $(TARGET_CONFIGURE_OPTS)

Steven J. Hill sjhill at realitydiluted.com
Mon Jul 9 12:20:42 UTC 2007


> This hunk of yours is really broken:
> TARGET_CONFIGURE_OPTS=... \
>                 CC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
>                 GCC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
>                 CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS)" \
>                 CPP="$(TARGET_CROSS)cpp $(TARGET_CFLAGS)" \
> 
> 1) These are the compilers and not compiler plus flags.
>
See comment below about packages breaking.

> 2) CFLAGS are wrong as CXXFLAGS
>
So when compiling C++ code, and if I want the -Os and other options,
how do you suggest we pass them.

> 3) since your change we end up using the default flags from the
> packages, which more often than not default to -O2. Let me refer you to
> options.c of gcc (or the respective docs for the gory details).
> 
Thanks, I am able to read code.

> I am going to revert this change for now. What were you trying to
> do/solve?
>
A number of packages break unless the above is done. By overriding
CFLAGS in the top-level makefile, CFLAGS in packages themselves get
overridden and fail to build. Essentially if you do not like the
method above, then a bunch of packages will need to be changed in
order to work properly with CFLAGS be specified at the very top.

-Steve



More information about the buildroot mailing list