Set different arguments for gcc3.x.x and gcc4.x.x. Suppress pointer-sign warning...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Aug 2006 03:14:51 +0000 (03:14 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Aug 2006 03:14:51 +0000 (03:14 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1221 6f19259b-4bc3-4df7-8a09-765794883524

17 files changed:
Tools/Source/TianoTools/Common/build.xml
Tools/Source/TianoTools/CompressDll/build.xml
Tools/Source/TianoTools/CreateMtFile/build.xml
Tools/Source/TianoTools/EfiRom/build.xml
Tools/Source/TianoTools/FlashMap/build.xml
Tools/Source/TianoTools/FwImage/build.xml
Tools/Source/TianoTools/GenAcpiTable/build.xml
Tools/Source/TianoTools/GenCapsuleHdr/build.xml
Tools/Source/TianoTools/GenDepex/build.xml
Tools/Source/TianoTools/GenFfsFile/build.xml
Tools/Source/TianoTools/GenFvImage/build.xml
Tools/Source/TianoTools/GenSection/build.xml
Tools/Source/TianoTools/GenTEImage/build.xml
Tools/Source/TianoTools/MakeDeps/build.xml
Tools/Source/TianoTools/PeiRebase/build.xml
Tools/Source/TianoTools/String/build.xml
Tools/Source/TianoTools/build.xml

index 7802b27827ebd41cf2117f300db2148a1324f209..386698c3be5bcb7089cc1c00350430f2fb16d168 100644 (file)
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${LIB_DIR}/CommonTools"\r
         outtype="static"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <compilerarg value="-fPIC" if="x86_64_linux"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
index 7af7c8119ae5704729ebc87bb02e38240be4466a..2dcfea7b1375c25cf3aafc73b2c3232364d59fc2 100644 (file)
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       outfile="${BIN_DIR}/${LibName}"\r
       outputfileproperty="result"\r
       >\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <fileset dir="${LibName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
       <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
index 20616d027e3cef500c830f1b88060c991ba693d5..c2aa2f25797fde62e8f92354c9be4455e2aa2543 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="false">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index 89e43aeb2c75cb0dfe7f8a7f96ca609c4b0e973f..042b075da522890e4893754d725f6d55ff7c7b25 100644 (file)
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="false">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index e0e4fcc3a8cc26b2926b8eb62101becf633baf61..3001485c9a805cf63fbcd1dfaa57cc182e2fa290 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="false">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <defineset>\r
         <define name="_malloc" value="malloc"/>\r
         <define name="_free" value="free"/>\r
index d7bc76bd1646919849ddb6138a7a0c95edb8f23a..57a9b2abcbe82912afdef487c5f3a9f870d69bef 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index cdac147d7b03186f2ffa8d04fea1eda8be33d74c..3ca2114348e808f18819cda789f732fbab124cbb 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="false">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index f63bd98d3ce54fb73b6e5c385451c6d543032838..38498ae6b62c7e94ee7e8f87a36e719670246801 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="false">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index 16ea68a065a10a0a2c8d4e80e362cfe945a2235c..5d3ddaeb8fe2d7c52bab5deeddf23f9cfb070fa3 100644 (file)
@@ -39,7 +39,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outtype="executable"\r
         debug="false"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" />\r
 \r
index d7fdc8bce9f65e4a33df35af639148130a8149b6..93f77f591d155a9e302f4c72cdafe91b81b509ca 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index 273d80fc4a77c400de17d44e796d4dc0d7ed6f8e..cd1497d7220d583eea1be20928b9f9568149e713 100644 (file)
@@ -80,7 +80,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />      \r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
 \r
       <defineset>\r
         <define name="BUILDING_TOOLS"/>\r
index a5a8403508062d4ef67db78b19940f056fd2bd35..d2623a6bf0e9ec99423082217d5aef3014ce7055 100644 (file)
@@ -38,7 +38,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
         defaultexcludes="TRUE" \r
index 3c5ea036f6e1df6fd2e99ec06c2a986adf9e430e..031a83d02be263563e6ba005e9c773569dd7b75d 100644 (file)
@@ -39,7 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
 \r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
index 0a57036b9c1e7b9cb84605d22d157065f8d497ef..c8e7dbcf7477336f7b5dd8bc0c9a4671e0c8c126 100755 (executable)
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />   \r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />   \r
        \r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" \r
index 92bd5c0e402ac4a6f82672ee997c25c97dbc2f94..34368297cd4361f67224e5f53966e32558e127f7 100644 (file)
@@ -40,7 +40,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}_Ia32"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}"/>\r
 \r
@@ -56,7 +57,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}_Ipf"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}"/>\r
 \r
@@ -72,7 +73,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outfile="${BIN_DIR}/${ToolName}_X64"\r
         outtype="executable"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <fileset dir="${basedir}/${ToolName}" \r
         includes="${FileSet}" />\r
 \r
index 44c617360b41a04013073ce3f2928b562fe3c9a1..933cb5c1e49447c7c561c4015666890ccc567196 100644 (file)
@@ -62,7 +62,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outtype="static"\r
         debug="true"\r
         optimize="speed">\r
-      <compilerarg value="${ExtraArgus}" />\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
       <compilerarg value="-fshort-wchar" if="gcc"/>\r
 \r
       <fileset dir="${basedir}/${LibName}" \r
index 5d3770ae0f5f4fe545070d0f941f0d32b279fd1b..982b920e1797239e12c2972992c3c318990ee61f 100644 (file)
@@ -94,16 +94,32 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <isset property="env.TOOL_CHAIN" />\r
           <then>\r
             <property name="ToolChain" value="${env.TOOL_CHAIN}"/>\r
-            <property name="ExtraArgus" value="-Wno-pointer-sign" />\r
           </then>\r
           <else>\r
             <!-- Default Tool Chain is Microsoft Visual Studio -->\r
             <property name="ToolChain" value="msvc"/>\r
-            <property name="ExtraArgus" value="" />\r
           </else>\r
         </if>\r
       </then>\r
     </if>\r
+    \r
+    <if>\r
+      <equals arg1="${ToolChain}" arg2="gcc" />\r
+      <then>\r
+        <exec executable="gcc" outputproperty="host.gcc.ver">\r
+          <arg line="-E" />\r
+          <arg line="-P" />\r
+          <arg line="-x c" />\r
+          <arg line="gcc.ver" />\r
+        </exec>\r
+        <if>\r
+          <contains string="${host.gcc.ver}" substring="4" />\r
+          <then>\r
+            <property name="ExtraArgus" value="-Wno-pointer-sign" />\r
+          </then>\r
+        </if>\r
+      </then>\r
+    </if>\r
 \r
     <condition property="linux" value="true">\r
       <os name="Linux"/>\r