RE: Building Both "Regular" and "Profiling" Libraries
At 2002-10-09 07:48, Hal Daume III wrote: >Is this the sort of thing you're looking for? Yes, thanks. I now have these in my Makefile: HCPOPTS = -prof -hisuf p_hi -osuf .p_o -auto-all +RTS -K32M -RTS depend-entries: $(HC_SRCS) $(HC) -M -optdep-s -optdepp $(HCFLAGS) $^ I did notice that for -osuf you seem to need the '.' but for -hisuf you don't... -- Ashley Yakeley, Seattle WA ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Building Both "Regular" and "Profiling" Libraries
A much more helpful reply than mine; I'll add it to the user manual. Simon | -Original Message- | From: Hal Daume III [mailto:[EMAIL PROTECTED]] | Sent: 09 October 2002 15:48 | To: Ashley Yakeley | Cc: Simon Peyton-Jones; GHC List | Subject: RE: Building Both "Regular" and "Profiling" Libraries | | What I do is I have a few aliases: | | ghcm: ghc --make ... -osuf sun4.o -hisuf sun4.hi | ghcp: ghc --make ... -osuf sun4.prof.o -hisuf sun4.prof.hi -prof | -auto-all | | These are set in my .cshrc file so the "sun4" is actually the $ARCH | variable of the machine I'm currently on (this enables me to have i686 and | sun4 binaries coexisting in a friendly manner). | | Then, when I want a normal build, I do: | |ghcm Foo.hs -o Foo | | and for a profiled: | |ghcp Foo.hs -o Foo_prof | | It saves a lot of build time. | | Is this the sort of thing you're looking for? | | -- | Hal Daume III | | "Computer science is no more about computers| [EMAIL PROTECTED] | than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume | | On Wed, 9 Oct 2002, Ashley Yakeley wrote: | | > At 2002-10-09 04:21, Simon Peyton-Jones wrote: | > | > >Yes there is. In your build.mk, set GhcLibWays = p | > > | > >This is discussed a lot in the Building Guide, which I commend to you if | > >you are building GHC. | > | > I'm not building GHC. I just want to build my own stuff and I don't have | > a build.mk... | > | > -- | > Ashley Yakeley, Seattle WA | > | > ___ | > Glasgow-haskell-users mailing list | > [EMAIL PROTECTED] | > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users | > ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Building Both "Regular" and "Profiling" Libraries
What I do is I have a few aliases: ghcm: ghc --make ... -osuf sun4.o -hisuf sun4.hi ghcp: ghc --make ... -osuf sun4.prof.o -hisuf sun4.prof.hi -prof -auto-all These are set in my .cshrc file so the "sun4" is actually the $ARCH variable of the machine I'm currently on (this enables me to have i686 and sun4 binaries coexisting in a friendly manner). Then, when I want a normal build, I do: ghcm Foo.hs -o Foo and for a profiled: ghcp Foo.hs -o Foo_prof It saves a lot of build time. Is this the sort of thing you're looking for? -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Wed, 9 Oct 2002, Ashley Yakeley wrote: > At 2002-10-09 04:21, Simon Peyton-Jones wrote: > > >Yes there is. In your build.mk, set GhcLibWays = p > > > >This is discussed a lot in the Building Guide, which I commend to you if > >you are building GHC. > > I'm not building GHC. I just want to build my own stuff and I don't have > a build.mk... > > -- > Ashley Yakeley, Seattle WA > > ___ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: unsafePerformIO
- Original Message - From: "Simon Marlow" <[EMAIL PROTECTED]> Sent: Tuesday, September 24, 2002 2:58 PM Subject: RE: unsafePerformIO [...] > As for sharing, we currently don't provide any guarnatees, although we > should. It is currently the case that if you write > > a = unsafePerformIO (putStr "hello") > b = unsafePerformIO (putStr "hello") > > and both a and b are evaluated, then you may get either one or two > "hello"s on stdout. You can currently make things more deterministic by > (a) adding NOINLINE pragmas for a and b, and (b) using the flag -fno-cse > to disable common sub-expression elimination. Then you'll get exactly > two instances of "hello" on stdout, although we won't guarantee that > behaviour for ever. At some point we'll fix it so that unsafePerformIO > applications are never duplicated or coalesced. Are there any (short) examples available where using of unsafePerformIO leads to unexpected behaviour, especially an example with the terms a and b from above? with best regards, David - JWGU Frankfurt ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Building Both "Regular" and "Profiling" Libraries
At 2002-10-09 04:21, Simon Peyton-Jones wrote: >Yes there is. In your build.mk, set GhcLibWays = p > >This is discussed a lot in the Building Guide, which I commend to you if >you are building GHC. I'm not building GHC. I just want to build my own stuff and I don't have a build.mk... -- Ashley Yakeley, Seattle WA ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Building Both "Regular" and "Profiling" Libraries
Yes there is. In your build.mk, set GhcLibWays = p This is discussed a lot in the Building Guide, which I commend to you if you are building GHC. Simon | -Original Message- | From: Ashley Yakeley [mailto:[EMAIL PROTECTED]] | Sent: 09 October 2002 11:56 | To: GHC List | Subject: Building Both "Regular" and "Profiling" Libraries | | Is there a good strategy for building both regular and profiling variants | of libraries? One of the problems is that the .hi files are not | compatible, so I need to both kinds of those too. Should I be giving them | separate names or something? How do people deal with this? | | Right now I do a 'make clean' and then rebuild with profiling options, | but that's kind of annoying... | | -- | Ashley Yakeley, Seattle WA | | ___ | Glasgow-haskell-users mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Building Both "Regular" and "Profiling" Libraries
Is there a good strategy for building both regular and profiling variants of libraries? One of the problems is that the .hi files are not compatible, so I need to both kinds of those too. Should I be giving them separate names or something? How do people deal with this? Right now I do a 'make clean' and then rebuild with profiling options, but that's kind of annoying... -- Ashley Yakeley, Seattle WA ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users