Bug 927428 - use __LP64__ instead of HAVE_64BIT_OS in the linker; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Wed, 16 Oct 2013 11:14:19 -0400
changeset 151887 09fcb0805831f8e131a9bed075c32f1822a2de29
parent 151886 d3e014a0b5ad0831f1e6ff42e82f7956da77e6d6
child 151888 921bdd41fbce644073290d8f482105001716ea41
push id25512
push usercbook@mozilla.com
push dateThu, 24 Oct 2013 05:06:01 +0000
treeherdermozilla-central@19fd3388c372 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs927428
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 927428 - use __LP64__ instead of HAVE_64BIT_OS in the linker; r=glandium
mozglue/linker/Elfxx.h
mozglue/linker/Logging.h
--- a/mozglue/linker/Elfxx.h
+++ b/mozglue/linker/Elfxx.h
@@ -14,17 +14,17 @@
 #else
 #include <elf.h>
 #endif
 #include <endian.h>
 
 /**
  * Generic ELF macros for the target system
  */
-#ifdef HAVE_64BIT_OS
+#ifdef __LP64__
 #define Elf_(type) Elf64_ ## type
 #define ELFCLASS ELFCLASS64
 #define ELF_R_TYPE ELF64_R_TYPE
 #define ELF_R_SYM ELF64_R_SYM
 #ifndef ELF_ST_BIND
 #define ELF_ST_BIND ELF64_ST_BIND
 #endif
 #else
--- a/mozglue/linker/Logging.h
+++ b/mozglue/linker/Logging.h
@@ -63,19 +63,17 @@ private:
 
 #define DEBUG_LOG(...)   \
   do {                   \
     if (MOZ_UNLIKELY(Logging::isVerbose())) {  \
       LOG(__VA_ARGS__);  \
     }                    \
   } while(0)
 
-/* HAVE_64BIT_OS is not defined when building host tools, so use
- * __SIZEOF_POINTER__ */
-#if defined(HAVE_64BIT_OS) || __SIZEOF_POINTER__ == 8
+#if defined(__LP64__)
 #  define PRIxAddr "lx"
 #  define PRIxSize "lx"
 #  define PRIdSize "ld"
 #  define PRIuSize "lu"
 #else
 #  define PRIxAddr "x"
 #  define PRIxSize "x"
 #  define PRIdSize "d"