summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-25 21:08:04 +0000
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-25 21:08:04 +0000
commitc7c42e40015a9e95631659aebd83fa1830c8602d (patch)
treecff7caf80fb56a055f5b941f989293d0ff9bc63a
parent4cb2253560c1e2609d9952881a16f116b67db649 (diff)
downloadedk2-platforms-c7c42e40015a9e95631659aebd83fa1830c8602d.tar.xz
Support building on x64 hosts.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1095 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--Tools/Source/TianoTools/Common/build.xml4
-rw-r--r--Tools/Source/TianoTools/CompressDll/build.xml2
-rw-r--r--Tools/Source/TianoTools/EfiCompress/build.xml2
-rw-r--r--Tools/Source/TianoTools/EfiRom/build.xml2
-rw-r--r--Tools/Source/TianoTools/FlashMap/build.xml2
-rw-r--r--Tools/Source/TianoTools/FwImage/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenCRC32Section/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenCapsuleHdr/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenFfsFile/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenFvImage/build.xml6
-rw-r--r--Tools/Source/TianoTools/GenSection/build.xml2
-rw-r--r--Tools/Source/TianoTools/GenTEImage/build.xml2
-rw-r--r--Tools/Source/TianoTools/Include/Common/BaseTypes.h14
-rwxr-xr-xTools/Source/TianoTools/MakeDeps/build.xml2
-rw-r--r--Tools/Source/TianoTools/ModifyInf/build.xml2
-rw-r--r--Tools/Source/TianoTools/SecApResetVectorFixup/build.xml2
-rw-r--r--Tools/Source/TianoTools/SecFixup/build.xml2
-rw-r--r--Tools/Source/TianoTools/StrGather/build.xml2
-rw-r--r--Tools/Source/TianoTools/String/build.xml3
-rw-r--r--Tools/Source/TianoTools/VfrCompile/build.xml2
-rw-r--r--Tools/Source/TianoTools/ZeroDebugData/build.xml2
-rw-r--r--Tools/Source/TianoTools/build.xml16
22 files changed, 53 insertions, 24 deletions
diff --git a/Tools/Source/TianoTools/Common/build.xml b/Tools/Source/TianoTools/Common/build.xml
index 749df92bca..5351eebe09 100644
--- a/Tools/Source/TianoTools/Common/build.xml
+++ b/Tools/Source/TianoTools/Common/build.xml
@@ -82,8 +82,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
outtype="static"
optimize="speed">
+ <compilerarg value="-fPIC" if="x86_64_linux"/>
+
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<fileset dir="${basedir}/Common"
includes="*.c" />
diff --git a/Tools/Source/TianoTools/CompressDll/build.xml b/Tools/Source/TianoTools/CompressDll/build.xml
index 93873c9932..1588ab6dad 100644
--- a/Tools/Source/TianoTools/CompressDll/build.xml
+++ b/Tools/Source/TianoTools/CompressDll/build.xml
@@ -89,7 +89,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
>
<fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<includepath path="${env.JAVA_HOME}/include"/>
<includepath path="${env.JAVA_HOME}/include/win32" if="windows"/>
diff --git a/Tools/Source/TianoTools/EfiCompress/build.xml b/Tools/Source/TianoTools/EfiCompress/build.xml
index f582b7bc29..dae9729146 100644
--- a/Tools/Source/TianoTools/EfiCompress/build.xml
+++ b/Tools/Source/TianoTools/EfiCompress/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/EfiRom/build.xml b/Tools/Source/TianoTools/EfiRom/build.xml
index ee07603e8c..035a6a4b6a 100644
--- a/Tools/Source/TianoTools/EfiRom/build.xml
+++ b/Tools/Source/TianoTools/EfiRom/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/FlashMap/build.xml b/Tools/Source/TianoTools/FlashMap/build.xml
index 7b2ac0ce8f..126893d5e6 100644
--- a/Tools/Source/TianoTools/FlashMap/build.xml
+++ b/Tools/Source/TianoTools/FlashMap/build.xml
@@ -97,7 +97,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/FwImage/build.xml b/Tools/Source/TianoTools/FwImage/build.xml
index bd085c55ac..fb85dc4ea7 100644
--- a/Tools/Source/TianoTools/FwImage/build.xml
+++ b/Tools/Source/TianoTools/FwImage/build.xml
@@ -91,7 +91,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/GenCRC32Section/build.xml b/Tools/Source/TianoTools/GenCRC32Section/build.xml
index 5b61b6d62e..dd461ad0cc 100644
--- a/Tools/Source/TianoTools/GenCRC32Section/build.xml
+++ b/Tools/Source/TianoTools/GenCRC32Section/build.xml
@@ -89,7 +89,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
includes="${FileSet}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
diff --git a/Tools/Source/TianoTools/GenCapsuleHdr/build.xml b/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
index d05ab1983c..369a9395a4 100644
--- a/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
+++ b/Tools/Source/TianoTools/GenCapsuleHdr/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/GenFfsFile/build.xml b/Tools/Source/TianoTools/GenFfsFile/build.xml
index ccf34c82cd..81d4048949 100644
--- a/Tools/Source/TianoTools/GenFfsFile/build.xml
+++ b/Tools/Source/TianoTools/GenFfsFile/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
</cc>
diff --git a/Tools/Source/TianoTools/GenFvImage/build.xml b/Tools/Source/TianoTools/GenFvImage/build.xml
index 15fbf7cb35..a320e8f3ed 100644
--- a/Tools/Source/TianoTools/GenFvImage/build.xml
+++ b/Tools/Source/TianoTools/GenFvImage/build.xml
@@ -87,6 +87,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<os family="mac"/>
</condition>
+ <condition property="syslibdirs" value="/lib64">
+ <istrue value="${x86_64_linux}"/>
+ </condition>
+
<condition property="syslibdirs" value="${env.CYGWIN_HOME}/lib/e2fsprogs">
<os family="windows"/>
</condition>
@@ -123,7 +127,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<includepath path="${PACKAGE_DIR}/${ToolName}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
diff --git a/Tools/Source/TianoTools/GenSection/build.xml b/Tools/Source/TianoTools/GenSection/build.xml
index d56a933b34..92fd151454 100644
--- a/Tools/Source/TianoTools/GenSection/build.xml
+++ b/Tools/Source/TianoTools/GenSection/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>
</cc>
diff --git a/Tools/Source/TianoTools/GenTEImage/build.xml b/Tools/Source/TianoTools/GenTEImage/build.xml
index ac45f5ed4c..fd92c01bba 100644
--- a/Tools/Source/TianoTools/GenTEImage/build.xml
+++ b/Tools/Source/TianoTools/GenTEImage/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/Include/Common/BaseTypes.h b/Tools/Source/TianoTools/Include/Common/BaseTypes.h
index 86c3c71fb3..b87e7141e6 100644
--- a/Tools/Source/TianoTools/Include/Common/BaseTypes.h
+++ b/Tools/Source/TianoTools/Include/Common/BaseTypes.h
@@ -23,6 +23,7 @@
// Include processor specific binding
//
#include <ProcessorBind.h>
+#include <stdarg.h>
#define MEMORY_FENCE() MemoryFence ()
#define BREAKPOINT() CpuBreakpoint ()
@@ -123,10 +124,15 @@ typedef struct {
//
#ifndef VA_START
-typedef CHAR8 *VA_LIST;
-#define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))
-#define VA_ARG(ap, t) (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))
-#define VA_END(ap) (ap = (VA_LIST) 0)
+// typedef CHAR8 *VA_LIST;
+// #define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))
+// #define VA_ARG(ap, t) (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))
+// #define VA_END(ap) (ap = (VA_LIST) 0)
+// Use the native arguments for tools.
+#define VA_START va_start
+#define VA_ARG va_arg
+#define VA_END va_end
+#define VA_LIST va_list
#endif
diff --git a/Tools/Source/TianoTools/MakeDeps/build.xml b/Tools/Source/TianoTools/MakeDeps/build.xml
index 54988762b2..4cc82f0ebb 100755
--- a/Tools/Source/TianoTools/MakeDeps/build.xml
+++ b/Tools/Source/TianoTools/MakeDeps/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/ModifyInf/build.xml b/Tools/Source/TianoTools/ModifyInf/build.xml
index baa7bedaa3..c31e553790 100644
--- a/Tools/Source/TianoTools/ModifyInf/build.xml
+++ b/Tools/Source/TianoTools/ModifyInf/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
diff --git a/Tools/Source/TianoTools/SecApResetVectorFixup/build.xml b/Tools/Source/TianoTools/SecApResetVectorFixup/build.xml
index e065f7cc82..bad8205131 100644
--- a/Tools/Source/TianoTools/SecApResetVectorFixup/build.xml
+++ b/Tools/Source/TianoTools/SecApResetVectorFixup/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/SecFixup/build.xml b/Tools/Source/TianoTools/SecFixup/build.xml
index e5e01f7ade..57764ccead 100644
--- a/Tools/Source/TianoTools/SecFixup/build.xml
+++ b/Tools/Source/TianoTools/SecFixup/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
</cc>
diff --git a/Tools/Source/TianoTools/StrGather/build.xml b/Tools/Source/TianoTools/StrGather/build.xml
index 8d2ce83a8b..05035f488a 100644
--- a/Tools/Source/TianoTools/StrGather/build.xml
+++ b/Tools/Source/TianoTools/StrGather/build.xml
@@ -94,7 +94,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools String"/>
</cc>
diff --git a/Tools/Source/TianoTools/String/build.xml b/Tools/Source/TianoTools/String/build.xml
index b77b690697..868a072e24 100644
--- a/Tools/Source/TianoTools/String/build.xml
+++ b/Tools/Source/TianoTools/String/build.xml
@@ -107,6 +107,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<cc name="${ToolChain}" objdir="${BUILD_DIR}"
outfile="${LIB_DIR}/${LibName}"
outtype="static"
+ debug="true"
optimize="speed">
<compilerarg value="-fshort-wchar" if="gcc"/>
@@ -116,7 +117,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<includepath path="${PACKAGE_DIR}/${LibName}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
</target>
diff --git a/Tools/Source/TianoTools/VfrCompile/build.xml b/Tools/Source/TianoTools/VfrCompile/build.xml
index d927c44a57..9c9de3879f 100644
--- a/Tools/Source/TianoTools/VfrCompile/build.xml
+++ b/Tools/Source/TianoTools/VfrCompile/build.xml
@@ -124,7 +124,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<includepath path="${PACKAGE_DIR}/Pccts/h"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
<syslibset libs="${gxx_extra_libs}" if="gcc"/>
diff --git a/Tools/Source/TianoTools/ZeroDebugData/build.xml b/Tools/Source/TianoTools/ZeroDebugData/build.xml
index fa3e63731e..151299bc9c 100644
--- a/Tools/Source/TianoTools/ZeroDebugData/build.xml
+++ b/Tools/Source/TianoTools/ZeroDebugData/build.xml
@@ -92,7 +92,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
excludes="*.xml *.inf"/>
<includepath path="${PACKAGE_DIR}/Include"/>
- <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
+ <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
</target>
diff --git a/Tools/Source/TianoTools/build.xml b/Tools/Source/TianoTools/build.xml
index ca81aae7c5..0d6d2fbc6f 100644
--- a/Tools/Source/TianoTools/build.xml
+++ b/Tools/Source/TianoTools/build.xml
@@ -15,6 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property environment="env" />
+ <condition property="HostArch" value="x64">
+ <os arch="amd64"/>
+ </condition>
+ <condition property="HostArch" value="Ia32">
+ <os arch="x86"/>
+ </condition>
+ <condition property="HostArch" value="Ia32">
+ <os arch="i386"/>
+ </condition>
<property name="WORKSPACE" value="${env.WORKSPACE}" />
<property name="WORKSPACE_DIR" value="${WORKSPACE}" />
<property name="PACKAGE" value="Tools" />
@@ -79,6 +88,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<os name="Linux"/>
</condition>
+ <condition property="x86_64_linux">
+ <and>
+ <os name="Linux"/>
+ <equals arg1="${HostArch}" arg2="x64"/>
+ </and>
+ </condition>
+
<condition property="windows" value="true">
<os family="Windows"/>
</condition>