home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / 18233 < prev    next >
Encoding:
Internet Message Format  |  1992-12-12  |  3.9 KB

  1. From: rossin@hpfcso.FC.HP.COM (Ted Rossin)
  2. Date: Fri, 11 Dec 1992 16:24:25 GMT
  3. Subject: Re: GNU C
  4. Message-ID: <7340112@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. Path: sparky!uunet!usc!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!rossin
  7. Newsgroups: comp.sys.atari.st
  8. References: <1992Dec3.014843.23161@umbc3.umbc.edu>
  9. Lines: 113
  10.  
  11. I saved this from Howard a while back:
  12.  
  13. -----------------------------------------------------------------------------
  14. Setting up your GCC environment:
  15.         Pick a location for the object file libraries.
  16.         Set the environment variable GNULIB to the full pathname
  17.          that you selected above.
  18.  
  19.         Pick a location for the header (include) files.
  20.         Set the environment variable GNUINC to the full pathname.
  21.  
  22.         Pick a location for the executable files.
  23.         Set the environment variable GCCEXEC to this pathname, plus
  24.          a "gcc-" prefix.
  25.  
  26. Example:
  27.         GNULIB=c:\gnu\lib
  28.         GNUINC=c:\gnu\include
  29.         GCCEXEC=c:\gnu\bin\gcc-
  30.  
  31. You can put gcc.ttp anywhere on your path, that program will use the GCCEXEC
  32. variable to find the other programs that it needs. These include the assembler,
  33. the linker, and the archiver. These programs are named gcc-as, gcc-ld, and
  34. gcc-ar. They were given the "gcc-" prefix to avoid confusion with any other
  35. like-named tools you might have on your system from some other programming
  36. package. If you don't have any other such package on your system, you could
  37. do away with the gcc- prefix (e.g., just rename gcc-as.ttp to as.ttp), then
  38. your GCCEXEC would only have to look like "GCCEXEC=c:\gnu\bin\". Alternatively,
  39. after renaming, you could just set c:\gnu\bin in your path and not worry
  40. about the GCCEXEC variable. (Obviously gcc needs more than just the assembler
  41. and linker; it has to know where cpp, the preprocessor, and cc1, the actual
  42. code generator, reside as well.)
  43.  
  44. In my MiNT configuration, I have a symlink to /bin, /lib, and /include, so
  45. I set
  46.         GNUINC=/include
  47.         GNULIB=/lib
  48. --
  49.   -- Howard Chu @ Jet Propulsion Laboratory, Pasadena, CA
  50.  
  51. California, land of dreams. For many, moving out to CA is their first step
  52. toward fulfilling their dreams. For most of them, it's also their last.
  53.  
  54.  
  55. -----------------------------------------------------------------------------
  56.  
  57.  
  58. I (Ted Rossin) just got gcc working last night.  Here is what I did
  59.  
  60. -----------------------------------------------------------------------------
  61.  
  62.  
  63. Files to get:
  64.  
  65. gcc222lib.zoo
  66. gcc231b1.zoo
  67. utlbin27.zoo
  68.  
  69.  
  70.      gcc22lib.zoo         gcc231b1.zoo        utlbin27.zoo
  71.     -------------               -------------           ------------
  72.     include               gcc-as.ttp        gcc-ld.ttp 
  73.     lib                gcc-cc1.ttp
  74.                 gcc-cpp.ttp
  75.                 gcc.ttp
  76.  
  77.  
  78. Shove the files:
  79.  
  80.     1. Make a directories named c:\gnu\bin c:\gnu\lib c:\gnu\include
  81.     2. Place all the include files in c:\gnu\include
  82.     3. Place all the lib files in c:\gnu\lib
  83.     4. Place all the gcc*.ttp files in c:\gnu\bin
  84.     5. Set up a ramdisk directory for temp files for example d:\tmp
  85.     6. Set up environment variables in your shell.
  86.  
  87.         GNULIB=c:\gnu\lib
  88.         GNUINC=c:\gnu\include
  89.         GCCEXEC=c:\gnu\bin\gcc-
  90.         TMPDIR=d:\tmp
  91.  
  92.     7. If you already have a c:\bin you can shove gcc.ttp there otherwise
  93.        leave it in c:\gnu\bin and add this path to your $PATH variable.
  94.     8. Make sure you have some RAM in your machine.  I have been able
  95.        to compile with 1.5 Meg of free RAM.
  96.     9. You should now be able to compile a toy program:
  97.  
  98.             /* hell.c */
  99.             main()
  100.             {
  101.                 int i;
  102.     
  103.                 for(i=0;i<10;i++){
  104.                 printf("gcc works-->%d\n",i);
  105.                 }
  106.             }
  107.  
  108.        using the following command:
  109.  
  110.         gcc -v hell.c -o hell.prg
  111.  
  112.        The v tells gcc to print our verbose messages.  If GCCEXEC is
  113.        not set up correctly gcc will just run the preprocessor cpp
  114.        and return an error code and stop because it can't find it.
  115.  
  116.     10. I have not tried any GEM programs yet but I have compiled 
  117.         programs that use the <osbind.h> stuff.
  118.  
  119.  
  120.                 Bye
  121.  
  122.                     Ted Rossin
  123.  
  124.