in rts/ghc.mk, I changed the rts/libs.depend rule to this:

# collect the -l and -L flags that we need to link the rts dyn lib.                                                                                                                  
rts/libs.depend : $$(ghc-pkg_INPLACE)
        "$(ghc-pkg_INPLACE)" --simple-output field rts extra-libraries \
          | sed -E 's/([^ ]+)/-l\1/g' > $@
        "$(ghc-pkg_INPLACE)" --simple-output field rts library-dirs \
          | sed -E 's/([^ ]+)/-L\1/g' >> $@

seemed to work for me.

The old pattern used \+ with -e, which some sleuthing shows isn't supported on OS X.

HTH.


On Mon, Apr 29, 2013 at 5:14 PM, Carter Schonwald <carter.schonwald@gmail.com> wrote:
How would i do this change locally on my local OSX build?
(i'm still getting familiar with ghc's build systems myself, so how to do the OS X only fix would be dandy :) )


On Mon, Apr 29, 2013 at 2:32 PM, Nicolas Frisby <nicolas.frisby@gmail.com> wrote:
It seems this patch

  50e78dafd0cac5ca3b28ef71559899f179343ddf

changed some sed expressions in rts/ghc.mk that seem to be no longer firing on my Mac now. Mac has a different flavor of BSD sed and such.

The resulting contents of rts/libs.depend on my build attempt is

$ cat rts/libs.depend 
m dl
/Users/nfrisby/Source/ghc-build-trees/vanilla/rts/dist/build

It's missing the -l and -L prefices that the sed commands are supposed to add.

I can hack around this on my Mac, but I'll leave the fix to someone with some portable sed fu.

Thanks.

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs