Introduce quiet build

Make forthstrap quiet by default. Use generic rules when possible, unify
the rules and cleanup white space. Use ld flag --whole-archive to avoid
some local rule use. We can also remove some hacks introduced to avoid
missing symbols.

Fix problems brought in by ld flag --whole-archive:
 * x86: fix missing nvram symbols
 * PPC: disable misc.S build for qemu (conflicts with our libgcc)

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@556 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-08-17 16:58:42 +00:00
parent f85f67517b
commit 9162f1b584
11 changed files with 164 additions and 231 deletions

View File

@@ -95,7 +95,7 @@
</xsl:if>
<xsl:text>&#10;</xsl:text>
<!-- rule -->
<xsl:text>&#9;$(ODIR)/forthstrap</xsl:text>
<xsl:text>&#9;$(call quiet-command,$(ODIR)/forthstrap</xsl:text>
<xsl:for-each select="//dictionary[@name = @name]">
<xsl:variable name="conditions">
@@ -131,7 +131,7 @@
</xsl:if>
<xsl:text> $(</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>-DICTIONARY)&#10;&#10;</xsl:text>
<xsl:text>-DICTIONARY)," GEN $(TARGET_DIR)$@")&#10;&#10;</xsl:text>
</xsl:if>
</xsl:if>
</xsl:for-each>

View File

@@ -63,13 +63,19 @@
<xsl:text>&#10;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@flags!=''">
<xsl:text>&#10;&#9;EXTRACFLAGS="</xsl:text>
<xsl:value-of select="@flags"/>
<xsl:text>" ;\</xsl:text>
</xsl:if>
<!-- FIXME this requires strict spaces in rules.xml -->
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
<xsl:choose>
<xsl:when test="@flags!=''">
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='1']"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@flags"/>
<xsl:text> </xsl:text>
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object'][@extracflags='2']"/>
</xsl:when>
<xsl:otherwise>
<!-- FIXME this requires strict spaces in rules.xml -->
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>

View File

@@ -1,23 +1,31 @@
<rules>
<!-- host compiler build rules -->
<rule target="host" entity="executable">
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
$(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) -o $@ $^," HOSTCC $(TARGET_DIR)$@")
</rule>
<rule target="host" entity="object">
$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^
$(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^," HOSTCC $(TARGET_DIR)$@")
</rule>
<rule target="host" entity="object" extracflags="1">
$(call quiet-command,$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES)</rule>
<rule target="host" entity="object" extracflags="2"> -c -o $@ $^," HOSTCC $(TARGET_DIR)$@")
</rule>
<rule target="host" entity="library">
$(AR) cru $@ $^; $(RANLIB) $@
$(call quiet--command,$(AR) cru $@ $^; $(RANLIB) $@," HOSTAR $(TARGET_DIR)$@")
</rule>
<!-- target/cross compiler build rules -->
<rule target="target" entity="executable">
$(CC) $(CFLAGS) -o $@ $^
$(call quiet-command,$(CC) $(CFLAGS) -o $@ $^," CC $(TARGET_DIR)$@")
</rule>
<rule target="target" entity="object">
$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^
$(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^," CC $(TARGET_DIR)$@")
</rule>
<rule target="target" entity="object" extracflags="1">
$(call quiet-command,$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES)</rule>
<rule target="target" entity="object" extracflags="2"> -c -o $@ $^," CC $(TARGET_DIR)$@")
</rule>
<rule target="target" entity="library">
$(AR) cru $@ $^; $(RANLIB) $@
$(call quiet-command,$(AR) cru $@ $^; $(RANLIB) $@," AR $(TARGET_DIR)$@")
</rule>
</rules>