diff options
| author | Richard Brooksby | 2012-05-22 21:27:55 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2012-05-22 21:27:55 +0100 |
| commit | f2f702fc18e370d9367506bbf1e449e2c622618c (patch) | |
| tree | 73b472c83e4f8bebc474493cbe3e208d8cae848a /mps/code/mpstd.h | |
| parent | 5dc28bfc61deeb7dca77b9d74194286aa15c330f (diff) | |
| download | emacs-f2f702fc18e370d9367506bbf1e449e2c622618c.tar.gz emacs-f2f702fc18e370d9367506bbf1e449e2c622618c.zip | |
Added single compilation unit version of mps library to allow global optimization and universal binary building. minor fixes to other sources to avoid clashing symbols.
Separated XCI3GC (gcc) from XCI3LL (clang) platforms, so that we can build both 32- and 64-bit binaries with clang.
Enabled universal (multi architecture) builds.
Copied from Perforce
Change: 178287
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/mpstd.h')
| -rw-r--r-- | mps/code/mpstd.h | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/mps/code/mpstd.h b/mps/code/mpstd.h index edf7ec8d933..c53fbe31989 100644 --- a/mps/code/mpstd.h +++ b/mps/code/mpstd.h | |||
| @@ -258,10 +258,12 @@ | |||
| 258 | /* GCC 4.0.1 (As supplied by Apple on Mac OS X 10.4.8 on an Intel Mac), | 258 | /* GCC 4.0.1 (As supplied by Apple on Mac OS X 10.4.8 on an Intel Mac), |
| 259 | * gcc -E -dM | 259 | * gcc -E -dM |
| 260 | * And above for xcppgc. | 260 | * And above for xcppgc. |
| 261 | * Note that Clang also defines __GNUC__ since it's generally GCC compatible, | ||
| 262 | * but that doesn't fit our system so we exclude Clang here. | ||
| 261 | */ | 263 | */ |
| 262 | 264 | ||
| 263 | #elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \ | 265 | #elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \ |
| 264 | && defined(__GNUC__) | 266 | && defined(__GNUC__) && !defined(__clang__) |
| 265 | #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI3GC) | 267 | #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI3GC) |
| 266 | #error "specified CONFIG_PF_... inconsistent with detected xci3gc" | 268 | #error "specified CONFIG_PF_... inconsistent with detected xci3gc" |
| 267 | #endif | 269 | #endif |
| @@ -276,6 +278,42 @@ | |||
| 276 | #define MPS_WORD_SHIFT 5 | 278 | #define MPS_WORD_SHIFT 5 |
| 277 | #define MPS_PF_ALIGN 4 /* I'm just guessing. */ | 279 | #define MPS_PF_ALIGN 4 /* I'm just guessing. */ |
| 278 | 280 | ||
| 281 | /* Apple clang version 3.1, clang -E -dM */ | ||
| 282 | |||
| 283 | #elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \ | ||
| 284 | && defined(__clang__) | ||
| 285 | #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI3LL) | ||
| 286 | #error "specified CONFIG_PF_... inconsistent with detected xci3ll" | ||
| 287 | #endif | ||
| 288 | #define MPS_PF_XCI3LL | ||
| 289 | #define MPS_PF_STRING "xci3ll" | ||
| 290 | #define MPS_OS_XC | ||
| 291 | #define MPS_ARCH_I3 | ||
| 292 | #define MPS_BUILD_LL | ||
| 293 | #define MPS_T_WORD unsigned long | ||
| 294 | #define MPS_T_ULONGEST unsigned long | ||
| 295 | #define MPS_WORD_WIDTH 32 | ||
| 296 | #define MPS_WORD_SHIFT 5 | ||
| 297 | #define MPS_PF_ALIGN 4 /* I'm just guessing. */ | ||
| 298 | |||
| 299 | /* Apple clang version 3.1, clang -E -dM */ | ||
| 300 | |||
| 301 | #elif defined(__APPLE__) && defined(__x86_64__) && defined(__MACH__) \ | ||
| 302 | && defined(__clang__) | ||
| 303 | #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI6LL) | ||
| 304 | #error "specified CONFIG_PF_... inconsistent with detected xci6ll" | ||
| 305 | #endif | ||
| 306 | #define MPS_PF_XCI6LL | ||
| 307 | #define MPS_PF_STRING "xci6ll" | ||
| 308 | #define MPS_OS_XC | ||
| 309 | #define MPS_ARCH_I6 | ||
| 310 | #define MPS_BUILD_LL | ||
| 311 | #define MPS_T_WORD unsigned long | ||
| 312 | #define MPS_T_ULONGEST unsigned long | ||
| 313 | #define MPS_WORD_WIDTH 64 | ||
| 314 | #define MPS_WORD_SHIFT 6 | ||
| 315 | #define MPS_PF_ALIGN 8 | ||
| 316 | |||
| 279 | /* GCC 2.5.8, gcc -E -dM, (__SVR4 indicates Solaris) */ | 317 | /* GCC 2.5.8, gcc -E -dM, (__SVR4 indicates Solaris) */ |
| 280 | 318 | ||
| 281 | #elif defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \ | 319 | #elif defined(__sun__) && defined(__sparc__) && defined(__GNUC__) \ |
| @@ -440,24 +478,6 @@ | |||
| 440 | #define MPS_WORD_SHIFT 5 | 478 | #define MPS_WORD_SHIFT 5 |
| 441 | #define MPS_PF_ALIGN 4 | 479 | #define MPS_PF_ALIGN 4 |
| 442 | 480 | ||
| 443 | /* Apple clang version 3.1, clang -E -dM */ | ||
| 444 | |||
| 445 | #elif defined(__APPLE__) && defined(__x86_64__) && defined(__MACH__) \ | ||
| 446 | && defined(__clang__) | ||
| 447 | #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI6LL) | ||
| 448 | #error "specified CONFIG_PF_... inconsistent with detected xci6ll" | ||
| 449 | #endif | ||
| 450 | #define MPS_PF_XCI6LL | ||
| 451 | #define MPS_PF_STRING "xci6ll" | ||
| 452 | #define MPS_OS_XC | ||
| 453 | #define MPS_ARCH_I6 | ||
| 454 | #define MPS_BUILD_LL | ||
| 455 | #define MPS_T_WORD unsigned long | ||
| 456 | #define MPS_T_ULONGEST unsigned long | ||
| 457 | #define MPS_WORD_WIDTH 64 | ||
| 458 | #define MPS_WORD_SHIFT 6 | ||
| 459 | #define MPS_PF_ALIGN 8 | ||
| 460 | |||
| 461 | #else | 481 | #else |
| 462 | #error "Unable to detect target platform" | 482 | #error "Unable to detect target platform" |
| 463 | #endif | 483 | #endif |