| 1 | # The -mdynamic-no-pic ensures that the compiler executable is built without |
| 2 | # position-independent-code -- the usual default on Darwin. This fix speeds |
| 3 | # compiles by 3-5%. |
| 4 | BOOT_CFLAGS += \ |
| 5 | `case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \ |
| 6 | echo -mdynamic-no-pic ;; esac;` |
| 7 | |
| 8 | # ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for |
| 9 | # gcc components, since it is incompatible with our pch implementation. |
| 10 | BOOT_LDFLAGS += \ |
| 11 | `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` |
| 12 | |
| 13 | # Similarly, for cross-compilation. |
| 14 | STAGE1_CFLAGS += \ |
| 15 | `case ${host} in i?86-*-darwin* | powerpc-*-darwin*)\ |
| 16 | echo -mdynamic-no-pic ;; esac;` |
| 17 | STAGE1_LDFLAGS += \ |
| 18 | `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` |