Re: [racket-dev] Using clang to Build Racket on Mac OS X

2011-09-10 Thread Matthew Flatt
At Wed, 27 Jul 2011 10:38:44 -0500, Will M. Farr wrote:
 The only wart in the process is the following: when compiling with clang or 
 llvm-gcc with the -O4 option, which enables link-time optimization in the 
 LLVM 
 backend, the GC is unable to correctly determine the stack growth direction.  
 Unfortunately, the configure script doesn't realize that it cannot determine 
 the direction---apparently the test gets it wrong, but appears 
 successful---so 
 supplying the direction manually via the configure argument doesn't work.  
 The 
 build fails when first trying to run raco setup when the GC notes that the 
 stack growth is inconsistent with its assumptions.  

I've pushed a fix for this problem, along with other changes to avoid
warnings when compiling with clang.

_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Using clang to Build Racket on Mac OS X

2011-09-10 Thread Will M. Farr
Thanks, Matthew!  It seems to build OK now.  

Will

On Sep 11, 2011, at 6:42 AM, Matthew Flatt wrote:

 At Wed, 27 Jul 2011 10:38:44 -0500, Will M. Farr wrote:
 The only wart in the process is the following: when compiling with clang or 
 llvm-gcc with the -O4 option, which enables link-time optimization in the 
 LLVM 
 backend, the GC is unable to correctly determine the stack growth direction. 
  
 Unfortunately, the configure script doesn't realize that it cannot determine 
 the direction---apparently the test gets it wrong, but appears 
 successful---so 
 supplying the direction manually via the configure argument doesn't work.  
 The 
 build fails when first trying to run raco setup when the GC notes that the 
 stack growth is inconsistent with its assumptions.  
 
 I've pushed a fix for this problem, along with other changes to avoid
 warnings when compiling with clang.
 



PGP.sig
Description: This is a digitally signed message part
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Using clang to Build Racket on Mac OS X

2011-07-27 Thread Will M. Farr
Hello Racket Developers,

I thought I would write a quick note about building Racket on Mac OS X 10.6.8 
with the new clang compiler (the new front-end to the LLVM compiler backend 
that is becoming the standard compiler on Mac OS X for XCode 4 and later).  
Overall, it's been a good experience.  As promised, clang seems to compile the 
C sources in the racket distribution much more quickly than gcc, and has 
better-formatted error and warning messages.  I believe that the resulting 
native code libraries make racket run faster, but haven't run any detailed 
tests (there was quite a gap between my last gcc-based build and my first 
clang-based one, so the improvements may also be due to Racket development).  

The only wart in the process is the following: when compiling with clang or 
llvm-gcc with the -O4 option, which enables link-time optimization in the LLVM 
backend, the GC is unable to correctly determine the stack growth direction.  
Unfortunately, the configure script doesn't realize that it cannot determine 
the direction---apparently the test gets it wrong, but appears successful---so 
supplying the direction manually via the configure argument doesn't work.  The 
build fails when first trying to run raco setup when the GC notes that the 
stack growth is inconsistent with its assumptions.  

I'm writing this email partly to see if anyone else has seen the error and 
knows what to do about it, and partly because I thought you might like to know 
how racket fairs on the newer OS X compiler.  If someone wants to test 
modifications to the configure script's stack growth test, I would be happy to 
take patches and test-compile them on my system.  For now, I am having great 
luck building with clang -O3; eventually, it would be nice to have the LTO, 
since that's one of the most exciting benefits of using the LLVM toolchain.

Thanks again for the Racket system!

Will

PGP.sig
Description: This is a digitally signed message part
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Using clang to Build Racket on Mac OS X

2011-07-27 Thread Eli Barzilay
50 minutes ago, Will M. Farr wrote:
 I believe that the resulting native code libraries make racket run
 faster, but haven't run any detailed tests (there was quite a gap
 between my last gcc-based build and my first clang-based one, so the
 improvements may also be due to Racket development).

To see a difference you should make sure that you're timing some code
that runs at the C level -- since racket code gets jitted the same
anyway.  (Maybe compilation could be faster since there's a lot of
syntax work and that's mostly at the C side.)

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev