summaryrefslogtreecommitdiff
path: root/Tools/CCode
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-04 06:08:27 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-04 06:08:27 +0000
commit327bd141ad219ceddf52850490ca306799cd4504 (patch)
tree596f640e9047d2930b735fb78c9e9b10d79f41d6 /Tools/CCode
parent8d4243f1bd81497181a3cc135239422c43364105 (diff)
downloadedk2-327bd141ad219ceddf52850490ca306799cd4504.zip
edk2-327bd141ad219ceddf52850490ca306799cd4504.tar.gz
edk2-327bd141ad219ceddf52850490ca306799cd4504.tar.bz2
Fix building error in Linux
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2165 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/CCode')
-rw-r--r--Tools/CCode/Source/GenFvMap/GenFvMap.cpp8
-rw-r--r--Tools/CCode/Source/GenFvMap/build.xml20
2 files changed, 21 insertions, 7 deletions
diff --git a/Tools/CCode/Source/GenFvMap/GenFvMap.cpp b/Tools/CCode/Source/GenFvMap/GenFvMap.cpp
index 0ff5bd0..1bd7b38 100644
--- a/Tools/CCode/Source/GenFvMap/GenFvMap.cpp
+++ b/Tools/CCode/Source/GenFvMap/GenFvMap.cpp
@@ -8,11 +8,11 @@
//** from the company.
//**
//****************************************************************************
-
+#include "ProcessorBind.h"
+#include <iostream>
#include <stdexcept>
#include <list>
#include <map>
-#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
@@ -22,7 +22,7 @@
#include <functional>
using namespace std;
-typedef unsigned __int64 ulonglong_t;
+typedef UINT64 ulonglong_t;
template <class T>
class CMemoryLeakChecker : public list<T*>
@@ -142,7 +142,7 @@ ostream& operator << (ostream& os, const CIdentity& idRight)
<< setw(4) << (unsigned short)(idRight.m_ullId[0] >> 16) << '-'
<< setw(4) << (unsigned short)idRight.m_ullId[0] << '-'
<< setw(4) << (unsigned short)(idRight.m_ullId[1] >> 48) << '-'
- << setw(12) << (idRight.m_ullId[1] & 0xffffffffffff);
+ << setw(12) << (idRight.m_ullId[1] & 0xffffffffffffULL);
}
class CInputFile : public CObjRoot
diff --git a/Tools/CCode/Source/GenFvMap/build.xml b/Tools/CCode/Source/GenFvMap/build.xml
index 4d7e155..6d87631 100644
--- a/Tools/CCode/Source/GenFvMap/build.xml
+++ b/Tools/CCode/Source/GenFvMap/build.xml
@@ -33,15 +33,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</target>
<target name="Tool" depends="init">
+ <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">
+ <os family="mac"/>
+ </condition>
+
+ <condition property="gxx_extra_libs" value="stdc++">
+ <os name="linux"/>
+ </condition>
+
+ <condition property="gxx_extra_libs" value="stdc++">
+ <os family="windows"/>
+ </condition>
+
<cc name="${ToolChain}" objdir="${BUILD_DIR}"
outfile="${BIN_DIR}/${ToolName}"
outtype="executable"
debug="true"
optimize="speed">
<compilerarg value="${ExtraArgus}" if="ExtraArgus" />
- <compilerarg value="/EHsc" unless="GCC"/>
- <compilerarg value="/Za" unless="GCC"/>
-
+ <compilerarg value="/EHsc" unless="gcc"/>
+ <compilerarg value="/Za" unless="gcc"/>
+ <compilerarg value="-x c++" if="gcc"/>
+
<fileset dir="${basedir}/${ToolName}"
includes="${FileSet}"
defaultexcludes="TRUE"
@@ -51,6 +64,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
<includepath path="${PACKAGE_DIR}/Common"/>
<libset dir="${LIB_DIR}" libs="CommonTools"/>
+ <syslibset libs="${gxx_extra_libs}" if="gcc"/>
</cc>
</target>