Fixed x86_64 handling by the build system.

* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
  64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
This commit is contained in:
Ingo Weinhold 2011-06-16 19:58:24 +02:00
parent 6d367d369e
commit 1c2d7d3a86
2 changed files with 11 additions and 2 deletions

View File

@ -599,6 +599,11 @@ if $(HOST_PLATFORM) = cygwin {
HOST_CPU ?= $(OSPLAT:L) ;
# Jam doesn't know x86_64, so override HOST_CPU, if 64 bit.
if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) {
HOST_CPU = x86_64 ;
}
HOST_ARCH ?= $(HOST_CPU) ;
HOST_ARCH_MACRO_DEFINE = ARCH_$(HOST_CPU) ;
@ -699,7 +704,7 @@ for level in $(HAIKU_DEBUG_LEVELS[2-]) {
}
# ld flags
if $(HOST_ARCH) = x86 && $(HAIKU_HOST_USE_32BIT) = 1 {
if $(HOST_ARCH) = x86_64 && $(HAIKU_HOST_USE_32BIT) = 1 {
HOST_LDFLAGS += -melf_i386 ;
}
@ -784,7 +789,7 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_LIBSUPC++ = gcc_s.1 stdc++ ;
HOST_LIBSTDC++ = ;
} else if $(HOST_PLATFORM) = freebsd {
if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) = 1 {
if $(HOST_CPU) = x86_64 {
# amd64 FreeBSD 8 doesn't come without a shared libsupc++, and the
# static one prevents us from building shared libraries. So we have
# to work around by using the shared libstdc++.
@ -806,6 +811,8 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
# build platform we need to make sure, this is also defined.
if $(HOST_CPU) = x86 {
HOST_DEFINES += __INTEL__ ;
} else if $(HOST_CPU) = x86_64 {
HOST_DEFINES += __x86_64__ ;
} else if $(HOST_CPU) = ppc {
HOST_DEFINES += __POWERPC__ ;
} else if $(HOST_CPU) = m68k {

View File

@ -414,6 +414,8 @@ extern void ktrace_vprintf(const char *format, va_list args);
#if __INTEL__
# define B_MAX_CPU_COUNT 8
#elif __x86_64__
# define B_MAX_CPU_COUNT 8
#elif __POWERPC__
# define B_MAX_CPU_COUNT 8
#elif __M68K__