summaryrefslogtreecommitdiff
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
parentcaf9538f28de46e9ab3712611688e5353402183d (diff)
downloadedk2-205437772a146f6a7c87a010234e771169e50bdb.zip
edk2-205437772a146f6a7c87a010234e771169e50bdb.tar.gz
edk2-205437772a146f6a7c87a010234e771169e50bdb.tar.bz2
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
-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 7802b27..386698c 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 7af7c81..2dcfea7 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 20616d0..c2aa2f2 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 89e43ae..042b075 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 e0e4fcc..3001485 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 d7bc76b..57a9b2a 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 cdac147..3ca2114 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 f63bd98..38498ae 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 16ea68a..5d3ddae 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 d7fdc8b..93f77f5 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 273d80f..cd1497d 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 a5a8403..d2623a6 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 3c5ea03..031a83d 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 0a57036..c8e7dbc 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 92bd5c0..3436829 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 44c6173..933cb5c 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 5d3770a..982b920 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"/>