[haiku-commits] r34211 - in haiku/trunk: . build/jam headers/build

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 24 Nov 2009 19:57:50 +0100 (CET)

Author: bonefish
Date: 2009-11-24 19:57:49 +0100 (Tue, 24 Nov 2009)
New Revision: 34211
Changeset: http://dev.haiku-os.org/changeset/34211/haiku

Modified:
   haiku/trunk/build/jam/BuildSetup
   haiku/trunk/configure
   haiku/trunk/headers/build/BeOSBuildCompatibility.h
Log:
* configure: Pass gcc's host machine string to the jam build system.
* BuildSetup: Set jam variable HOST_PLATFORM_IS_64_BIT and add host define
  HAIKU_HOST_PLATFORM_64_BIT if the host platform is 64 bit. Removed the
  check from BeOSBuildCompatibility.h.


Modified: haiku/trunk/build/jam/BuildSetup
===================================================================
--- haiku/trunk/build/jam/BuildSetup    2009-11-24 17:22:44 UTC (rev 34210)
+++ haiku/trunk/build/jam/BuildSetup    2009-11-24 18:57:49 UTC (rev 34211)
@@ -478,9 +478,15 @@
 
 # host platform settings
 
-# enable GCC -m32 option, if requested
+# analyze the host gcc machine spec to find out about 64-bitness
+HOST_PLATFORM_IS_64_BIT = ;
 if $(HAIKU_HOST_USE_32BIT) = 1 {
+       # enable GCC -m32 option
        HOST_GCC_BASE_FLAGS = -m32 ;
+} else {
+       switch $(HOST_GCC_MACHINE) {
+               case x86_64-*   : HOST_PLATFORM_IS_64_BIT = 1 ;
+       }
 }
 
 
@@ -531,6 +537,7 @@
 HOST_ARCH                              ?= $(HOST_CPU) ;
 HOST_ARCH_MACRO_DEFINE = ARCH_$(HOST_CPU) ;
 
+
 # directories
 HOST_OBJECT_BASE_DIR = [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) ] ;
 HOST_COMMON_ARCH_OBJECT_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) common ] ;
@@ -926,6 +933,10 @@
        case sunos              : HOST_DEFINES  += HAIKU_HOST_PLATFORM_SUNOS ;
 }
 
+# define host platform 64 bit macro
+if $(HOST_PLATFORM_IS_64_BIT) {
+       HOST_DEFINES += HAIKU_HOST_PLATFORM_64_BIT ;
+}
 
 #pragma mark -
 

Modified: haiku/trunk/configure
===================================================================
--- haiku/trunk/configure       2009-11-24 17:22:44 UTC (rev 34210)
+++ haiku/trunk/configure       2009-11-24 18:57:49 UTC (rev 34211)
@@ -266,6 +266,7 @@
 haikuSharedLibSupCxx=
 haikuCxxHeadersDir=
 hostGCCVersion=`gcc -dumpversion`
+hostGCCMachine=`gcc -dumpmachine`
 bochsDebug=0
 includeGPLAddOns=0
 includePatentedCode=0
@@ -513,6 +514,7 @@
 HAIKU_UNARFLAGS                                ?= ${HAIKU_UNARFLAGS} ;
 
 HOST_GCC_RAW_VERSION           ?= ${hostGCCVersion} ;
+HOST_GCC_MACHINE                       ?= ${hostGCCMachine} ;
 
 EOF
 

Modified: haiku/trunk/headers/build/BeOSBuildCompatibility.h
===================================================================
--- haiku/trunk/headers/build/BeOSBuildCompatibility.h  2009-11-24 17:22:44 UTC 
(rev 34210)
+++ haiku/trunk/headers/build/BeOSBuildCompatibility.h  2009-11-24 18:57:49 UTC 
(rev 34211)
@@ -36,10 +36,6 @@
 #include <sys/types.h>
 #include <sys/uio.h>
 
-#ifdef __x86_64__
-#define HAIKU_HOST_PLATFORM_64_BIT
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif


Other related posts:

  • » [haiku-commits] r34211 - in haiku/trunk: . build/jam headers/build - ingo_weinhold