Set different arguments for gcc3.x.x and gcc4.x.x. Suppress pointer-sign warning in gcc4.x.x.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1221 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${LIB_DIR}/CommonTools"
|
outfile="${LIB_DIR}/CommonTools"
|
||||||
outtype="static"
|
outtype="static"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<compilerarg value="-fPIC" if="x86_64_linux"/>
|
<compilerarg value="-fPIC" if="x86_64_linux"/>
|
||||||
|
|
||||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||||
|
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${LibName}"
|
outfile="${BIN_DIR}/${LibName}"
|
||||||
outputfileproperty="result"
|
outputfileproperty="result"
|
||||||
>
|
>
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<fileset dir="${LibName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
|
<fileset dir="${LibName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
|
||||||
<includepath path="${PACKAGE_DIR}/Include"/>
|
<includepath path="${PACKAGE_DIR}/Include"/>
|
||||||
<includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
|
<includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false">
|
debug="false">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false">
|
debug="false">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false">
|
debug="false">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<defineset>
|
<defineset>
|
||||||
<define name="_malloc" value="malloc"/>
|
<define name="_malloc" value="malloc"/>
|
||||||
<define name="_free" value="free"/>
|
<define name="_free" value="free"/>
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false">
|
debug="false">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false">
|
debug="false">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -39,7 +39,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outtype="executable"
|
outtype="executable"
|
||||||
debug="false"
|
debug="false"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}" />
|
includes="${FileSet}" />
|
||||||
|
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -80,7 +80,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<defineset>
|
<defineset>
|
||||||
<define name="BUILDING_TOOLS"/>
|
<define name="BUILDING_TOOLS"/>
|
||||||
|
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
defaultexcludes="TRUE"
|
defaultexcludes="TRUE"
|
||||||
|
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
|
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}"
|
outfile="${BIN_DIR}/${ToolName}"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"
|
includes="${FileSet}"
|
||||||
|
@@ -40,7 +40,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}_Ia32"
|
outfile="${BIN_DIR}/${ToolName}_Ia32"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
|
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"/>
|
includes="${FileSet}"/>
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}_Ipf"
|
outfile="${BIN_DIR}/${ToolName}_Ipf"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}"/>
|
includes="${FileSet}"/>
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outfile="${BIN_DIR}/${ToolName}_X64"
|
outfile="${BIN_DIR}/${ToolName}_X64"
|
||||||
outtype="executable"
|
outtype="executable"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<fileset dir="${basedir}/${ToolName}"
|
<fileset dir="${basedir}/${ToolName}"
|
||||||
includes="${FileSet}" />
|
includes="${FileSet}" />
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
outtype="static"
|
outtype="static"
|
||||||
debug="true"
|
debug="true"
|
||||||
optimize="speed">
|
optimize="speed">
|
||||||
<compilerarg value="${ExtraArgus}" />
|
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
|
||||||
<compilerarg value="-fshort-wchar" if="gcc"/>
|
<compilerarg value="-fshort-wchar" if="gcc"/>
|
||||||
|
|
||||||
<fileset dir="${basedir}/${LibName}"
|
<fileset dir="${basedir}/${LibName}"
|
||||||
|
@@ -94,17 +94,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
<isset property="env.TOOL_CHAIN" />
|
<isset property="env.TOOL_CHAIN" />
|
||||||
<then>
|
<then>
|
||||||
<property name="ToolChain" value="${env.TOOL_CHAIN}"/>
|
<property name="ToolChain" value="${env.TOOL_CHAIN}"/>
|
||||||
<property name="ExtraArgus" value="-Wno-pointer-sign" />
|
|
||||||
</then>
|
</then>
|
||||||
<else>
|
<else>
|
||||||
<!-- Default Tool Chain is Microsoft Visual Studio -->
|
<!-- Default Tool Chain is Microsoft Visual Studio -->
|
||||||
<property name="ToolChain" value="msvc"/>
|
<property name="ToolChain" value="msvc"/>
|
||||||
<property name="ExtraArgus" value="" />
|
|
||||||
</else>
|
</else>
|
||||||
</if>
|
</if>
|
||||||
</then>
|
</then>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<equals arg1="${ToolChain}" arg2="gcc" />
|
||||||
|
<then>
|
||||||
|
<exec executable="gcc" outputproperty="host.gcc.ver">
|
||||||
|
<arg line="-E" />
|
||||||
|
<arg line="-P" />
|
||||||
|
<arg line="-x c" />
|
||||||
|
<arg line="gcc.ver" />
|
||||||
|
</exec>
|
||||||
|
<if>
|
||||||
|
<contains string="${host.gcc.ver}" substring="4" />
|
||||||
|
<then>
|
||||||
|
<property name="ExtraArgus" value="-Wno-pointer-sign" />
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
|
||||||
<condition property="linux" value="true">
|
<condition property="linux" value="true">
|
||||||
<os name="Linux"/>
|
<os name="Linux"/>
|
||||||
</condition>
|
</condition>
|
||||||
|
Reference in New Issue
Block a user