Support building on x64 hosts.
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 25 Jul 2006 21:08:04 +0000 (21:08 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 25 Jul 2006 21:08:04 +0000 (21:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1095 6f19259b-4bc3-4df7-8a09-765794883524

22 files changed:
Tools/Source/TianoTools/Common/build.xml
Tools/Source/TianoTools/CompressDll/build.xml
Tools/Source/TianoTools/EfiCompress/build.xml
Tools/Source/TianoTools/EfiRom/build.xml
Tools/Source/TianoTools/FlashMap/build.xml
Tools/Source/TianoTools/FwImage/build.xml
Tools/Source/TianoTools/GenCRC32Section/build.xml
Tools/Source/TianoTools/GenCapsuleHdr/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/Include/Common/BaseTypes.h
Tools/Source/TianoTools/MakeDeps/build.xml
Tools/Source/TianoTools/ModifyInf/build.xml
Tools/Source/TianoTools/SecApResetVectorFixup/build.xml
Tools/Source/TianoTools/SecFixup/build.xml
Tools/Source/TianoTools/StrGather/build.xml
Tools/Source/TianoTools/String/build.xml
Tools/Source/TianoTools/VfrCompile/build.xml
Tools/Source/TianoTools/ZeroDebugData/build.xml
Tools/Source/TianoTools/build.xml

index 749df92..5351eeb 100644 (file)
@@ -82,8 +82,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         outtype="static"\r
         optimize="speed">\r
 \r
+      <compilerarg value="-fPIC" if="x86_64_linux"/>\r
+\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
 \r
       <fileset dir="${basedir}/Common" \r
         includes="*.c" />\r
index 93873c9..1588ab6 100644 (file)
@@ -89,7 +89,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       >\r
       <fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <includepath path="${env.JAVA_HOME}/include"/>\r
       <includepath path="${env.JAVA_HOME}/include/win32" if="windows"/>\r
index f582b7b..dae9729 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index ee07603..035a6a4 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index 7b2ac0c..126893d 100644 (file)
@@ -97,7 +97,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index bd085c5..fb85dc4 100644 (file)
@@ -91,7 +91,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index 5b61b6d..dd461ad 100644 (file)
@@ -89,7 +89,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         includes="${FileSet}"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
 \r
index d05ab19..369a939 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index ccf34c8..81d4048 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index 15fbf7c..a320e8f 100644 (file)
@@ -87,6 +87,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <os family="mac"/>\r
     </condition>\r
     \r
+    <condition property="syslibdirs" value="/lib64">\r
+      <istrue value="${x86_64_linux}"/>\r
+    </condition>\r
+    \r
     <condition property="syslibdirs" value="${env.CYGWIN_HOME}/lib/e2fsprogs">\r
       <os family="windows"/>\r
     </condition>\r
@@ -123,7 +127,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
       <includepath path="${PACKAGE_DIR}/${ToolName}"/>\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
 \r
index d56a933..92fd151 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
     </cc>\r
index ac45f5e..fd92c01 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index 86c3c71..b87e714 100644 (file)
@@ -23,6 +23,7 @@
 // Include processor specific binding\r
 //\r
 #include <ProcessorBind.h>\r
+#include <stdarg.h>\r
 \r
 #define MEMORY_FENCE()  MemoryFence ()\r
 #define BREAKPOINT()    CpuBreakpoint ()\r
@@ -123,10 +124,15 @@ typedef struct {
 //\r
 #ifndef VA_START\r
 \r
-typedef CHAR8 *VA_LIST;\r
-#define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))\r
-#define VA_ARG(ap, t)   (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))\r
-#define VA_END(ap)      (ap = (VA_LIST) 0)\r
+// typedef CHAR8 *VA_LIST;\r
+// #define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))\r
+// #define VA_ARG(ap, t)   (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))\r
+// #define VA_END(ap)      (ap = (VA_LIST) 0)\r
+// Use the native arguments for tools.\r
+#define VA_START va_start\r
+#define VA_ARG   va_arg\r
+#define VA_END   va_end\r
+#define VA_LIST  va_list\r
 \r
 #endif\r
 \r
index 5498876..4cc82f0 100755 (executable)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index baa7bed..c31e553 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
 \r
     </cc>\r
index e065f7c..bad8205 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index e5e01f7..57764cc 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
     </cc>\r
index 8d2ce83..05035f4 100644 (file)
@@ -94,7 +94,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools String"/>\r
     </cc>\r
index b77b690..868a072 100644 (file)
@@ -107,6 +107,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
         outfile="${LIB_DIR}/${LibName}"\r
         outtype="static"\r
+        debug="true"\r
         optimize="speed">\r
 \r
       <compilerarg value="-fshort-wchar" if="gcc"/>\r
@@ -116,7 +117,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
       <includepath path="${PACKAGE_DIR}/${LibName}"/>\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
     </cc>\r
   </target>\r
index d927c44..9c9de38 100644 (file)
@@ -124,7 +124,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
       <includepath path="${PACKAGE_DIR}/Pccts/h"/>\r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
       <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
       <syslibset libs="${gxx_extra_libs}" if="gcc"/>\r
index fa3e637..151299b 100644 (file)
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         excludes="*.xml *.inf"/>\r
 \r
       <includepath path="${PACKAGE_DIR}/Include"/>\r
-      <includepath path="${PACKAGE_DIR}/Include/Ia32"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
       <includepath path="${PACKAGE_DIR}/Common"/>\r
     </cc>\r
   </target>\r
index ca81aae..0d6d2fb 100644 (file)
@@ -15,6 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
   <property environment="env" />\r
+  <condition property="HostArch" value="x64">\r
+    <os arch="amd64"/>\r
+  </condition>\r
+  <condition property="HostArch" value="Ia32">\r
+    <os arch="x86"/>\r
+  </condition>\r
+  <condition property="HostArch" value="Ia32">\r
+    <os arch="i386"/>\r
+  </condition>\r
   <property name="WORKSPACE" value="${env.WORKSPACE}" />\r
   <property name="WORKSPACE_DIR" value="${WORKSPACE}" />\r
   <property name="PACKAGE" value="Tools" />\r
@@ -79,6 +88,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <os name="Linux"/>\r
     </condition>\r
     \r
+    <condition property="x86_64_linux">\r
+      <and>\r
+        <os name="Linux"/>\r
+        <equals arg1="${HostArch}" arg2="x64"/>\r
+      </and>\r
+    </condition>\r
+    \r
     <condition property="windows" value="true">\r
       <os family="Windows"/>\r
     </condition>\r