[GHC] #5240: help GNU ld to use less memory when linking libraries compiled with -split-objs.
GHC
cvs-ghc at haskell.org
Sun Aug 5 22:25:57 CEST 2012
#5240: help GNU ld to use less memory when linking libraries compiled with -split-
objs.
-------------------------------+--------------------------------------------
Reporter: int-e | Owner: igloo
Type: feature request | Status: infoneeded
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 7.0.3
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by pgj):
Replying to [comment:14 igloo]:
> Can you show me the output with -v please?
Sure. Here it is:
{{{
> /usr/local/ghc-7.4.2/bin/ghc -v -c j.c
Glasgow Haskell Compiler, Version 7.4.2, stage 2 booted by GHC version
7.0.4
Using binary package database:
/usr/local/ghc-7.4.2/lib/ghc-7.4.2/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-
prim-0.2.0.0-7d3c2c69a5e8257a04b2c679c40e2fa7
wired-in package integer-gmp mapped to integer-
gmp-0.4.0.0-af3a28fdc4138858e0c7c5ecc2a64f43
wired-in package base mapped to
base-4.5.1.0-ac318071cf9dcba0758e9123955468c5
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-
haskell-2.7.0.0-d08d077053eac454ce08e17f2c95c5c8
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Created temporary directory: /tmp/ghc33022_0
*** C Compiler:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-
memory-overheads' '-x' 'c' 'j.c' '-o' '/tmp/ghc33022_0/ghc33022_0.s' '-S'
'-Wimplicit' '-O' '-D__GLASGOW_HASKELL__=704' '-DTABLES_NEXT_TO_CODE' '-I'
'/usr/local/include' '-I'
'/usr/local/ghc-7.4.2/lib/ghc-7.4.2/base-4.5.1.0/include' '-I'
'/usr/local/ghc-7.4.2/lib/ghc-7.4.2/include'
gcc: --hash-size=31: linker input file unused because linking not done
gcc: --reduce-memory-overheads: linker input file unused because linking
not done
*** Assembler:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-
memory-overheads' '-c' '/tmp/ghc33022_0/ghc33022_0.s' '-o' 'j.o'
gcc: --hash-size=31: linker input file unused because linking not done
gcc: --reduce-memory-overheads: linker input file unused because linking
not done
*** Deleting temp files:
Deleting: /tmp/ghc33022_0/ghc33022_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc33022_0
}}}
> And can you also clarify whether your ld supports those flags please?
Well, perhaps the version numbers can tell, but I looked it up in the
manual page, and ld(1) definitely support these flags.
So:
{{{
> ld -v
GNU ld 2.17.50 [FreeBSD] 2007-07-03
> ld --help | grep -E "(hash-size|reduce)"
--hash-size=<NUMBER> Set default hash table size close to
<NUMBER>
--reduce-memory-overheads Reduce memory overheads, possibly taking
much longer
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5240#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list