mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -95,7 +95,7 @@
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
<!-- rule -->
|
||||
<xsl:text>	$(ODIR)/forthstrap</xsl:text>
|
||||
<xsl:text>	$(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) </xsl:text>
|
||||
<xsl:text>-DICTIONARY)," GEN $(TARGET_DIR)$@") </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
@@ -63,13 +63,19 @@
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="@flags!=''">
|
||||
<xsl:text> 	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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user