Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
3275b7bd
Commit
3275b7bd
authored
Nov 27, 2011
by
Ian Lynagh
Browse files
Pass "--hash-size=31 --reduce-memory-overhead" to ld; fixes trac #5240
These reduce the amount of memory that ld takes when linking.
parent
124bad84
Changes
2
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
3275b7bd
...
...
@@ -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])
])
...
...
rules/build-package-way.mk
View file @
3275b7bd
...
...
@@ -114,7 +114,7 @@ BINDIST_LIBS += $$($1_$2_GHCI_LIB)
endif
endif
$$($1_$2_GHCI_LIB)
:
$$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
"
$
$(LD)
"
-r
-o
$$
@
$
$(EXTRA_LD_OPTS)
$$
(
$1_$2_$3_HS_OBJS
)
$$
(
$1_$2_$3_CMM_OBJS
)
$$
(
$1_$2_$3_C_OBJS
)
$$
(
$1_$2_$3_S_OBJS
)
$$
(
$1_$2_EXTRA_OBJS
)
"
$
$(LD)
"
$$
(
CONF_LD_LINKER_OPTS_STAGE
$4
)
-r
-o
$$
@
$
$(EXTRA_LD_OPTS)
$$
(
$1_$2_$3_HS_OBJS
)
$$
(
$1_$2_$3_CMM_OBJS
)
$$
(
$1_$2_$3_C_OBJS
)
$$
(
$1_$2_$3_S_OBJS
)
$$
(
$1_$2_EXTRA_OBJS
)
ifeq
"$$($1_$2_BUILD_GHCI_LIB)" "YES"
# Don't bother making ghci libs for bootstrapping packages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment