[gambit-list] How do you run gsc/gcc in beta 20?

Marc Feeley feeley at iro.umontreal.ca
Wed Oct 11 09:21:34 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10-Oct-06, at 9:42 PM, Bill Richter wrote:

> Thanks, Guillaume, and it now works fine.   Ought I to be using
> -dynamic, though?  I just want my  program to run fast, and this
> pretty fast:
> gsc -link Ultra; gcc -O2 -L. -I.  Ultra.c Ultra_.c -lgambc; ./a.out  
> > Ultra.out &
> But if -dynamic is faster, I'd sure like to switch!
>
> \begin{politics}
> But I think it's a bad assumption for you guys to make that Gambit
> users are C wizards.  I think you ought to try to also market your
> excellent product to dopes like me.

But that's exactly why the -dynamic flag has become the default.  I  
think it is rare to want to produce an a.out, and when that's the  
case the "gsc -link ..." invocation is usually buried in a makefile  
so there is no need to make that case compact.

Instead of calling GCC yourself, with all the complexity of the  
compile options, link flags and include directories, simply generate  
a dynamically loadable file with "gsc Ultra".  Then you simply run it  
with "gsi Ultra".  In other words, instead of

      gsc -link Ultra
      gcc -O2 -L. -I.  Ultra.c Ultra_.c -lgambc
      ./a.out > Ultra.out

You simply do

      gsc Ultra
      gsi Ultra > Ultra.out

That's hard to beat for simplicity, and you may get better  
performance because the best set of GCC compiler options will be used.

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFLO/f//V9Zc2T/v4RAjk3AJ9odOIw2CXUlwoGXG/8MwkP8RxiJgCdHgiZ
QPShuYc0qIgJFY33owqCrTU=
=z8ym
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list