[coreboot] libpayload: fix cross compilation (somewhat)
Jordan Crouse
jordan.crouse at amd.com
Thu Aug 7 17:24:43 CEST 2008
On 07/08/08 17:20 +0200, Stefan Reinauer wrote:
> Jordan Crouse wrote:
>
> >> Index: libpayload/bin/lpgcc
> >> ===================================================================
> >> --- libpayload/bin/lpgcc (revision 3473)
> >> +++ libpayload/bin/lpgcc (working copy)
> >> @@ -28,8 +28,7 @@
> >>
> >> # GCC wrapper for libpayload
> >>
> >> -DEFAULT_PREFIX=/opt
> >> -DEFAULT_CC=gcc
> >> +DEFAULT_CC=$CC
> >>
> >
> > You should put a DEFAULT_CC ?= gcc after this line to account for
> > CC being empty. Other then that, this looks good.
>
> ok, done.
>
> Next problem: How do I probe for -fno-stack-protector in the libpayload
> makefile?
We don't have the -fno-stack-protector logic in the libpayload makefile?
Was I really that stupid? /me checks - Yep, i was that stupid.
Use the logic from buildrom:
try-run= $(shell set -e; \
TMP=".$$$$.tmp"; \
if ($(1)) > /dev/null 2>&1; \
then echo "$(2)"; \
else echo "$(3)"; \
fi; rm -rf "$$TMP")
cc-option= $(call
try-run,\
$(CC) $(1) -S
-xc /dev/null
-o "$$TMP",
$(1), $(2))
STACKPROTECT += $(call cc-option, -fno-stack-protector,)
> should we use lpgcc internally?
If it works, but I bet it wouldn't.
Jordan
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the coreboot
mailing list