Commit dfe5fff3eaab1285cd1565fa0a33e5acd13b279c
Committed by
Anthony Liguori
1 parent
a8cd70fc
change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
10 changed files
with
28 additions
and
23 deletions
configure
| @@ -1588,7 +1588,8 @@ fi | @@ -1588,7 +1588,8 @@ fi | ||
| 1588 | 1588 | ||
| 1589 | if test "$solaris" = "yes" ; then | 1589 | if test "$solaris" = "yes" ; then |
| 1590 | echo "CONFIG_SOLARIS=y" >> $config_host_mak | 1590 | echo "CONFIG_SOLARIS=y" >> $config_host_mak |
| 1591 | - echo "#define HOST_SOLARIS $solarisrev" >> $config_host_h | 1591 | + echo "#define CONFIG_SOLARIS 1" >> $config_host_h |
| 1592 | + echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h | ||
| 1592 | if test "$needs_libsunmath" = "yes" ; then | 1593 | if test "$needs_libsunmath" = "yes" ; then |
| 1593 | echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak | 1594 | echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak |
| 1594 | echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h | 1595 | echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h |
cpu-exec.c
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | #endif | 38 | #endif |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | -#if defined(__sparc__) && !defined(HOST_SOLARIS) | 41 | +#if defined(__sparc__) && !defined(CONFIG_SOLARIS) |
| 42 | // Work around ugly bugs in glibc that mangle global register contents | 42 | // Work around ugly bugs in glibc that mangle global register contents |
| 43 | #undef env | 43 | #undef env |
| 44 | #define env cpu_single_env | 44 | #define env cpu_single_env |
| @@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1) | @@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1) | ||
| 258 | /* prepare setjmp context for exception handling */ | 258 | /* prepare setjmp context for exception handling */ |
| 259 | for(;;) { | 259 | for(;;) { |
| 260 | if (setjmp(env->jmp_env) == 0) { | 260 | if (setjmp(env->jmp_env) == 0) { |
| 261 | -#if defined(__sparc__) && !defined(HOST_SOLARIS) | 261 | +#if defined(__sparc__) && !defined(CONFIG_SOLARIS) |
| 262 | #undef env | 262 | #undef env |
| 263 | env = cpu_single_env; | 263 | env = cpu_single_env; |
| 264 | #define env cpu_single_env | 264 | #define env cpu_single_env |
| @@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1) | @@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1) | ||
| 414 | env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); | 414 | env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); |
| 415 | intno = cpu_get_pic_interrupt(env); | 415 | intno = cpu_get_pic_interrupt(env); |
| 416 | qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno); | 416 | qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno); |
| 417 | -#if defined(__sparc__) && !defined(HOST_SOLARIS) | 417 | +#if defined(__sparc__) && !defined(CONFIG_SOLARIS) |
| 418 | #undef env | 418 | #undef env |
| 419 | env = cpu_single_env; | 419 | env = cpu_single_env; |
| 420 | #define env cpu_single_env | 420 | #define env cpu_single_env |
| @@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1) | @@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1) | ||
| 644 | while (env->current_tb) { | 644 | while (env->current_tb) { |
| 645 | tc_ptr = tb->tc_ptr; | 645 | tc_ptr = tb->tc_ptr; |
| 646 | /* execute the generated code */ | 646 | /* execute the generated code */ |
| 647 | -#if defined(__sparc__) && !defined(HOST_SOLARIS) | 647 | +#if defined(__sparc__) && !defined(CONFIG_SOLARIS) |
| 648 | #undef env | 648 | #undef env |
| 649 | env = cpu_single_env; | 649 | env = cpu_single_env; |
| 650 | #define env cpu_single_env | 650 | #define env cpu_single_env |
| @@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, | @@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, | ||
| 1435 | siginfo_t *info = pinfo; | 1435 | siginfo_t *info = pinfo; |
| 1436 | int is_write; | 1436 | int is_write; |
| 1437 | uint32_t insn; | 1437 | uint32_t insn; |
| 1438 | -#if !defined(__arch64__) || defined(HOST_SOLARIS) | 1438 | +#if !defined(__arch64__) || defined(CONFIG_SOLARIS) |
| 1439 | uint32_t *regs = (uint32_t *)(info + 1); | 1439 | uint32_t *regs = (uint32_t *)(info + 1); |
| 1440 | void *sigmask = (regs + 20); | 1440 | void *sigmask = (regs + 20); |
| 1441 | /* XXX: is there a standard glibc define ? */ | 1441 | /* XXX: is there a standard glibc define ? */ |
dyngen-exec.h
| @@ -75,7 +75,7 @@ extern int printf(const char *, ...); | @@ -75,7 +75,7 @@ extern int printf(const char *, ...); | ||
| 75 | #define AREG1 "s0" | 75 | #define AREG1 "s0" |
| 76 | #define AREG2 "s1" | 76 | #define AREG2 "s1" |
| 77 | #elif defined(__sparc__) | 77 | #elif defined(__sparc__) |
| 78 | -#ifdef HOST_SOLARIS | 78 | +#ifdef CONFIG_SOLARIS |
| 79 | #define AREG0 "g2" | 79 | #define AREG0 "g2" |
| 80 | #define AREG1 "g3" | 80 | #define AREG1 "g3" |
| 81 | #define AREG2 "g4" | 81 | #define AREG2 "g4" |
fpu/softfloat-native.c
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | context is supported */ | 2 | context is supported */ |
| 3 | #include "softfloat.h" | 3 | #include "softfloat.h" |
| 4 | #include <math.h> | 4 | #include <math.h> |
| 5 | -#if defined(HOST_SOLARIS) | 5 | +#if defined(CONFIG_SOLARIS) |
| 6 | #include <fenv.h> | 6 | #include <fenv.h> |
| 7 | #endif | 7 | #endif |
| 8 | 8 | ||
| @@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) | @@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) | ||
| 10 | { | 10 | { |
| 11 | STATUS(float_rounding_mode) = val; | 11 | STATUS(float_rounding_mode) = val; |
| 12 | #if defined(HOST_BSD) && !defined(__APPLE__) || \ | 12 | #if defined(HOST_BSD) && !defined(__APPLE__) || \ |
| 13 | - (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) | 13 | + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) |
| 14 | fpsetround(val); | 14 | fpsetround(val); |
| 15 | #elif defined(__arm__) | 15 | #elif defined(__arm__) |
| 16 | /* nothing to do */ | 16 | /* nothing to do */ |
| @@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) | @@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) | ||
| 26 | } | 26 | } |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | -#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) | 29 | +#if defined(HOST_BSD) || \ |
| 30 | + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) | ||
| 30 | #define lrint(d) ((int32_t)rint(d)) | 31 | #define lrint(d) ((int32_t)rint(d)) |
| 31 | #define llrint(d) ((int64_t)rint(d)) | 32 | #define llrint(d) ((int64_t)rint(d)) |
| 32 | #define lrintf(f) ((int32_t)rint(f)) | 33 | #define lrintf(f) ((int32_t)rint(f)) |
| @@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) | @@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) | ||
| 34 | #define sqrtf(f) ((float)sqrt(f)) | 35 | #define sqrtf(f) ((float)sqrt(f)) |
| 35 | #define remainderf(fa, fb) ((float)remainder(fa, fb)) | 36 | #define remainderf(fa, fb) ((float)remainder(fa, fb)) |
| 36 | #define rintf(f) ((float)rint(f)) | 37 | #define rintf(f) ((float)rint(f)) |
| 37 | -#if !defined(__sparc__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 | 38 | +#if !defined(__sparc__) && \ |
| 39 | + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) | ||
| 38 | extern long double rintl(long double); | 40 | extern long double rintl(long double); |
| 39 | extern long double scalbnl(long double, int); | 41 | extern long double scalbnl(long double, int); |
| 40 | 42 | ||
| @@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) | @@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) | ||
| 349 | /*---------------------------------------------------------------------------- | 351 | /*---------------------------------------------------------------------------- |
| 350 | | Software IEC/IEEE double-precision operations. | 352 | | Software IEC/IEEE double-precision operations. |
| 351 | *----------------------------------------------------------------------------*/ | 353 | *----------------------------------------------------------------------------*/ |
| 352 | -#if defined(__sun__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 | 354 | +#if defined(__sun__) && \ |
| 355 | + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) | ||
| 353 | static inline float64 trunc(float64 x) | 356 | static inline float64 trunc(float64 x) |
| 354 | { | 357 | { |
| 355 | return x < 0 ? -floor(-x) : floor(x); | 358 | return x < 0 ? -floor(-x) : floor(x); |
fpu/softfloat-native.h
| 1 | /* Native implementation of soft float functions */ | 1 | /* Native implementation of soft float functions */ |
| 2 | #include <math.h> | 2 | #include <math.h> |
| 3 | 3 | ||
| 4 | -#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) | 4 | +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS) |
| 5 | #include <ieeefp.h> | 5 | #include <ieeefp.h> |
| 6 | #define fabsf(f) ((float)fabs(f)) | 6 | #define fabsf(f) ((float)fabs(f)) |
| 7 | #else | 7 | #else |
| @@ -19,8 +19,9 @@ | @@ -19,8 +19,9 @@ | ||
| 19 | * Solaris 10 with GCC4 does not need these macros as they | 19 | * Solaris 10 with GCC4 does not need these macros as they |
| 20 | * are defined in <iso/math_c99.h> with a compiler directive | 20 | * are defined in <iso/math_c99.h> with a compiler directive |
| 21 | */ | 21 | */ |
| 22 | -#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \ | ||
| 23 | - && (__GNUC__ < 4))) \ | 22 | +#if defined(CONFIG_SOLARIS) && \ |
| 23 | + ((CONFIG_SOLARIS_VERSION <= 9 ) || \ | ||
| 24 | + ((CONFIG_SOLARIS_VERSION >= 10) && (__GNUC__ < 4))) \ | ||
| 24 | || (defined(__OpenBSD__) && (OpenBSD < 200811)) | 25 | || (defined(__OpenBSD__) && (OpenBSD < 200811)) |
| 25 | /* | 26 | /* |
| 26 | * C99 7.12.3 classification macros | 27 | * C99 7.12.3 classification macros |
| @@ -111,7 +112,7 @@ typedef union { | @@ -111,7 +112,7 @@ typedef union { | ||
| 111 | /*---------------------------------------------------------------------------- | 112 | /*---------------------------------------------------------------------------- |
| 112 | | Software IEC/IEEE floating-point rounding mode. | 113 | | Software IEC/IEEE floating-point rounding mode. |
| 113 | *----------------------------------------------------------------------------*/ | 114 | *----------------------------------------------------------------------------*/ |
| 114 | -#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) | 115 | +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS) |
| 115 | #if defined(__OpenBSD__) | 116 | #if defined(__OpenBSD__) |
| 116 | #define FE_RM FP_RM | 117 | #define FE_RM FP_RM |
| 117 | #define FE_RP FP_RP | 118 | #define FE_RP FP_RP |
fpu/softfloat.h
| @@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained. | @@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained. | ||
| 32 | #ifndef SOFTFLOAT_H | 32 | #ifndef SOFTFLOAT_H |
| 33 | #define SOFTFLOAT_H | 33 | #define SOFTFLOAT_H |
| 34 | 34 | ||
| 35 | -#if defined(HOST_SOLARIS) && defined(NEEDS_LIBSUNMATH) | 35 | +#if defined(CONFIG_SOLARIS) && defined(NEEDS_LIBSUNMATH) |
| 36 | #include <sunmath.h> | 36 | #include <sunmath.h> |
| 37 | #endif | 37 | #endif |
| 38 | 38 |
kqemu.c
| @@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
| 25 | #include <sys/mman.h> | 25 | #include <sys/mman.h> |
| 26 | #include <sys/ioctl.h> | 26 | #include <sys/ioctl.h> |
| 27 | #endif | 27 | #endif |
| 28 | -#ifdef HOST_SOLARIS | 28 | +#ifdef CONFIG_SOLARIS |
| 29 | #include <sys/ioccom.h> | 29 | #include <sys/ioccom.h> |
| 30 | #endif | 30 | #endif |
| 31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
osdep.c
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | #include <errno.h> | 28 | #include <errno.h> |
| 29 | #include <unistd.h> | 29 | #include <unistd.h> |
| 30 | #include <fcntl.h> | 30 | #include <fcntl.h> |
| 31 | -#ifdef HOST_SOLARIS | 31 | +#ifdef CONFIG_SOLARIS |
| 32 | #include <sys/types.h> | 32 | #include <sys/types.h> |
| 33 | #include <sys/statvfs.h> | 33 | #include <sys/statvfs.h> |
| 34 | #endif | 34 | #endif |
| @@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size) | @@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size) | ||
| 116 | int map_anon = 0; | 116 | int map_anon = 0; |
| 117 | const char *tmpdir; | 117 | const char *tmpdir; |
| 118 | char phys_ram_file[1024]; | 118 | char phys_ram_file[1024]; |
| 119 | -#ifdef HOST_SOLARIS | 119 | +#ifdef CONFIG_SOLARIS |
| 120 | struct statvfs stfs; | 120 | struct statvfs stfs; |
| 121 | #else | 121 | #else |
| 122 | struct statfs stfs; | 122 | struct statfs stfs; |
| @@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size) | @@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size) | ||
| 129 | if (phys_ram_fd < 0) { | 129 | if (phys_ram_fd < 0) { |
| 130 | tmpdir = getenv("QEMU_TMPDIR"); | 130 | tmpdir = getenv("QEMU_TMPDIR"); |
| 131 | if (!tmpdir) | 131 | if (!tmpdir) |
| 132 | -#ifdef HOST_SOLARIS | 132 | +#ifdef CONFIG_SOLARIS |
| 133 | tmpdir = "/tmp"; | 133 | tmpdir = "/tmp"; |
| 134 | if (statvfs(tmpdir, &stfs) == 0) { | 134 | if (statvfs(tmpdir, &stfs) == 0) { |
| 135 | #else | 135 | #else |
target-mips/cpu.h
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14 | ||
| 15 | // uint_fast8_t and uint_fast16_t not in <sys/int_types.h> | 15 | // uint_fast8_t and uint_fast16_t not in <sys/int_types.h> |
| 16 | // XXX: move that elsewhere | 16 | // XXX: move that elsewhere |
| 17 | -#if defined(HOST_SOLARIS) && HOST_SOLARIS < 10 | 17 | +#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10 |
| 18 | typedef unsigned char uint_fast8_t; | 18 | typedef unsigned char uint_fast8_t; |
| 19 | typedef unsigned int uint_fast16_t; | 19 | typedef unsigned int uint_fast16_t; |
| 20 | #endif | 20 | #endif |
tcg/sparc/tcg-target.h
| @@ -95,7 +95,7 @@ enum { | @@ -95,7 +95,7 @@ enum { | ||
| 95 | 95 | ||
| 96 | 96 | ||
| 97 | /* Note: must be synced with dyngen-exec.h and Makefile.target */ | 97 | /* Note: must be synced with dyngen-exec.h and Makefile.target */ |
| 98 | -#ifdef HOST_SOLARIS | 98 | +#ifdef CONFIG_SOLARIS |
| 99 | #define TCG_AREG0 TCG_REG_G2 | 99 | #define TCG_AREG0 TCG_REG_G2 |
| 100 | #define TCG_AREG1 TCG_REG_G3 | 100 | #define TCG_AREG1 TCG_REG_G3 |
| 101 | #define TCG_AREG2 TCG_REG_G4 | 101 | #define TCG_AREG2 TCG_REG_G4 |