Commit Graph

52 Commits

Author SHA1 Message Date
David E. O'Brien
aef79b9c89 "Rev.1.45 of cc_tools/Makefile was a wrong fix for a problem introduced
in rev.1.44 (the egcs to gcc switch).  The problem is that print-rtl.o
is now needed to build some tools, but it wasn't added to the list of
objects which are specially handled because they are prerequisites for
tools."

Submitted by:	bde
2000-01-29 12:38:21 +00:00
David E. O'Brien
54e6aeb25d Simply cc_tools/Makefile by moving the parser generation to the respective
backends.
2000-01-24 09:17:09 +00:00
David E. O'Brien
0eb6f1f6c1 I *hate* using "i" in variables, looks too much like "1" or "l". 2000-01-23 22:46:00 +00:00
David E. O'Brien
253745e1fc Allow the specification of a prefix for gcc to find all the various bits.
If one wishes to anchor the compiler toolchain tree somewhere other than /,
all one needs to do is set "TOOLS_PREFIX" to a different rooting.

Submitted by:	marcel (in a different format and reworked by me)
1999-12-29 14:42:46 +00:00
David E. O'Brien
a3d6eca585 Reduce the FreeBSD custom hacks to gcc.c by using the GCC provided methods
of changing the search dirs.  This also removes an used search dir,
removes unneeded redundancy, and a bugus dir we enherited on the i386
by baseing off of svr4.h.

We went from:
	install: /usr/libexec/(null)
	programs: /usr/libexec/<OBJFORMAT>/:/usr/libexec/:/usr/bin/:/usr/libexec/
	libraries: /usr/libdata/gcc/:/usr/libexec/:/usr/ccs/lib/:/usr/lib/

to:
	install: /usr/libexec/(null)
	programs: /usr/libexec/<OBJFORMAT>/:/usr/libexec/
	libraries: /usr/libexec/:/usr/lib/
1999-12-22 05:00:28 +00:00
David E. O'Brien
5918196236 Build genrtl.h before print-rtl.o.
Submitted by:	John Hay <jhay@mikom.csir.co.za> (basic idea, changed by me)
1999-11-17 15:50:45 +00:00
David E. O'Brien
eb33411e9b Cut over the system compiler from from EGCS 1.1.2 to GCC 2.95.2. 1999-11-15 04:16:19 +00:00
David E. O'Brien
07123604c5 Purely cosmetic changes to lineup targets. 1999-11-15 00:29:00 +00:00
David E. O'Brien
b7969a0a9b Our capibilities updated for GCC 2.95.2. 1999-11-06 05:57:53 +00:00
David E. O'Brien
96ace1a290 `make' will fail if hash.h exists for some reason and gxx-hash needs to be
rebuilt.  Fix this.

Submitted by:	bde
1999-10-30 08:08:29 +00:00
David E. O'Brien
831ac5c655 Add a comment explaing the linking and segrated the old and new cases a little. 1999-10-12 20:27:53 +00:00
David E. O'Brien
047419e54f Change the name of the file generaged from gxx.gperf from "hash.h" to
"gxx-hash.h" with hopes of getting Cygnus to do the same.  We create a link
to the old name for now.
1999-10-12 20:25:11 +00:00
Peter Wemm
9b7a44a60e $Id$ -> $FreeBSD$ 1999-08-27 23:37:10 +00:00
Peter Wemm
d3c6699913 Make gcc work on the Alpha again. alpha/alpha.h is used instead of svr4.h 1999-08-19 21:19:36 +00:00
David E. O'Brien
5e796f18b4 Rev 1.36 also includes functional chagnes I intended to commit seperately.
Configuration header inclusion has been moved around to reduce diffs from
the offical GCC distribution.  We now generate the same ``tm.h'' produced by
gcc's `configure' script [minus all the "#ifdef IN_GCC"'s].

Jeff Law of EGCS/Cygus says the new "approved" way of doing configure-related
includes is to list them all in ``tm.h'' rather than having the architure
config headers include large numbers of other configure headers.
1999-08-16 09:55:16 +00:00
David E. O'Brien
b08a091980 Purely cosmetic cleanups.
- Id tag layout wrong.
 - "FOO =" -> "FOO=".
 - 4 space indention on continuation lines rather than a <tab>

Basic idea checked by:	bde
1999-08-16 04:10:48 +00:00
David E. O'Brien
c86942dc66 Move "LIBGCC_SPEC" to freebsd-native.h as it is not approapiate for
submitting to the GCC mainainers for folding into the stock GCC.
1999-08-15 21:59:46 +00:00
David E. O'Brien
440976accd Rather than deleting the grammer files during building, move them out of the
way.  This way they are available for inspection when debugging problems.
1999-08-14 22:40:01 +00:00
David E. O'Brien
62562698d8 Use Yacc rather than Bison. 1999-07-28 07:22:08 +00:00
David E. O'Brien
316dc6cb31 The Unix way is arguments come before an input file name, not after. 1999-07-28 07:19:38 +00:00
David E. O'Brien
e53bca4f44 Rather than hack config/freebsd.h to contain our hacks for a native compiler,
just include them in tm.h (as built from cc/cc_tools/Makefile).

This will reduce the diffs from the vendor sources.

Excellent idea by:	jdp
1999-04-28 18:48:08 +00:00
David E. O'Brien
52ae8152fa Sorry didn't get this in the last commit: MACHINE_ARCH changes courtesy
of Warner Losh <imp@village.org>.  (he's got plans for FreeBSD mips :-))
1999-04-22 20:12:21 +00:00
David E. O'Brien
a834cf28a5 Use GNU_ARCH' in most places where MACHINE_ARCH' was used. Building for
mips has some particularlies.
1999-04-22 19:35:16 +00:00
David E. O'Brien
403563f5aa Have config/i386/freebsd.h directly include att.h. I have no idea why stock
EGCS doesn't just do this.  None of the rest of our other platforms will need
this file.
1999-04-22 00:20:36 +00:00
David E. O'Brien
df35f426d2 Add FORTRAN support. 1999-04-18 09:44:36 +00:00
Bruce Evans
192e833d22 Cleaned up egcs changes (mainly to minimise diffs with the gcc version
and restore order to sorted lists).
1999-04-11 04:32:42 +00:00
Bruce Evans
5c2d3329d8 Fixed unusable dependencies in `.depend'. The following comment in the
code still applies, but the code attached to it had rotted:

# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
# Prevent mkdep from using it, so that we don't have to give rules for
# aliases of generated headers.

Many other makefiles seem to have the same bug (i.e., spelling "." as
"${.OBJDIR}" or as an even more complicated alias in -I directives).
1999-04-11 04:11:27 +00:00
Bruce Evans
c4980fa9d1 Fixed world breakage. Fixed (?) building with -jN (N > 1).
The previous commit made things worse by breaking the -j0 case and
moving around the breakage for the -jN case.  The fix involves
restoring .ORDER statements that were deleted in the previous commit,
removing wrong special handling of tree-check.h, and rewriting the
generation of fudged dependencies based on an idea I got from the
previous commit (filter out problematic objects first).
1999-04-09 18:46:48 +00:00
David E. O'Brien
c98a60baa7 Another fix for -jN building -- the last fix didn't fix it for everybody.
Submitted by:	Luoqi Chen <luoqi@watermarkgroup.com>
1999-04-08 23:37:46 +00:00
Peter Wemm
982be68f85 Clean up the multilib stuff so that it actually works..
cc -aout now works again.
1999-04-08 15:11:44 +00:00
David E. O'Brien
48dd62ca93 Remove some of the dependencies. This removes the cycles I was getting on
`make -j 8' builds.
1999-04-08 12:26:07 +00:00
David E. O'Brien
3cda6d944a Due to other explicit dependancies, don't treat tree-check.h as a SRCS. 1999-04-08 09:57:51 +00:00
David E. O'Brien
c7c0914a22 Fix a circular dependancy. 1999-04-08 09:21:52 +00:00
David E. O'Brien
ec7feef657 alpha/freebsd-elf.h is being folded into alpha/freebsd.h
Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-04-08 07:38:51 +00:00
Peter Wemm
bd694cebfc Fix type mismatch.. 1999-04-05 10:18:50 +00:00
David E. O'Brien
3da8ad7260 Conditionalize one more i386'ism. 1999-04-04 20:47:33 +00:00
David E. O'Brien
962ae20e3c Attempt at creating the right ``tm.h'' file for the Alpha. 1999-04-04 20:40:45 +00:00
David E. O'Brien
18ff6ae909 Minimum set of changes to switch from Gcc 2.7.2 (in contrib/gcc) to Egcs 1.1.2
(in contrib/egcs)
1999-04-04 16:36:35 +00:00
Bruce Evans
19e595a57a Split up rule for ${COMMONHDRS} so that `make -j N' doesn't create the
6 headers up to 6 times concurrently.  Debugged by Don Lewis
(Don.Lewis@tsc.tdk.com).

Fixed some disorder.
1998-10-16 16:53:15 +00:00
John Birrell
62d43a3bfc Make the build tools static to avoid trying to use the shared loader
before it is installed.

This upsets Bruce because the host boostrap build forces tools to be
static anyway. He says I'm abusing NOTOOLS in src/Makefile by using
it to do a aout->elf transition build. One day I'll find a place to
install host tools like these to allow a true cross build.
1998-08-20 21:45:46 +00:00
Bruce Evans
6d31e616a0 Added a `build-tools' target for internal tools. 1998-07-07 01:51:18 +00:00
Bruce Evans
93dce16147 Fixed missing dependencies. The critical missing one was of bi-lexer.o
on bi-parser.h.  Not having it sometimes (only with `make -j') triggered
a bug suite that led to ordinary cpp output being put in .depend files.
Various bugs (the main one only with `make -j') prevented timely detection
of failure to build and install gnu/usr.bin/cc.  Eventually the missing
${WORLDTMP}/usr/libexec/cpp caused ${WORLDTMP}/usr/bin/cpp to be invoked
by cc, and this version of cpp is not suitable for such invocation.
Ordinary cpp output was put in .depend files when cpp terminated options
processing before seeing the -M flag.

Cleaned up.
1998-04-23 16:30:51 +00:00
Bruce Evans
c5badc84cd Honour -static in LDLAGS. ld without -Bstatic is happy to choose
static libraries if there are no shared libraries in the search path,
but gcc without -static blindly attempts to link crt0.o.
1998-03-23 11:50:38 +00:00
Bruce Evans
3ac62e921a Fixed `make -jN depend' (N >= 2) by removing the beforedepend
target.  .ORDER doesn't work right, but is used for things related
to the depend target.  It "works" for the depend target by skipping
the build of .depend when N >= 2 and there is a non-default
beforedepend target with no rules.  Recent fixes made almost all
the beforedepend targets in the tree a no-op except for this bug.

Removed vestiges of elf and aout targets.
1998-03-12 12:52:24 +00:00
Peter Wemm
9cb13c2344 First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.

This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc.  So for now, the support is pretty much dormant.

The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files).  The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.

The initial idea came from i386/osfrose.h which is a dual rose/elf format
target.  These two are not as diverse as a.out and elf it would seem.

The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores.  The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes.  This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)

The default format is a.out (still), nobody should see any major changes.

With both elf and a.out tools and libraries installed:

[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!

[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!

Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)

Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
Bruce Evans
6acbf22513 Fixed `make -jN' for large N. The usual method of pretending that all
objects depend on all generated headers doesn't work because it gives
cyclic dependencies.  Give enough dependencies explicitly.  We no
longer need to use .SINGLESHELL for `make depend'.  .SINGLESHELL was
more of a bottleneck than usual because `make depend' makes everything.

Fixed some spelling and English errors.
1998-03-06 13:34:36 +00:00
John Birrell
3b306d567c Change MACHINE -> MACHINE_ARCH so that the design make sense on those
machines where the processor chip determines the compiler, and where
multiple machines use the same architecture.
1998-01-25 09:49:00 +00:00
John Birrell
a3f1de88b2 More i386 -> ${MACHINE} changes to make this Makefile machine
independent. It makes it look like you can get aout on alpha, but
that's just your imagination. The makefile above gives you no choice.
1998-01-11 04:13:25 +00:00
Jordan K. Hubbard
97fe7f477f Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Peter Wemm
fce15c9ab3 Revert $FreeBSD$ to $Id$ 1997-02-22 15:48:31 +00:00