delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/23/21:30:35

Date: Sun, 23 Nov 1997 18:28:52 -0800 (PST)
Message-Id: <199711240228.SAA02776@adit.ap.net>
Mime-Version: 1.0
To: djgpp AT delorie DOT com, djgpp-workers AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Problems with GCC building process

While rebuilding GCC the other day, I found some problems with the building
process.
1. To build the file `s-objlist', the Makefile does something of this nature:
        echo.exe -o s-objlist $(OBJS)
   The problem here is that this assumes the standard DJGPP `echo', the one
that comes with djdev201.zip. However, the shell-utils, which I have
installed, comes with an `echo' as well, which overwrites the original one.
It has an incompatible set of options, and does not grok `-o file' to output
to `file'.
Suggestion: Change it to `redir -o s-objlist echo.exe $(OBJS)'. This will
work regardless of what `echo' is in use. A simple change to
config/msdos/top.sed should do it.
2. `libgcc.a' is built via a batch file. It's slightly confusing, but as
near as I can figure out, the `mklibgcc' program copies the libgcc stubs (of
the #define/#include nature), with some exceptions, into a temp directory,
then writes the command to compile each to a batch file, `mklibnow.bat'.
This batch file is then executed by the Makefile. Among the things it
includes here is the `CFLAGS' specified by the user. What happened to me is
that my `CFLAGS' happened to be rather long. This caused the GCC command
lines to exceed the infamous 126-character limit, some files didn't get
compiled, and my `libgcc.a' ended up short some modules. The workaround is
obvious: build `libgcc.a' separately, with shorter `CFLAGS'. But this is
very inconvenient, and also restricts the user's choice of flags. Another is
to feed `mklibnow.bat' to `bash', which complains about the `@echo off's,
but does work.
I don't understand at all why the batch file method is used. I would think
there would be an easier way to do it. For instance, since `mklibgcc' knows
all the CFLAGS, etc, why can't it do the compiling itself? (`system')
Any comments, let me know.
 

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019