delorie.com/djgpp/faq/misc/build-gcc.html   search  
I want to change cc1. How do I do this?

How do I fix a bug/add a feature to one of the DJGPP programs?

First, get the sources. These are called *sr.zip in the djgpp distribution. The C Library sources are in djlsrXXX.zip. Sources for go32 and other utilities written by DJ Delorie are in djsrcXXX.zip. Some sources are too big, and are split into multiple zips, all of which must be unzipped to get a complete source distribution, for example:

  gcc263s1.zip
  gcc263s2.zip
  gcc263s3.zip
  gcc263s4.zip
  gcc263s5.zip
  gcc263s6.zip
All sources are shipped in ready-to-build form. The diffs in the diffs directory have already been applied.

Next, try to build the program without changing it. Some packages will have a configur.bat file; if so, run it first. If there is a make.bat file, run it; if not, look for a file named makefile.dj or makefile.djg. If there is such a file, say ``make -f makefile.djg'', if not, just say make and see what happens. After you've succeeded to build the program, make your fixes and build the program the same way you did before.

Note that you must have GNU make program to build these programs (get the file makXXXbn.zip), and some makefiles require that you install additional utilities, like sed (get sedXXXbn.zip). Sometimes the makefiles won't even run under command.com (they require more smart shell). In that case, either get a better shell, or do the required steps manually. If the Makefile is too complex for you and you can't figure out what are the necessary commands, invoke make with -n switch and see what it should have done.

  webmaster     delorie software   privacy  
  Copyright © 1995     Updated Feb 1995