summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorwolfgang <unknown>2005-01-23 06:10:24 +0000
committerwolfgang <unknown>2005-01-23 06:10:24 +0000
commit6f985ae88171fb52ca68d75f667669e139b6b8c2 (patch)
treea4e670b53bfbe5b9f094690b697592b63f0ed3d1 /configure.ac
parent585d87f1d621a386e4cfdd14f8a3ac1eed2413d4 (diff)
downloadhaskell-6f985ae88171fb52ca68d75f667669e139b6b8c2.tar.gz
[project @ 2005-01-23 06:10:15 by wolfgang]
Add support for the dead code stripping feature of recent Apple linkers. If your code is compiled using the NCG, you can now specify -optl-W,-dead_strip on the GHC command line when linking. It will have basically the same effect as using split-objs to build the libraries. Advantages over split-objs: * No evil perl script involved * Requires no special handling when building libraries Disadvantages: * The current version of Apple's linker is slow when given the -dead_strip flag. _REALLY_ slow. * Mac OS X only. This works by making the NCG emit the .subsections_via_symbols directive. Additionally, we have to add an extra label at the top of every info table, and make sure that the entry code references it (otherwise the info table will be considered part of the preceding entry code). The mangler just removes the .subsections_via_symbols directive.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7351b39187..76e961ddbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1245,6 +1245,22 @@ dnl ** check for ld, whether it has an -x option, and if it is GNU ld
FP_PROG_LD_X
FP_PROG_LD_IS_GNU
+dnl ** check for Apple-style dead-stripping support
+dnl (.subsections-via-symbols assembler directive)
+
+
+AC_MSG_CHECKING(for .subsections_via_symbols)
+AC_TRY_COMPILE(,[__asm__ (".subsections_via_symbols");],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
+ [Define to 1 if Apple-style dead-stripping is supported.])
+ ],
+ [
+ AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[0],
+ [Define to 1 if Apple-style dead-stripping is supported.])
+ ])
+
AC_CONFIG_FILES([mk/config.mk])
AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
AC_OUTPUT