EGCSTENSIONS PATCH for 2.95.1 for using SUN make with builddir != srcdir

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Sun Aug 29 06:42:00 GMT 1999


This is a patch for gcc-2.95.1 so people that want to use SUN
make, and want to build in a directory different that the one
with the gcc-2.95.1 source can do that.  Apply it to an unpacked
gcc-2.95.1.tar.gz with (example):
"patch -p1 -d /path/to/gcc-2.95.1 < the_patch".

Please note that building in the *same* directory as the source
*should* work just fine without this patch (and hopefully with it;
untested).

I've successfully bootstrapped the full package in
gcc-2.95.1.tar.gz (default, all languages) on a Solaris 2.6 box
with an earlier gcc-2.7.2.3 installation, installed it in a
temporary directory and compiled and ran "hello, world" in C and
C++ with it.  The only configure option was the --prefix for the
temporary installation directory.

The patch is not intended to go into any official GCC release or
anything; it is just provided here as a reasonable place for
such a patch, and when archived, it makes a good URL to e.g. put
on the egcstensions page.

I know I made two patch-submittal no-nos: to send a GCC patch in
a coded attachment instead of clear-text and to add ChangeLog
entries as diff:s.  I did that deliberately because the ChangeLog
entries would otherwise not be visible after patching, and last
time I checked, necessary TAB:s are lost when getting patches from
the mail archive (e.g. by saving "as source" in a browser).
 People should *not* need to know to use the "--ignore-whitespace"
option to patch and then make sure TAB:s in makefiles are OK.
 It also makes a good warning sign that the ChangeLog entries
are rejected with other (later) releases, so people don't
blindly trust it to work with e.g. gcc-2.95.2 (if any).  Having
said that, it might work.

An attempt to put back full SUN make compatibility w.r.t.
builddir != srcdir in GCC, was earlier rejected.  Although SUN
make is partially broken with respect to the VPATH mechanism, GNU
tools and specifically GCC has the necessary infrastructure to
deal with that without much trouble maintenance-wise, hence the
relatively short patch.  To wit, builddir != srcdir with SUN
make worked for earlier FSF releases of GCC (vague memory about
2.8.1, definitely 2.7.2).  The purpose is not to make SUN make
usable for GCC *development*, only as an installation tool;
dependencies may be invalid.  But this is a dead horse badly
beaten and char-broiled; I do not insist.

Some parts of the patch are similar to what has been accepted in
that previous attempt; I'll extract those and submit them for the
main line (and perhaps releases).

brgds, H-P


More information about the Gcc-patches mailing list