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>
This commit is contained in:
parent
f534203f06
commit
7572e66bc7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue