Re: [U-Boot] Compiling certain files with extra compiler flags
On Wed, Sep 4, 2013 at 8:16 PM, Simon Glass s...@google.com wrote: Hi Vadim, OK I see. You can do something like this: CFLAGS_arch/arm/cpu/tegra20-common/warmboot_avp.o += -march=armv4t (this is used by Tegra) Regards, Simon Ah, this works, thank you, Simon! --vb On Wed, Sep 4, 2013 at 8:25 PM, Vadim Bendebury vben...@chromium.org wrote: this is the tweak -- Forwarded message -- From: Vadim Bendebury vben...@chromium.org Date: Wed, Sep 4, 2013 at 11:49 AM Subject: Compiling certain files with extra compiler flags To: uboot u-boot@lists.denx.de Does u-boot provide the ability to change compilation options 'on the fly', say when certain files need to be compiled for symbolic debugging? I looked but did not find any. How about something like this: vvv $ git diff config.mk diff --git a/config.mk b/config.mk index 853e6d8..41cafbb 100644 --- a/config.mk +++ b/config.mk @@ -406,7 +406,7 @@ $(obj)%.o: %.c ifneq ($(CHECKSRC),0) $(CHECK) $(CHECKFLAGS) $(ALL_CFLAGS) $ endif - $(CC) $(ALL_CFLAGS) -o $@ $ -c + $(CC) $(ALL_CFLAGS) $(CPP_$(subst .,_,$)) -o $@ $ -c $(obj)%.i: %.c $(CPP) $(ALL_CFLAGS) -o $@ $ -c $(obj)%.s: %.c ^ Then, say I want to have spl_boot.c compiled with extra flags, just invoking make like this does the trick: CPP_spl_boot_c='-O0 -fno-default-inline' make ... Or is there a better way? --vb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compiling certain files with extra compiler flags
Hi Vadim, On Thu, Sep 5, 2013 at 10:50 AM, Vadim Bendebury vben...@chromium.org wrote: On Wed, Sep 4, 2013 at 8:16 PM, Simon Glass s...@google.com wrote: Hi Vadim, OK I see. You can do something like this: CFLAGS_arch/arm/cpu/tegra20-common/warmboot_avp.o += -march=armv4t (this is used by Tegra) Regards, Simon Ah, this works, thank you, Simon! Great! --vb Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Compiling certain files with extra compiler flags
Does u-boot provide the ability to change compilation options 'on the fly', say when certain files need to be compiled for symbolic debugging? I looked but did not find any. How about something like this: vvv $ git diff config.mk diff --git a/config.mk b/config.mk index 853e6d8..41cafbb 100644 --- a/config.mk +++ b/config.mk @@ -406,7 +406,7 @@ $(obj)%.o: %.c ifneq ($(CHECKSRC),0) $(CHECK) $(CHECKFLAGS) $(ALL_CFLAGS) $ endif - $(CC) $(ALL_CFLAGS) -o $@ $ -c + $(CC) $(ALL_CFLAGS) $(CPP_$(subst .,_,$)) -o $@ $ -c $(obj)%.i: %.c $(CPP) $(ALL_CFLAGS) -o $@ $ -c $(obj)%.s: %.c ^ Then, say I want to have spl_boot.c compiled with extra flags, just invoking make like this does the trick: CPP_spl_boot_c='-O0 -fno-default-inline' make ... Or is there a better way? --vb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot