diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-08-03 14:08:40 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-08-09 13:07:04 +0200 |
commit | 7572e66bc7498f7ec78dbdc504578c79fad49399 (patch) | |
tree | f013b8aa9a7da6868b1dedd15f566e89da0694c9 /payloads/libpayload | |
parent | f534203f06bd253d43c2213b2806976bed31596e (diff) | |
download | coreboot-7572e66bc7498f7ec78dbdc504578c79fad49399.tar.xz |
libpayload: lpgcc: CFLAGS and CMDLINE order inversion
When building an external payload with lpgcc, the provided cmdline needs to be
included before libpayload-specific CFLAGS so that the include priority is the
payload first. This way, a payload using e.g. Kconfig that declares a config.h
will have its config.h included first, instead of libpayload's config.h.
Change-Id: I19b8012623e04c92a427d74904aed7f3bf5f0996
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: http://review.coreboot.org/11113
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload')
-rwxr-xr-x | payloads/libpayload/bin/lpgcc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc index 1dbd716b12..93466395e8 100755 --- a/payloads/libpayload/bin/lpgcc +++ b/payloads/libpayload/bin/lpgcc @@ -165,10 +165,10 @@ _LDFLAGS="-L$BASE/../lib -L$_LIBDIR $_LDSCRIPT -static" if [ $DOLINK -eq 0 ]; then if [ $DEBUGME -eq 1 ]; then - echo "$DEFAULT_CC $_CFLAGS $CMDLINE" + echo "$DEFAULT_CC $CMDLINE $_CFLAGS" fi - $DEFAULT_CC $_CFLAGS $CMDLINE + $DEFAULT_CC $CMDLINE $_CFLAGS else if [ -z "${CONFIG_LP_ARCH_MIPS}" ]; then _LIBGCC=`$DEFAULT_CC $_ARCHEXTRA -print-libgcc-file-name` @@ -182,7 +182,7 @@ else exit 1 fi if [ $DEBUGME -eq 1 ]; then - echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $HEAD_O $CMDLINE -lpayload $_LIBGCC" + echo "$DEFAULT_CC $_LDFLAGS $HEAD_O $CMDLINE $_CFLAGS -lpayload $_LIBGCC" fi # Note: $_ARCHLIBDIR/head.o must be the first object being linked, because it @@ -190,5 +190,5 @@ else # header to be placed below 0x2000 in the resulting image. See: # http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html - $DEFAULT_CC $_CFLAGS $_LDFLAGS $HEAD_O $CMDLINE -lpayload $_LIBGCC + $DEFAULT_CC $_LDFLAGS $HEAD_O $CMDLINE $_CFLAGS -lpayload $_LIBGCC fi |