Newsgroups: comp.sys.atari.st

I saved this from Howard a while back:

-----------------------------------------------------------------------------
Setting up your GCC environment:
        Pick a location for the object file libraries.
        Set the environment variable GNULIB to the full pathname
         that you selected above.

        Pick a location for the header (include) files.
        Set the environment variable GNUINC to the full pathname.

        Pick a location for the executable files.
        Set the environment variable GCCEXEC to this pathname, plus
         a "gcc-" prefix.

Example:
        GNULIB=c:\gnu\lib
        GNUINC=c:\gnu\include
        GCCEXEC=c:\gnu\bin\gcc-

You can put gcc.ttp anywhere on your path, that program will use the GCCEXEC
variable to find the other programs that it needs. These include the assembler,
the linker, and the archiver. These programs are named gcc-as, gcc-ld, and
gcc-ar. They were given the "gcc-" prefix to avoid confusion with any other
like-named tools you might have on your system from some other programming
package. If you don't have any other such package on your system, you could
do away with the gcc- prefix (e.g., just rename gcc-as.ttp to as.ttp), then
your GCCEXEC would only have to look like "GCCEXEC=c:\gnu\bin\". Alternatively,
after renaming, you could just set c:\gnu\bin in your path and not worry
about the GCCEXEC variable. (Obviously gcc needs more than just the assembler
and linker; it has to know where cpp, the preprocessor, and cc1, the actual
code generator, reside as well.)

In my MiNT configuration, I have a symlink to /bin, /lib, and /include, so
I set
        GNUINC=/include
        GNULIB=/lib
--
  -- Howard Chu @ Jet Propulsion Laboratory, Pasadena, CA

California, land of dreams. For many, moving out to CA is their first step
toward fulfilling their dreams. For most of them, it's also their last.


-----------------------------------------------------------------------------


I (Ted Rossin) just got gcc working last night.  Here is what I did

-----------------------------------------------------------------------------


Files to get:

gcc222lib.zoo
gcc231b1.zoo
utlbin27.zoo


     gcc22lib.zoo 		gcc231b1.zoo		utlbin27.zoo
    -------------               -------------           ------------
    include   			gcc-as.ttp		gcc-ld.ttp 
    lib				gcc-cc1.ttp
				gcc-cpp.ttp
				gcc.ttp


Shove the files:

	1. Make a directories named c:\gnu\bin c:\gnu\lib c:\gnu\include
	2. Place all the include files in c:\gnu\include
	3. Place all the lib files in c:\gnu\lib
	4. Place all the gcc*.ttp files in c:\gnu\bin
	5. Set up a ramdisk directory for temp files for example d:\tmp
	6. Set up environment variables in your shell.

		GNULIB=c:\gnu\lib
		GNUINC=c:\gnu\include
		GCCEXEC=c:\gnu\bin\gcc-
		TMPDIR=d:\tmp

	7. If you already have a c:\bin you can shove gcc.ttp there otherwise
	   leave it in c:\gnu\bin and add this path to your $PATH variable.
	8. Make sure you have some RAM in your machine.  I have been able
	   to compile with 1.5 Meg of free RAM.
	9. You should now be able to compile a toy program:

			/* hell.c */
			main()
			{
			    int i;
	
			    for(i=0;i<10;i++){
				printf("gcc works-->%d\n",i);
			    }
			}

	   using the following command:

		gcc -v hell.c -o hell.prg

	   The v tells gcc to print our verbose messages.  If GCCEXEC is
	   not set up correctly gcc will just run the preprocessor cpp
	   and return an error code and stop because it can't find it.

	10. I have not tried any GEM programs yet but I have compiled 
	    programs that use the <osbind.h> stuff.


				Bye

					Ted Rossin

Newsgroups: comp.sys.atari.st