]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blobdiff - files/bootstrap-bsd.mk
files/bootstrap-bsd.mk: fix dead-code elimination
[pkgsrc-ghc.git] / files / bootstrap-bsd.mk
index 59c63acc9d7a38ce7c59879d31bb9a3b2fd22eaa..fdf7056fe6e603294cd871c6cf58cd9f7c7f973d 100644 (file)
@@ -1,4 +1,7 @@
+OMIT_PHASE_0 = YES
+OMIT_PHASE_1 = YES
 GHC = false
+GHC_STAGE1 =
 GHC_PKG_INPLACE =
 GHC_CABAL_INPLACE =
 DUMMY_GHC_INPLACE =
@@ -16,3 +19,14 @@ utils/ghc-pkg_dist-install_v_EXTRA_CC_OPTS += -L[[PREFIX]]/lib -lm -liconv -luti
 
 SRC_CC_OPTS += -I[[PREFIX]]/include
 INTEGER_LIBRARY = integer-simple
+
+#   Unregisterised stage0 compiler gets too large (.text section being
+# over 64 MiB) without dead-code elimination, exceeding NetBSD/i386's
+# kernel default limitation.
+#   Note that stage1 currently doesn't bloat that much (about 42.6
+# MiB), but when it does we have to append
+# CONF_CC_OPTS_STAGE1="-fdata..." and
+# CONF_GCC_LINKER_OPTS_STAGE1="-Wl,--gc-sections" to CONFIGURE_ENV as
+# well. I guess that's a matter of time :(
+EXTRA_CC_OPTS += -fdata-sections -ffunction-sections
+EXTRA_CC_OPTS += -Wl,--gc-sections