On Wed, 05 Mar 2008 07:38:26 +0900, Eric Kow <[EMAIL PROTECTED]> wrote:
> Using --enable-split-objs, I've been able to reduce the size of the UTFSampler
> binary from 3M stripped to 1M stripped.  And it still seems to work.
> If somebody could explain to me why we need the last patch, I would be even
> happier.

Your current patch uses $hcflag variable.

On Wed, 05 Mar 2008 07:38:26 +0900, Eric Kow <[EMAIL PROTECTED]> wrote:
> [Create a --enable-split-objs option for configure and makefile.
> Eric Kow <[EMAIL PROTECTED]>**20080302233710
>
> (snip)
>
> +if test "$enablesplitobjs" =3D "yes"; then
> +  hcflags=3D"$hcflags -split-objs"

But you forgot to use this variable in HCFLAGS.

> HCBASENAME=$hcbasename
> HCFLAGS=

So we need last patch's below part.

> [Add an --hcflags option to the configure script.
> Eric Kow <[EMAIL PROTECTED]>**20080227223152
> For --split-objs and friends.
> ] {
> (snip)
> hunk ./configure 825
>  HCVERSION=$hcversion
>  HCNAME=$hcname
>  HCBASENAME=$hcbasename
> -HCFLAGS=
> +HCFLAGS=$hcflags
>  HCPKG=$hcpkg
>  ENABLE-PROF=$enableprof
>  HC-PROF-FLAGS=-hisuf p_hi $hcprof
> }

And I meet another problem in your patch.

$ runhaskell Setup.lhs build
(snip)
c:\ghc\ghc-6.8.2\bin\ar.exe: creating dist/wx/libwxcore0.a
ar -sr dist/wx/libwxcore0.a dist/wx/imports/Graphics/UI/WXCore/WxcObject_split/*
.o &&  ar -sr dist/wx/libwxcore0.a dist/wx/imports/Graphics/UI/WXCore/WxcClassTy
pes_split/*.o &&  :
/bin/sh: /cygdrive/c/ghc/ghc-6.8.2/bin/ar: Argument list too long
make: *** [dist/wx/libwxcore0.a] Error 126
Build Failed.

Windows' ar can't use long argument.
And GHC uses xargs to avoid that problem.

http://hackage.haskell.org/trac/ghc/wiki/Building/Windows#Aregumentlisttoolong
http://darcs.haskell.org/ghc-6.8/ghc/mk/target.mk

Could you use xargs to link split-objs?


Best Regards,

-- 
shelarcy <shelarcy    hotmail.co.jp>
http://page.freett.com/shelarcy/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel

Reply via email to