Patchwork Fix abuild -sb

login
register
about
Submitter Stefan Reinauer
Date 2010-04-19 13:08:30
Message ID <4BCC55CE.8070706@coresystems.de>
Download mbox | patch
Permalink /patch/1242/
State Superseded
Headers show

Comments

Stefan Reinauer - 2010-04-19 13:08:30
On 4/19/10 11:59 AM, Patrick Georgi wrote:
> --- Makefile    (revision 5455)
> +++ Makefile    (working copy)
> @@ -155,6 +155,10 @@
>         mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
>         $(objutil)/sconfig/sconfig $(MAINBOARDDIR)
> $(obj)/mainboard/$(MAINBOARDDIR)
>
> +$(obj)/%.o: $(obj)/%.c $(obj)/config.h
> +       printf "    CC         $(subst $(obj)/,,$(@))\n"
> +       $(CC) -MMD $(CFLAGS) -c -o $@ $<
> +
>  objs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.o
>  initobjs:=
>  drivers:=
>   

This hunk breaks compiling sconfig on my system. Changing it to the
following fixes it again:
Patrick Georgi - 2010-04-19 15:56:22
Am 19.04.2010 15:08, schrieb Stefan Reinauer:
> This hunk breaks compiling sconfig on my system. Changing it to the
> following fixes it again:

> +$(obj)/util/%.o: $(obj)/util/%.c $(obj)/config.h
This should be
+$(objutil)/%.o: $(objutil)/%.c $(obj)/config.h

> + printf " HOSTCC $(subst $(obj)/,,$(@))\n"
> + $(HOSTCC) -MMD $(HOSTCFLAGS) -c -o $@ $<
> +

Other than that, you're right. I didn't notice because abuild always
keeps objutil outside obj.


Patrick

Patch

Index: Makefile
===================================================================
--- Makefile (revision 5455)
+++ Makefile (working copy)
@@ -356,11 +356,20 @@ 
ifeq ($(_OS),CYGWIN_)
STACK=-Wl,--stack,16384000
endif
+
$(objutil)/romcc/romcc: $(top)/util/romcc/romcc.c
@printf " HOSTCC $(subst $(obj)/,,$(@)) (this may take a while)\n"
@# Note: Adding -O2 here might cause problems. For details see:
@# http://www.coreboot.org/pipermail/coreboot/2010-February/055825.html
$(HOSTCC) -g $(STACK) -Wall -o $@ $<

+$(obj)/%.o: $(obj)/%.c $(obj)/config.h
+ printf " CC $(subst $(obj)/,,$(@))\n"
+ $(CC) -MMD $(CFLAGS) -c -o $@ $<
+
+$(obj)/util/%.o: $(obj)/util/%.c $(obj)/config.h
+ printf " HOSTCC $(subst $(obj)/,,$(@))\n"
+ $(HOSTCC) -MMD $(HOSTCFLAGS) -c -o $@ $<
+
.PHONY: $(PHONY) prepare clean distclean doxygen doxy coreboot .xcompile