summaryrefslogtreecommitdiff
path: root/Tools/Source/TianoTools
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-09 03:14:51 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-09 03:14:51 +0000
commit205437772a146f6a7c87a010234e771169e50bdb (patch)
tree64268c4233cf882a87c260e29524977c1f6c9dfa /Tools/Source/TianoTools
parentcaf9538f28de46e9ab3712611688e5353402183d (diff)
downloadedk2-platforms-205437772a146f6a7c87a010234e771169e50bdb.tar.xz
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
Diffstat (limited to 'Tools/Source/TianoTools')
-rw-r--r--Tools/Source/TianoTools/Common/build.xml2
-rw-r--r--Tools/Source/TianoTools/CompressDll/build.xml2
-rw-r--r--Tools/Source/TianoTools/CreateMtFile/build.xml3
-rw-r--r--Tools/Source/TianoTools/EfiRom/build.xml2
-rw-r--r--Tools/Source/TianoTools/FlashMap/build.xml3
-rw-r--r--Tools/Source/TianoTools/FwImage/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenAcpiTable/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenCapsuleHdr/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenDepex/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenFfsFile/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenFvImage/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenSection/build.xml3
-rw-r--r--Tools/Source/TianoTools/GenTEImage/build.xml2
-rwxr-xr-xTools/Source/TianoTools/MakeDeps/build.xml2
-rw-r--r--Tools/Source/TianoTools/PeiRebase/build.xml7
-rw-r--r--Tools/Source/TianoTools/String/build.xml2
-rw-r--r--Tools/Source/TianoTools/build.xml20
17 files changed, 45 insertions, 20 deletions
diff --git a/Tools/Source/TianoTools/Common/build.xml b/Tools/Source/TianoTools/Common/build.xml
index 7802b27827..386698c3be 100644
--- a/Tools/Source/TianoTools/Common/build.xml
+++ b/Tools/Source/TianoTools/Common/build.xml
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${LIB_DIR}/CommonTools"
outtype="static"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<compilerarg value="-fPIC" if="x86_64_linux"/>
<includepath path="${PACKAGE_DIR}/Include"/>
diff --git a/Tools/Source/TianoTools/CompressDll/build.xml b/Tools/Source/TianoTools/CompressDll/build.xml
index 7af7c8119a..2dcfea7b13 100644
--- a/Tools/Source/TianoTools/CompressDll/build.xml
+++ b/Tools/Source/TianoTools/CompressDll/build.xml
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${LibName}"
outputfileproperty="result"
>
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${LibName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
<includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
diff --git a/Tools/Source/TianoTools/CreateMtFile/build.xml b/Tools/Source/TianoTools/CreateMtFile/build.xml
index 20616d027e..c2aa2f2579 100644
--- a/Tools/Source/TianoTools/CreateMtFile/build.xml
+++ b/Tools/Source/TianoTools/CreateMtFile/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="false">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/EfiRom/build.xml b/Tools/Source/TianoTools/EfiRom/build.xml
index 89e43aeb2c..042b075da5 100644
--- a/Tools/Source/TianoTools/EfiRom/build.xml
+++ b/Tools/Source/TianoTools/EfiRom/build.xml
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="false">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/FlashMap/build.xml b/Tools/Source/TianoTools/FlashMap/build.xml
index e0e4fcc3a8..3001485c9a 100644
--- a/Tools/Source/TianoTools/FlashMap/build.xml
+++ b/Tools/Source/TianoTools/FlashMap/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="false">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<defineset>
<define name="_malloc" value="malloc"/>
<define name="_free" value="free"/>
diff --git a/Tools/Source/TianoTools/FwImage/build.xml b/Tools/Source/TianoTools/FwImage/build.xml
index d7bc76bd16..57a9b2abcb 100644
--- a/Tools/Source/TianoTools/FwImage/build.xml
+++ b/Tools/Source/TianoTools/FwImage/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/GenAcpiTable/build.xml b/Tools/Source/TianoTools/GenAcpiTable/build.xml
index cdac147d7b..3ca2114348 100644
--- a/Tools/Source/TianoTools/GenAcpiTable/build.xml
+++ b/Tools/Source/TianoTools/GenAcpiTable/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="false">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/GenCapsuleHdr/build.xml b/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
index f63bd98d3c..38498ae6b6 100644
--- a/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
+++ b/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="false">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/GenDepex/build.xml b/Tools/Source/TianoTools/GenDepex/build.xml
index 16ea68a065..5d3ddaeb8f 100644
--- a/Tools/Source/TianoTools/GenDepex/build.xml
+++ b/Tools/Source/TianoTools/GenDepex/build.xml
@@ -39,7 +39,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outtype="executable"
debug="false"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}" />
diff --git a/Tools/Source/TianoTools/GenFfsFile/build.xml b/Tools/Source/TianoTools/GenFfsFile/build.xml
index d7fdc8bce9..93f77f591d 100644
--- a/Tools/Source/TianoTools/GenFfsFile/build.xml
+++ b/Tools/Source/TianoTools/GenFfsFile/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/GenFvImage/build.xml b/Tools/Source/TianoTools/GenFvImage/build.xml
index 273d80fc4a..cd1497d722 100644
--- a/Tools/Source/TianoTools/GenFvImage/build.xml
+++ b/Tools/Source/TianoTools/GenFvImage/build.xml
@@ -80,7 +80,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<defineset>
<define name="BUILDING_TOOLS"/>
diff --git a/Tools/Source/TianoTools/GenSection/build.xml b/Tools/Source/TianoTools/GenSection/build.xml
index a5a8403508..d2623a6bf0 100644
--- a/Tools/Source/TianoTools/GenSection/build.xml
+++ b/Tools/Source/TianoTools/GenSection/build.xml
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
diff --git a/Tools/Source/TianoTools/GenTEImage/build.xml b/Tools/Source/TianoTools/GenTEImage/build.xml
index 3c5ea036f6..031a83d02b 100644
--- a/Tools/Source/TianoTools/GenTEImage/build.xml
+++ b/Tools/Source/TianoTools/GenTEImage/build.xml
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
diff --git a/Tools/Source/TianoTools/MakeDeps/build.xml b/Tools/Source/TianoTools/MakeDeps/build.xml
index 0a57036b9c..c8e7dbcf74 100755
--- a/Tools/Source/TianoTools/MakeDeps/build.xml
+++ b/Tools/Source/TianoTools/MakeDeps/build.xml
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
diff --git a/Tools/Source/TianoTools/PeiRebase/build.xml b/Tools/Source/TianoTools/PeiRebase/build.xml
index 92bd5c0e40..34368297cd 100644
--- a/Tools/Source/TianoTools/PeiRebase/build.xml
+++ b/Tools/Source/TianoTools/PeiRebase/build.xml
@@ -40,7 +40,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}_Ia32"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"/>
@@ -56,7 +57,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}_Ipf"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"/>
@@ -72,7 +73,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outfile="${BIN_DIR}/${ToolName}_X64"
outtype="executable"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}" />
diff --git a/Tools/Source/TianoTools/String/build.xml b/Tools/Source/TianoTools/String/build.xml
index 44c617360b..933cb5c1e4 100644
--- a/Tools/Source/TianoTools/String/build.xml
+++ b/Tools/Source/TianoTools/String/build.xml
@@ -62,7 +62,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outtype="static"
debug="true"
optimize="speed">
- <compilerarg value="${ExtraArgus}" />
+ <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
<compilerarg value="-fshort-wchar" if="gcc"/>
<fileset dir="${basedir}/${LibName}"
diff --git a/Tools/Source/TianoTools/build.xml b/Tools/Source/TianoTools/build.xml
index 5d3770ae0f..982b920e17 100644
--- a/Tools/Source/TianoTools/build.xml
+++ b/Tools/Source/TianoTools/build.xml
@@ -94,16 +94,32 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<isset property="env.TOOL_CHAIN" />
<then>
<property name="ToolChain" value="${env.TOOL_CHAIN}"/>
- <property name="ExtraArgus" value="-Wno-pointer-sign" />
</then>
<else>
<!-- Default Tool Chain is Microsoft Visual Studio -->
<property name="ToolChain" value="msvc"/>
- <property name="ExtraArgus" value="" />
</else>
</if>
</then>
</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">
<os name="Linux"/>