diff options
author | Ian Lynagh <igloo@earth.li> | 2009-05-20 22:36:10 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-05-20 22:36:10 +0000 |
commit | aaf192c3fba95ba4adf3e128551b7cb579890ad1 (patch) | |
tree | 34cf3fed6be9fc41927759e6c3ae08a6290b2fea | |
parent | 5fcfdb3b853b5fd751e4552e1f774cb74d933c50 (diff) | |
download | haskell-aaf192c3fba95ba4adf3e128551b7cb579890ad1.tar.gz |
OS X / amd64 fixes
-rw-r--r-- | rts/Adjustor.c | 2 | ||||
-rw-r--r-- | rts/Linker.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c index e02148740d..e93f361aee 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -294,7 +294,7 @@ typedef struct AdjustorStub { } AdjustorStub; #endif -#if defined(darwin_HOST_OS) || defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH) +#if (defined(i386_HOST_ARCH) && defined(darwin_HOST_OS)) || defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH) static int totalArgumentSize(char *typeString) { int sz = 0; diff --git a/rts/Linker.c b/rts/Linker.c index 6d7b66af85..347bfa6446 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -205,7 +205,7 @@ static void machoInitSymbolsWithoutUnderscore( void ); #define MMAP_32BIT_BASE_DEFAULT 0x40000000 #endif -static void *mmap_32bit_base = MMAP_32BIT_BASE_DEFAULT; +static void *mmap_32bit_base = (void *)MMAP_32BIT_BASE_DEFAULT; #endif /* MAP_ANONYMOUS is MAP_ANON on some systems, e.g. OpenBSD */ @@ -4098,7 +4098,9 @@ static int relocateSection( char *thingPtr = image + sect->offset + reloc->r_address; uint64_t thing; - uint64_t value; + /* We shouldn't need to initialise this, but gcc on OS X 64 bit + complains that it may be used uninitialized if we don't */ + uint64_t value = 0; uint64_t baseValue; int type = reloc->r_type; |