CMake Platform Dependent Issues: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Line 13: | Line 13: | ||
| HP-UX || uname -a || cc, aCC || __hpux || chatr program || || SHLIB_PATH (32), LD_LIBRARY_PATH (64) | | HP-UX || uname -a || cc, aCC || __hpux || chatr program || || SHLIB_PATH (32), LD_LIBRARY_PATH (64) | ||
|- | |- | ||
| AIX || uname -a || xlc, xlC || | | AIX || uname -a || xlc, xlC || _AIX || dump -H program || || LIBPATH | ||
|- | |- | ||
| SunOS || uname -a || cc, CC || __sparc || ldd program || || LD_LIBRARY_PATH (32), LD_LIBRARY_PATH_64 (64) | | SunOS || uname -a || cc, CC || __sparc || ldd program || || LD_LIBRARY_PATH (32), LD_LIBRARY_PATH_64 (64) | ||
Line 31: | Line 31: | ||
* '''†''' In order for ''depends'' to be installed, the "Win32 Platform SDK Tool" needs to be selected when installing Visual Studio (See [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vccondeterminingwhichdllstoredistribute.asp Determining Which DLLs to Redistribute]). | * '''†''' In order for ''depends'' to be installed, the "Win32 Platform SDK Tool" needs to be selected when installing Visual Studio (See [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vccondeterminingwhichdllstoredistribute.asp Determining Which DLLs to Redistribute]). | ||
{| border="1" | |||
|- bgcolor="#abcdef" | |||
! Compiler !! Command !! Languages !! Architecture Flags !!colspan=2| Macros | |||
|- | |||
|rowspan=2| GNU || gcc || C || || ||rowspan=2| __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ | |||
|- | |||
| g++ || C++ || || | |||
|- | |||
|rowspan=2| SGI MIPSpro || cc || C ||rowspan=2| -o32, -n32, -64 || ||rowspan=2| _COMPILER_VERSION, _MIPS_SIM==_ABIO32 (o32), _MIPS_SIM==_ABIN32 (n32), _MIPS_SIM==_ABI64 (64) | |||
|- | |||
| CC || C++ || | |||
|- | |||
|rowspan=2| SunPro || cc || C ||rowspan=2| -xarch=... || __SUNPRO_C ||rowspan=2| #include <sys/isa_defs.h>: _ILP32 (32), _LP64 (64) | |||
|- | |||
| CC || C++ || __SUNPRO_CC | |||
|- | |||
|rowspan=2| HP || cc || C ||rowspan=2| +DD64 || ||rowspan=2| __LP64__ (64) | |||
|- | |||
| aCC || C++ || __HP_aCC | |||
|- | |||
|rowspan=2| IBM VisualAge || xlc || C ||rowspan=2| -q32, -q64 || | |||
|- | |||
| xlC || C++ || | |||
|- | |||
|} | |||
==Compiler Options and Flags== | ==Compiler Options and Flags== |
Revision as of 19:01, 18 March 2005
The Platforms / Compilers Table
Platform | System Info | Compilers | Macros | List Dependencies | Trace Syscal/Signal | Runtime Library Path |
---|---|---|---|---|---|---|
Linux | uname -a | gcc, g++, icc | __linux | ldd program | strace | LD_LIBRARY_PATH |
HP-UX | uname -a | cc, aCC | __hpux | chatr program | SHLIB_PATH (32), LD_LIBRARY_PATH (64) | |
AIX | uname -a | xlc, xlC | _AIX | dump -H program | LIBPATH | |
SunOS | uname -a | cc, CC | __sparc | ldd program | LD_LIBRARY_PATH (32), LD_LIBRARY_PATH_64 (64) | |
IRIX | hinv, uname -a | cc, CC | __sgi | ldd program | LD_LIBRARY_PATH (o32), LD_LIBRARYN32_PATH (n32), LD_LIBRARY64_PATH (64) | |
Max OSX / Darwin | system_profiler, uname -a | gcc, g++ | __APPLE__ | otool -L program | ktrace -f outfile program; kdump outfile | DYLD_LIBRARY_PATH |
Cygwin | uname -a | gcc, g++ | __CYGWIN__, _WIN32 | depends program.exe | PATH | |
Windows | ver | Visual Studio 6, cl | _WIN32 | depends program.exe | PATH | |
Visual Studio 7, cl | depends program.exe † | |||||
Visual Studio 7.1, cl | depends program.exe † |
- † In order for depends to be installed, the "Win32 Platform SDK Tool" needs to be selected when installing Visual Studio (See Determining Which DLLs to Redistribute).
Compiler | Command | Languages | Architecture Flags | Macros | |
---|---|---|---|---|---|
GNU | gcc | C | __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ | ||
g++ | C++ | ||||
SGI MIPSpro | cc | C | -o32, -n32, -64 | _COMPILER_VERSION, _MIPS_SIM==_ABIO32 (o32), _MIPS_SIM==_ABIN32 (n32), _MIPS_SIM==_ABI64 (64) | |
CC | C++ | ||||
SunPro | cc | C | -xarch=... | __SUNPRO_C | #include <sys/isa_defs.h>: _ILP32 (32), _LP64 (64) |
CC | C++ | __SUNPRO_CC | |||
HP | cc | C | +DD64 | __LP64__ (64) | |
aCC | C++ | __HP_aCC | |||
IBM VisualAge | xlc | C | -q32, -q64 | ||
xlC | C++ |
Compiler Options and Flags
Compiler | Full warnings | Errors as warnings | Disabling a particular warning (#n) |
---|---|---|---|
gcc | -W -Wall | -Werror | |
MIPS Pro | -fullwarn | -w2 | |
icc | -Wall -w2 -Wcheck | -Werror | -wd(#n) |
xlC | -qflag=w:w or -qlanglv=ansi |
- More platform specific information can be found in ROSETTA STONE platforms table (Mostly for system administrators)
- Another even more complete table: Using static and shared libraries across platforms (For various compiler flags and options)