summaryrefslogtreecommitdiff
path: root/rts/LinkerInternals.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-05 12:01:12 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-05 12:12:48 -0400
commit819c3db73acf5246cd332ad3062c61b7a2e8ee68 (patch)
tree7425f16a8771d1bb917afb65b848ebf855c8c619 /rts/LinkerInternals.h
parent4a1eed40bec08d50634b9754448ae34666e71fb2 (diff)
downloadhaskell-819c3db73acf5246cd332ad3062c61b7a2e8ee68.tar.gz
Revert "Enable new warning for fragile/incorrect CPP #if usage"
This is causing too much platform dependent breakage at the moment. We will need a more rigorous testing strategy before this can be merged again. This reverts commit 7e340c2bbf4a56959bd1e95cdd1cfdb2b7e537c2.
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r--rts/LinkerInternals.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 02fe167829..9d47661f12 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -91,8 +91,7 @@ typedef struct ForeignExportStablePtr_ {
struct ForeignExportStablePtr_ *next;
} ForeignExportStablePtr;
-#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) \
- || defined(arm_HOST_ARCH)
+#if powerpc_HOST_ARCH || x86_64_HOST_ARCH || arm_HOST_ARCH
/* ios currently uses adjacent got tables, and no symbol extras */
#if !defined(ios_HOST_OS)
#define NEED_SYMBOL_EXTRAS 1
@@ -103,17 +102,17 @@ typedef struct ForeignExportStablePtr_ {
* address relocations on the PowerPC, x86_64 and ARM.
*/
typedef struct {
-#if defined(powerpc_HOST_ARCH)
+#ifdef powerpc_HOST_ARCH
struct {
short lis_r12, hi_addr;
short ori_r12_r12, lo_addr;
long mtctr_r12;
long bctr;
} jumpIsland;
-#elif defined(x86_64_HOST_ARCH)
+#elif x86_64_HOST_ARCH
uint64_t addr;
uint8_t jumpIsland[6];
-#elif defined(arm_HOST_ARCH)
+#elif arm_HOST_ARCH
uint8_t jumpIsland[16];
#endif
} SymbolExtra;
@@ -284,7 +283,7 @@ ObjectCode* mkOc( pathchar *path, char *image, int imageSize,
int misalignment
);
-#if defined(mingw32_HOST_OS)
+#if defined (mingw32_HOST_OS)
/* We use myindex to calculate array addresses, rather than
simply doing the normal subscript thing. That's because
some of the above structs have sizes which are not