summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/config/mh-darwin
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/config/mh-darwin')
-rw-r--r--binutils-2.25/config/mh-darwin18
1 files changed, 18 insertions, 0 deletions
diff --git a/binutils-2.25/config/mh-darwin b/binutils-2.25/config/mh-darwin
new file mode 100644
index 00000000..a039f201
--- /dev/null
+++ b/binutils-2.25/config/mh-darwin
@@ -0,0 +1,18 @@
+# The -mdynamic-no-pic ensures that the compiler executable is built without
+# position-independent-code -- the usual default on Darwin. This fix speeds
+# compiles by 3-5%.
+BOOT_CFLAGS += \
+`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
+ echo -mdynamic-no-pic ;; esac;`
+
+# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
+# gcc components, since it is incompatible with our pch implementation.
+BOOT_LDFLAGS += \
+`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
+
+# Similarly, for cross-compilation.
+STAGE1_CFLAGS += \
+`case ${host} in i?86-*-darwin* | powerpc-*-darwin*)\
+ echo -mdynamic-no-pic ;; esac;`
+STAGE1_LDFLAGS += \
+`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`