summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2019-01-30 01:06:12 -0500
committerBen Gamari <ben@well-typed.com>2019-01-30 01:06:12 -0500
commit76c8fd674435a652c75a96c85abbf26f1f221876 (patch)
treeb02a6f5307a20efc25ddb27c58977069b48972b6 /includes
parent7cdcd3e12a5c3a337e36fa80c64bd72e5ef79b24 (diff)
downloadhaskell-76c8fd674435a652c75a96c85abbf26f1f221876.tar.gz
Batch merge
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Flags.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h
index 63450d5ece..3582e6abde 100644
--- a/includes/rts/Flags.h
+++ b/includes/rts/Flags.h
@@ -188,6 +188,17 @@ typedef struct _CONCURRENT_FLAGS {
*/
#define DEFAULT_TICK_INTERVAL USToTime(10000)
+/*
+ * When linkerAlwaysPic is true, the runtime linker assume that all object
+ * files were compiled with -fPIC -fexternal-dynamic-refs and load them
+ * anywhere in the address space.
+ */
+#if defined(x86_64_HOST_ARCH) && defined(darwin_HOST_OS)
+#define DEFAULT_LINKER_ALWAYS_PIC true
+#else
+#define DEFAULT_LINKER_ALWAYS_PIC false
+#endif
+
/* See Note [Synchronization of flags and base APIs] */
typedef struct _MISC_FLAGS {
Time tickInterval; /* units: TIME_RESOLUTION */
@@ -197,6 +208,7 @@ typedef struct _MISC_FLAGS {
bool generate_stack_trace;
bool machineReadable;
bool internalCounters; /* See Note [Internal Counter Stats] */
+ bool linkerAlwaysPic; /* Assume the object code is always PIC */
StgWord linkerMemBase; /* address to ask the OS for memory
* for the linker, NULL ==> off */
} MISC_FLAGS;