Fix building error in Linux
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Jan 2007 06:08:27 +0000 (06:08 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 4 Jan 2007 06:08:27 +0000 (06:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2165 6f19259b-4bc3-4df7-8a09-765794883524

Tools/CCode/Source/GenFvMap/GenFvMap.cpp
Tools/CCode/Source/GenFvMap/build.xml

index 0ff5bd0..1bd7b38 100644 (file)
@@ -8,11 +8,11 @@
 //** from the company.\r
 //**\r
 //****************************************************************************\r
-\r
+#include "ProcessorBind.h"\r
+#include <iostream>\r
 #include <stdexcept>\r
 #include <list>\r
 #include <map>\r
-#include <iostream>\r
 #include <iomanip>\r
 #include <fstream>\r
 #include <sstream>\r
@@ -22,7 +22,7 @@
 #include <functional>\r
 using namespace std;\r
 \r
-typedef unsigned __int64 ulonglong_t;\r
+typedef UINT64 ulonglong_t;\r
 \r
 template <class T>\r
 class CMemoryLeakChecker : public list<T*>\r
@@ -142,7 +142,7 @@ ostream& operator << (ostream& os, const CIdentity& idRight)
         << setw(4) << (unsigned short)(idRight.m_ullId[0] >> 16) << '-'\r
         << setw(4) << (unsigned short)idRight.m_ullId[0] << '-'\r
         << setw(4) << (unsigned short)(idRight.m_ullId[1] >> 48) << '-'\r
-        << setw(12) <<  (idRight.m_ullId[1] & 0xffffffffffff);\r
+        << setw(12) <<  (idRight.m_ullId[1] & 0xffffffffffffULL);\r
 }\r
 \r
 class CInputFile : public CObjRoot\r
index 4d7e155..6d87631 100644 (file)
@@ -33,15 +33,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   </target>\r
 \r
   <target name="Tool" depends="init">\r
+    <condition property="gxx_extra_libs" value="stdc++ System gcc_s.10.4 gcc">\r
+      <os family="mac"/>\r
+    </condition>\r
+    \r
+    <condition property="gxx_extra_libs" value="stdc++">\r
+      <os name="linux"/>\r
+    </condition>\r
+    \r
+    <condition property="gxx_extra_libs" value="stdc++">\r
+      <os family="windows"/>\r
+    </condition>\r
+  \r
     <cc name="${ToolChain}" objdir="${BUILD_DIR}"\r
         outfile="${BIN_DIR}/${ToolName}"\r
         outtype="executable"\r
         debug="true"\r
         optimize="speed">\r
       <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
-      <compilerarg value="/EHsc" unless="GCC"/>\r
-      <compilerarg value="/Za" unless="GCC"/>\r
-\r
+      <compilerarg value="/EHsc" unless="gcc"/>\r
+      <compilerarg value="/Za" unless="gcc"/>\r
+      <compilerarg value="-x c++" if="gcc"/>\r
+      \r
       <fileset dir="${basedir}/${ToolName}"\r
         includes="${FileSet}"\r
         defaultexcludes="TRUE"\r
@@ -51,6 +64,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <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
     </cc>\r
   </target>\r
 \r