diff options
author | Ian Lynagh <igloo@earth.li> | 2011-11-27 00:20:59 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-11-27 00:20:59 +0000 |
commit | 3275b7bd2a803a3adc0b952b6fbfeb738fc15a74 (patch) | |
tree | a71bc802260e464a746bd22c70f391bbb58475ca /aclocal.m4 | |
parent | 124bad841018d17f36b1d9dd136fb30ce30a2c2d (diff) | |
download | haskell-3275b7bd2a803a3adc0b952b6fbfeb738fc15a74.tar.gz |
Pass "--hash-size=31 --reduce-memory-overhead" to ld; fixes trac #5240
These reduce the amount of memory that ld takes when linking.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 2bba7b7586..f6f1f2bc87 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -354,14 +354,14 @@ AC_DEFUN([FP_SETTINGS], if test "$windows" = YES then SettingsCCompilerCommand='$topdir/../mingw/bin/gcc.exe' - SettingsCCompilerFlags='' + SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2 $CONF_GCC_LINKER_OPTS_STAGE2" SettingsPerlCommand='$topdir/../perl/perl.exe' SettingsDllWrapCommand='$topdir/../mingw/bin/dllwrap.exe' SettingsWindresCommand='$topdir/../mingw/bin/windres.exe' SettingsTouchCommand='$topdir/touchy.exe' else SettingsCCompilerCommand="$WhatGccIsCalled" - SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2" + SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2 $CONF_GCC_LINKER_OPTS_STAGE2" SettingsPerlCommand="$PerlCmd" SettingsDllWrapCommand="/bin/false" SettingsWindresCommand="/bin/false" @@ -424,6 +424,11 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], then $2="$$2 -fno-stack-protector" fi + + # Reduce memory usage when linking. See trac #5240. + $3="$$3 -Wl,--hash-size=31 -Wl,--reduce-memory-overheads" + $4="$$4 --hash-size=31 --reduce-memory-overheads" + rm -f conftest.c conftest.o AC_MSG_RESULT([done]) ]) |