Commit Graph

477 Commits

Author SHA1 Message Date
obrien
370995c37f Push as much as was easy of the mixed ELF & a.out support for the i386
into the i386 MD FreeBSD header.  Also comment tweaking, continuation line
style changes, and other minor changes to make this closer to the latest
FSF/GNU 3.0 sources (to reduce my headache when 3.0 is imported).
2001-03-02 02:42:42 +00:00
obrien
24ec32f09f Stylistic changes mirroring ones done in the FSF/GNU 3.0 development sources. 2001-02-28 22:37:32 +00:00
obrien
c6dcd6a7fe Merge rev 1.2 (-fformat-extensions); 1.{7,9} (complain about -O2 on the
Alpha & FORCE_OPTIMIZATION_DOWNGRADE); 1.8 (-Wnon-const-format)
into GCC 2.95.3(RC#3).
2001-02-17 09:06:31 +00:00
obrien
b545fa1c7f Merge gcc-2.95.3-test3 changes onto mainline. Bump FreeBSD cc version. 2001-02-17 08:35:00 +00:00
obrien
c67d59390e Enlist the FreeBSD-CURRENT users as testers of GCC 2.95.3 Release Candidate #3 2001-02-17 08:34:50 +00:00
obrien
a15849488b This commit was generated by cvs2svn to compensate for changes in r72562,
which included commits to RCS files with non-trunk default branches.
2001-02-17 08:34:50 +00:00
obrien
93d05d1855 Bump __FreeBSD_cc_version to 500002 to show the -pthread option change. 2001-02-08 05:27:17 +00:00
jdp
b0eae7994f Make the "-pthread" option work again, now that libc_r has to be
linked in addition to libc rather than instead of libc.

Ideally, "-pthread" would now be equivalent to adding "-lc_r" to the
end of the link command.  But it is slightly different in this
implementation.  Adding "-lc_r" to the link command would produce a
"ld" command line containing this:

    ... -lc_r /usr/lib/libgcc.a -lc /usr/lib/libgcc.a ...

but this implementation of the "-pthread" option produces this:

    ... /usr/lib/libgcc.a -lc_r -lc /usr/lib/libgcc.a ...

It would be possible to make them identical, but that doesn't fit
as nicely into GCC's way of doing things.  I don't think the ordering
change will make any difference in practice.
2001-01-25 18:57:13 +00:00
obrien
9d224a1cba Upgrade instructions that describe the 11-July-2000 import. 2001-01-04 11:21:44 +00:00
obrien
784d223de9 Merge rev 1.2 (-fformat-extensions); 1.{7,9} (complain about -O2 on the
Alpha & FORCE_OPTIMIZATION_DOWNGRADE); 1.8 (-Wnon-const-format)
into GCC 2.95.3(RC#1).
2001-01-03 18:05:31 +00:00
obrien
b2d68729b2 Merge gcc.2.95.3-test1 changes onto mainline 2001-01-03 17:17:01 +00:00
obrien
180bdd72ff Merge gcc 2.95.3-test1 changes onto vendor branch 2001-01-03 17:17:00 +00:00
peter
f765f56813 Enlist the FreeBSD-CURRENT users as testers of GCC 2.95.3 Release Candidate #1 2001-01-03 17:16:05 +00:00
obrien
c49a039ffd This commit was generated by cvs2svn to compensate for changes in r70635,
which included commits to RCS files with non-trunk default branches.
2001-01-03 17:16:04 +00:00
obrien
e103926ab5 Enlist the FreeBSD-CURRENT users as testers of GCC 2.95.3 Release Candidate #1 2001-01-03 17:16:04 +00:00
obrien
e584b1548c Update the 3-June-2000 import delete list to keep mkdeps.[ch] which
is needed by the new C preprocessor.
2000-12-01 11:02:05 +00:00
obrien
6b16a0fe37 Comment an endif. 2000-12-01 10:20:17 +00:00
obrien
19fd5b1366 Properly format the SUBTARGET_SWITCHES so that ``gcc -v --help'' prints
them out.

PR:		19326
Submitted by:	Naohiko Tsuji <yakisoba@f2.dion.ne.jp>
2000-11-11 04:50:51 +00:00
obrien
4b7105175f Remove the -kthread option that matched [sort of] the LinuxThreads port.
This option depended on bits not part of the base system and required
people to install the LinuxThreads port in a manner non-consistent with
the workings of our Ports Collection.
The directions for properly linking with LinuxThreads are given by that
port at install time.

Requested by:	jasone
2000-11-07 21:49:08 +00:00
obrien
a2cdf6684f Start using crt[in].o to adhear to the ELF ABI
(and crtstuff.c's requirements).
2000-10-30 12:25:22 +00:00
obrien
cc292f3682 Helper listing file specs to remove from a FSF/GCC anoncvs checkout
before importing new versions of GCC.  This differs from FREEBSD-Xlist
in that this is for use only with anoncvs checkouts, not tarball'ed
releases [snapshots].

This delete list applies to the 3-June-2000 import.
2000-10-13 11:35:53 +00:00
obrien
b2ca950104 Upgrade instructions that describe the 3-June-2000 import. 2000-10-13 11:32:20 +00:00
obrien
797ccd6333 Fix conflicts. 2000-05-27 02:43:50 +00:00
obrien
890b30850f Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch as of May 26th, 2000.  [these are changes March 31 - May 24th]
2000-05-27 02:25:28 +00:00
obrien
2213994dde This commit was generated by cvs2svn to compensate for changes in r60967,
which included commits to RCS files with non-trunk default branches.
2000-05-27 02:25:28 +00:00
obrien
0360392802 Do not use DWARF2 unwinding mechanisms for C++ exceptions on all of our
platforms.
2000-05-22 06:52:04 +00:00
obrien
c474a49cac ASM_DECLARE_OBJECT_NAME and ASM_FINISH_DECLARE_OBJECT are ELF MI routines
to generate the special .type and .size directives which are used to set
the corresponding fields of the linker symbol table entries in the ELF
object file.  As such they are not i386-specific and thus belong in our
MI header.  Otherwise on the Alpha we don't properly give the type and
size of dynamic symbols.  Bintuil versions past 2.9.1 warn of this and
w/o this change, `ld' generates a lot of warnings during a `make world'.
2000-05-20 10:14:43 +00:00
obrien
5295026471 Clarify that the "yields only last 2 digits of year in some locales" warning
does not apply to BSD.

Submitted by:	ache
2000-04-18 20:01:07 +00:00
obrien
7df70954d3 From FSFChangeLog: (tfaff): Now a function, not a string. All users changed.
I did not catch this on the EGCS 1.1.x --> GCC 2.95 upgrade.
So propogate this change to our custom hacks.

PR:		15549
Submitted by:	Naohiko Tsuji <yakisoba@osaka.interq.or.jp>
		Patrick Bihan-Faou <patrick@mindstep.com>
2000-04-18 04:13:29 +00:00
obrien
f55dd2a9b3 Sparc64 configure section.
Submitted by:	steve
2000-04-06 09:27:38 +00:00
obrien
89d6e979f6 Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch as of March 29th, 2000.  [these are changes March 7-29th]
2000-03-30 03:23:37 +00:00
obrien
3de76ad710 This commit was generated by cvs2svn to compensate for changes in r58809,
which included commits to RCS files with non-trunk default branches.
2000-03-30 03:23:37 +00:00
obrien
2d22f9eac0 Yell about -O2 on the Alpha. Forceably downgrade -O2+ if
"FORCE_OPTIMIZATION_DOWNGRADE" is defined when GCC is built.
2000-03-26 12:56:54 +00:00
obrien
13cef0c010 Clean up the FreeBSD configuration files -- includes removing the usage
of svr4.h on the i386, and moving all the shared arch neutral bits into
the FreeBSD general config header.
2000-03-23 10:18:26 +00:00
obrien
d30e2783e9 This is FreeBSD version 5.0. 2000-03-23 01:20:46 +00:00
obrien
4988cee646 Merge conflicts. 2000-03-09 10:11:08 +00:00
obrien
922a45e8c8 Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch as of March 7th, 2000.
2000-03-09 09:21:46 +00:00
obrien
f75cfb157e This commit was generated by cvs2svn to compensate for changes in r57844,
which included commits to RCS files with non-trunk default branches.
2000-03-09 09:21:46 +00:00
obrien
6995e4285b Fix our -mprofiler-epilogue code.
"The problem is that egcs/gcc-2.95's reorganisation of the prologue and
epilogue code to use rtl instead of output_asm_insn() completely broke our
hooks.  rtl is emitted in a different order, only after optimisation, while
output_asm_insn() is emitted immediately.  rtl is presumably used so that
the prologue and epilogue can be optimised.

I couldn't find any good examples to copy.  gcc's own
FUNCTION_BLOCK_PROFILER still uses output_asm_insn() and seems to be
completely broken.  One of the XXX comments points to this.

IIRC, the hacks here basically arrange to emit magic label names; then when
the magic names are output, they are transformed into prologue and epilogue
code."

Submitted by:	bde
2000-01-29 13:06:33 +00:00
obrien
3050fca7ad Bump __FreeBSD_version and __FreeBSD_cc_version due to the C++ ABI change
in GCC 2.95.2 from -fvtable-thunks to -fno-vtable-thunks by default.
2000-01-27 23:12:38 +00:00
obrien
d581a449b9 Do not use "DEFAULT_VTABLE_THUNKS". The bugs that have existed since
EGCS 1.x have not been worked out.  And with 4.0 RELEASE comming quickly
we need C++ to be stable and usable.
2000-01-25 06:58:15 +00:00
obrien
8797ccaa10 Merge in fixes from the GCC anoncvs tree. 2000-01-22 16:05:33 +00:00
obrien
d41539bd1f Merge in the restore pic register fix from the vendor branch.
PR:		3441
Submitted by:	Mark Diekhans <markd@Grizzly.COM>
2000-01-22 16:04:30 +00:00
obrien
19e1413b5d Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch"
branch on Jan 20th, 2000.
2000-01-22 02:59:08 +00:00
obrien
0c931ae0a1 This commit was generated by cvs2svn to compensate for changes in r56385,
which included commits to RCS files with non-trunk default branches.
2000-01-22 02:59:08 +00:00
obrien
06f3b91449 Virgin import of the GCC 2.95.2 compilers 2000-01-17 12:16:41 +00:00
obrien
620cc853d2 This commit was generated by cvs2svn to compensate for changes in r56173,
which included commits to RCS files with non-trunk default branches.
2000-01-17 12:16:41 +00:00
obrien
c34ec3d7da 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
obrien
8ed9d0ffe7 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
obrien
119cfeff30 Use symbolic values rather than constants in TARGET_DEFAULT.
Submitted by:	bde on -current
1999-12-19 07:40:17 +00:00
obrien
4cced586e8 Use a unified CPP_SPEC. 1999-12-19 06:42:24 +00:00
obrien
76277b31cd Provide complete coverage in switch statement to quiet -Wall. 1999-12-18 09:56:15 +00:00
obrien
f1e75fd104 Fix my CPP_SPEC synatax screwup.
Totally pissed at self:	obrien
1999-12-16 02:03:35 +00:00
obrien
fc793cf05b Remove the defining of __i486__ baesd on TARGET_CPU_DEFAULT and !m386 or m486. 1999-12-15 10:16:25 +00:00
obrien
1d683d70e0 * Use getobjformat() rather than manually do what it does.
* Don't conditional based on i386, but generalize to all FreeBSD arch's.
* Don't be a.out-centric, but generalize to handle other possible future
  formats.

Submitted by:	marcel (partial)
1999-11-29 10:41:21 +00:00
obrien
5498842a41 Virgin import of the GCC 2.95.1 compilers
(gcc/config/i386/freebsd.h renamed to freebsd-aout.h)
1999-11-24 06:24:35 +00:00
obrien
77fa5db577 This commit was generated by cvs2svn to compensate for changes in r53660,
which included commits to RCS files with non-trunk default branches.
1999-11-24 06:24:35 +00:00
obrien
722d29dd3f Virgin import of gcc from EGCS 1.1.2.
(renamed to freebsd-aout.h)
1999-11-24 06:23:43 +00:00
obrien
53fe286fed This commit was generated by cvs2svn to compensate for changes in r53657,
which included commits to RCS files with non-trunk default branches.
1999-11-24 06:23:43 +00:00
obrien
cada3a5382 Virgin import of GCC 2.7.2.3's gcc/config/i386/freebsd.h for a.out systems.
[This has been renamed to freebsd-aout.h to not conflict with our own
hacked up version.]
1999-11-24 06:22:22 +00:00
obrien
262bec7848 This commit was generated by cvs2svn to compensate for changes in r53654,
which included commits to RCS files with non-trunk default branches.
1999-11-24 06:22:22 +00:00
obrien
224187cfed * Remove a trailing ";" from a macro.
* Style cleanup.
1999-11-17 07:18:25 +00:00
obrien
4c6571b53b This temperary file can die now. 1999-11-17 07:03:32 +00:00
obrien
ff78e4a96e Fix a minor bogon. 1999-11-15 19:26:58 +00:00
obrien
aad7f00e38 Undo rev 1.13 (define "OBSTACK_CHUNK_SIZE" as getpagesize()).
It causes internal compiler errors and sig 11's with GCC 2.95.2.
1999-11-15 07:57:13 +00:00
obrien
7c64544e75 Upgrade support file for GCC 2.95.2. 1999-11-15 04:41:30 +00:00
obrien
9151d1432f Add rev 1.2 profiling tweaks, to GCC 2.95.2. 1999-11-15 04:33:36 +00:00
obrien
53ecec3782 Use the stock 2.95.2 file here.
I cannot determine if our previous (rev 1.2) changes for ObjC are still
appropriate.
1999-11-15 04:28:55 +00:00
obrien
3470fefd25 Bump __FreeBSD_cc_version due to the compiler upgrade. 1999-11-15 04:25:13 +00:00
obrien
196d3fb65e Make cross-compilation work for Alpha on i386 machines.
Note that the optimizer has a bug somewhere.  This means that only -O0
works at this time.

Submitted by:	marcel
1999-11-14 12:07:57 +00:00
obrien
89cb48b53d Remove 'SET_ASM_OP' macro, which is unused now and rather harmful
for recent Egcs 1.1.x.

Submitted by:	simokawa
1999-11-14 12:04:02 +00:00
obrien
0caf21e247 Changes for Alpha and EGCS.
*  Commonalities with i386, moved to a FreeBSD wide config file.
*  Major additions to this file were adapted from Hidetoshi Shimokawa
   <simokawa@FreeBSD.ORG>'s Alpha suppliment to the Egcs 1.1.2 port.
1999-11-14 12:01:58 +00:00
obrien
ed15955f8c Virgin import of the GCC 2.95.1 compilers 1999-11-14 08:33:44 +00:00
obrien
ac8208f082 This commit was generated by cvs2svn to compensate for changes in r53142,
which included commits to RCS files with non-trunk default branches.
1999-11-14 08:33:44 +00:00
obrien
163cbd8b5a Virgin import of gcc from EGCS 1.1.2 1999-11-14 08:31:18 +00:00
obrien
584ae1bbef This commit was generated by cvs2svn to compensate for changes in r53140,
which included commits to RCS files with non-trunk default branches.
1999-11-14 08:31:18 +00:00
marcel
1b5e9c01a9 Make cross-compilation work for Alpha on i386 machines. Note that
the optimizer has a bug somewhere. This means that only -O0 works
at this time.
1999-11-12 16:36:16 +00:00
obrien
077ec7b22c Virgin import from GCC 2.95.1.
As of GCC 2.95 these files from libiberty are absolutely required:
	ansidecl.h	libiberty.h	splay-tree.h	splay-tree.c

To keep from having to import all of libiberty, they are imported here
for now.  Before all is said and done, libiberty might be imported, or
these files might move elsewhere.
1999-11-04 10:35:02 +00:00
obrien
cbf1ad1c72 This commit was generated by cvs2svn to compensate for changes in r52878,
which included commits to RCS files with non-trunk default branches.
1999-11-04 10:35:02 +00:00
obrien
a252558aba Merge rev 1.2 [_exit() over exit()] into GCC 2.95.1. 1999-11-04 10:26:31 +00:00
obrien
eb5e8caab7 Merge rev 1.2 (use /tmp 1st, and then /var/tmp) into GCC 2.95.1. 1999-11-04 10:23:25 +00:00
obrien
a2002c935c Virgin import from GCC 2.95.1.
As of GCC 2.95 these files:
	choose-temp.c  demangle.h   getopt.h    obstack.c  pexecute.c
	cplus-dem.c    getopt.c     getopt1.c   obstack.h

were removed from the GCC compilers proper to libiberty.  To continue our
revision history, and to keep from having to import all of libiberty,
they are imported here as if they were never moved.
1999-11-04 10:20:05 +00:00
obrien
2c20d04b86 This commit was generated by cvs2svn to compensate for changes in r52874,
which included commits to RCS files with non-trunk default branches.
1999-11-04 10:20:05 +00:00
obrien
a6091f0a42 Structure field name changed. 1999-11-03 12:33:56 +00:00
obrien
7c732ab5d0 This brings rev 1.2 (reality check and document profiling extensions)
into GCC 2.95.2.
1999-11-01 20:09:07 +00:00
obrien
68ba60f301 This adds rev 1.2 (-fformat-extensions) to GCC 2.95.2. 1999-11-01 19:51:19 +00:00
obrien
929a892c18 Merge rev 1.2 (a.out support) into GCC 2.95.2. 1999-11-01 18:56:02 +00:00
obrien
60685dfcfd Add Alpha and proper x86 support to GCC 2.95.2.
[ Functionally speaking, this covers revs 1.{2,3} ]
1999-11-01 18:53:45 +00:00
obrien
69611a5db3 Merge our -fformat-extensions and printf0() into GCC 2.95.2. 1999-11-01 18:41:09 +00:00
obrien
4b66dfb903 Virgin import of the GCC 2.95.2 compilers 1999-11-01 08:28:22 +00:00
obrien
244fe162cc This commit was generated by cvs2svn to compensate for changes in r52750,
which included commits to RCS files with non-trunk default branches.
1999-11-01 08:28:22 +00:00
obrien
321582243d Use the stock file for now. 1999-10-27 09:45:47 +00:00
obrien
b0e43a5cf6 s brings rev 1.2 (document printf0()) into GCC 2.95.1. 1999-10-27 09:41:10 +00:00
obrien
d1a4530efd This brings rev 1.2 (reality check and document profiling extensions)
into GCC 2.95.1.
1999-10-27 09:37:24 +00:00
obrien
1292393efe This adds rev 1.2 (-fformat-extensions) to GCC 2.95.1. 1999-10-27 09:31:52 +00:00
obrien
05270b6462 Use the stock file. 1999-10-27 09:23:37 +00:00
obrien
574b483e89 Use the stock file now. 1999-10-26 09:17:58 +00:00
obrien
00201b83e6 Merge the FREEBSD_NATIVE and ELF/a.out support into GCC 2.95.1. 1999-10-26 09:13:47 +00:00
obrien
d169fbae43 Fix conflicts. 1999-10-26 08:57:00 +00:00
obrien
be3662861f Merge rev 1.2 (a.out support) into GCC 2.95.1. 1999-10-26 08:53:03 +00:00
obrien
83aa1e1aef Merge our changes - this brings rev 1.2 (fix stabs ordering for a.out)
into GCC 2.95.1.
1999-10-26 08:47:58 +00:00
obrien
bdaadca7c0 Merge our changes - this brings rev 1.2 (-fformat-extensions)
into GCC 2.95.1.
1999-10-26 08:45:23 +00:00
obrien
8db9511c04 Merge our changes - this brings revs 1.{2,3} minus rev 1.4 into GCC 2.95.1. 1999-10-26 08:41:38 +00:00
obrien
6ae771fde6 Fix conflicts. (dist src now contains our rev 1.1->1.2 changes) 1999-10-26 08:38:21 +00:00
obrien
bdbbf36ec3 Add Alpha and proper x86 support to GCC 2.95.1.
[ Functionally speaking, this covers revs 1.{2,3} ]
1999-10-16 08:44:43 +00:00
obrien
d7ea7964e7 Merge rev 1.2 (FreeBSD native support -- do not search the multitude of
extended include file paths that do not exist) into GCC 2.95.1.
1999-10-16 08:39:06 +00:00
obrien
9be0b14aaf Go back to stock file -- our mods are OBE. 1999-10-16 08:34:33 +00:00
obrien
c88c634d26 Merge our -fformat-extensions and printf0() into GCC 2.95.1. 1999-10-16 08:28:26 +00:00
obrien
b86ce00be8 Stick with the stock version of this. 1999-10-16 08:21:54 +00:00
obrien
d883fc3415 Use this stock version of this. 1999-10-16 08:13:35 +00:00
obrien
cf3ead1aa1 Use the stock file here. I cannot determine if our previous (rev 1.2)
changes for ObjC are still appropriate.
1999-10-16 08:12:02 +00:00
obrien
4e49c9209b Use stock file here. 1999-10-16 08:10:36 +00:00
obrien
d6efeabb7a Bring our profiling tweaks from rev 1.2 into GCC 2.95.1. 1999-10-16 08:08:21 +00:00
obrien
af6623e278 Merge BDE's printf format error fixes into GCC 2.95.1. 1999-10-16 07:57:37 +00:00
obrien
6fc90f57b3 Use the stock file here. 1999-10-16 07:56:14 +00:00
obrien
ad65a89b33 Use the stock GCC 2.95.1 file here. Our previous (rev 1.2) changes are OBE. 1999-10-16 07:53:19 +00:00
obrien
7f3675d738 Merge rev 1.2 into GCC 2.95.1. 1999-10-16 07:35:28 +00:00
obrien
712aed4e0b Fix conflicts. 1999-10-16 07:12:34 +00:00
obrien
874263d914 Virgin import of the GCC 2.95.1 compilers 1999-10-16 07:10:09 +00:00
obrien
05aa33623b This commit was generated by cvs2svn to compensate for changes in r52287,
which included commits to RCS files with non-trunk default branches.
1999-10-16 07:10:09 +00:00
obrien
cae8fa8120 Virgin import of the GCC 2.95.1 compilers 1999-10-16 06:09:09 +00:00
obrien
8f3bf11ba2 This commit was generated by cvs2svn to compensate for changes in r52284,
which included commits to RCS files with non-trunk default branches.
1999-10-16 06:09:09 +00:00
obrien
fcdace9ad8 Grrrrr. Put the $FreeBSD$ in a Bad Place. 1999-10-15 21:49:40 +00:00
obrien
3dcb5df695 Register the fact we want expand_main_function() to invoke __main. 1999-10-15 20:56:19 +00:00
obrien
eab3fcc626 Merge rev 1.2 (a.out support) into EGCS 1.1.2. 1999-10-15 20:48:35 +00:00
obrien
2f32fb0a0e Return these files back to their stock versions.
These files aren't used in either building GCC or with a GCC installation
in the "FreeBSD native" case.
1999-10-13 15:55:31 +00:00
obrien
9f01c491d0 Virgin import of EGCS 1.1.2 1999-10-12 00:47:56 +00:00
obrien
8032f1899c This commit was generated by cvs2svn to compensate for changes in r52143,
which included commits to RCS files with non-trunk default branches.
1999-10-12 00:47:56 +00:00
obrien
1555d44f14 Remove a useless blank line, I accidently added. 1999-10-12 00:35:49 +00:00
obrien
9f1f03f986 Move RCS tag to our normal place. 1999-10-10 22:43:12 +00:00
obrien
2dc205f241 Style cleanups:
* be consistant on protecting "#define FOO"s with "#undef FOO".
* be consistant that macro params are upper case, and commas are followed
  by a space in the macro definition
* protect macro param expansion by ()'s
* break long lines
* line continuations chars to consistant column
* remove trailing spaces
1999-10-10 22:33:40 +00:00
obrien
76d75beacc Remove things common to all FreeBSD platforms. They will now live in a
FreeBSD wide config file.

This includes "WORD_SWITCH_TAKES_ARG" & "SWITCH_TAKES_ARG".  Platforms
such as FreeBSD/MIPS will need to override these two defintions, but it
can #undef them and define them approapiately.
1999-10-10 22:17:24 +00:00
obrien
aa3f6dfa3a Virgin import of EGCS 1.1.2 1999-10-03 09:19:40 +00:00
obrien
355e1eeeeb This commit was generated by cvs2svn to compensate for changes in r51899,
which included commits to RCS files with non-trunk default branches.
1999-10-03 09:19:40 +00:00
obrien
cef7d41dd5 Virgin import of EGCS 1.1.2 1999-10-02 21:54:32 +00:00
obrien
0858aa3a81 This commit was generated by cvs2svn to compensate for changes in r51885,
which included commits to RCS files with non-trunk default branches.
1999-10-02 21:54:32 +00:00
obrien
a1342c30ed * We have /var/tmp, not /usr/tmp. So use that where EGCS used the latter.
*  In the absence of the env vars TMPDIR, TMP, TEMP (which override this
   ordering), attempt to create temperary files in /tmp, P_tmpdir (/var/tmp),
   /usr/tmp, and .  until successful.
1999-10-02 21:50:07 +00:00
obrien
ae0f17d54a Virgin import of EGCS 1.1.2 1999-10-02 01:46:57 +00:00
obrien
6709241681 This commit was generated by cvs2svn to compensate for changes in r51848,
which included commits to RCS files with non-trunk default branches.
1999-10-02 01:46:57 +00:00
obrien
caa7271ba9 Bring BDE's printf format error fixes into EGCS. 1999-09-19 11:00:01 +00:00
obrien
4e55baf141 Bring our profiling tweaks into EGCS 1.1.2. 1999-09-19 10:43:38 +00:00
obrien
28a04200f0 "COMMENT_BEGIN" is no longer used. 1999-09-19 10:32:18 +00:00
obrien
7d1a76ba11 Support linking against libgcc_r.
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1999-09-19 10:31:14 +00:00
obrien
eed2bb0659 This should get us the same functionality we had with GCC 2.7.2.1.
*  Support for our dual ELF/a.out building ability
*  Our custom ASM_* definitions
*  Our custom debugger and profiling related definitions
*  Our custom STARTFILE/ENDFILE specs

*  The stock EGCS 1.1.2 freebsd-elf.h file depended on
   egcs-1.1.2/gcc/config/linux.h, which included "svr4.h".  We will
   include "svr4.h" via our "tm.h" definition.  So add the few bits
   from "linux.h" we actually needed.

*  Using our current crtbegin.o/crtend.o we cannot support the DWARF2
   unwinding mechanisms.  In the future we will switch to the
   non-sjlj-exceptions type exception machanism.  However the `make world'
   bootstrap problems with the EGCS crtstuff.c must be overcome first.

*  Our a.out gas doesn't "know" to use NOP's for aligns while in the text
   section.  Thus the a.out alignment generation needed tweaking from
   what we did with GCC 2.7.2.  [from BDE]

*  The definition of SUPPORTS_ONE_ONLY prevents the compiler from trying
   to use "linkonce" sections for a.out.  The definition of
   NO_DBX_FUNCTION_END we had causes it to avoid .stabs symbols that the
   assembler cannot handle for a.out.  [from JDP]

*  The previous "EXCEPTION_SECTION_FUNCTION" is the wrong name for EGCS.
   It also needed tweaking for EGCS.  [from JDP]

Also bump __FreeBSD_cc_version to 400002 in case we need to know we are
using EGCS at some point.
1999-09-19 10:28:57 +00:00
obrien
9fae78db4f Use the stock EGCS version of this. 1999-09-19 09:09:21 +00:00
obrien
cad2b43722 Document the new i386 family options.
Obtained from:	invoke.texi
1999-09-19 09:00:24 +00:00
obrien
385f21dad7 Document -Os optimization. Add to -O{0,2} documentation.
Obtained from:	invoke.texi
1999-09-19 08:58:44 +00:00
obrien
2e9bc72c28 Merge revs 1.2-1.11 (doc fixes and updates to reflect reality) into the
EGCS 1.1.2 manpage.
1999-09-19 08:56:04 +00:00
obrien
8e8efb3bd5 Merge rev 1.2 docs fixes into EGCS 1.1.2's manpage. 1999-09-19 08:18:18 +00:00
obrien
0ecfea2ee8 Fix conflicts. This has a small part of rev 1.2 in it. 1999-09-18 11:14:59 +00:00
obrien
b93c24d42b Fix conflicts. This merges revs 1.{2,3} with EGCS 1.1.2. 1999-09-18 11:02:28 +00:00
bde
4f52cde87f Merge from ../egcs/gcc/gcc.c rev.1.5:
Don't exclude directories that the linker is "known" to search (/lib
and /usr/lib) when deciding whether to pass certain paths to the
linker.  Under FreeBSD, the linker is actually known to never search
/lib and to only search /usr/lib in the elf case.  Not passing the
paths causes at best causes confusing differences for cross compiling.
This change is conditional on FREEBSD_NATIVE but should be absolute.
1999-09-13 15:50:16 +00:00
obrien
1307fb8ba8 Use the stock EGCS 1.1.2 file here. Our previous changes are OBE.
(code change by rev 1.3 has been removed, and 1.2 is not needed since
contrib/gcc/cp/except.c is now the stock one)
1999-08-30 10:50:39 +00:00
obrien
ba9b2147f2 Use the stock EGCS 1.1.2 file here. I cannot determine if our previous
changes for ObjC are still appropriate.
1999-08-30 10:27:11 +00:00
obrien
1d16d23ff8 This brings rev 1.2 into EGCS 1.1.2. Also tweaks gleemed from EGCS
ChangeLog's.  Note that rev 1.3 changes (HOST_PTR_PRINTF) was not
brought into EGCS 1.1.2 as that is the default.
1999-08-30 10:12:33 +00:00
obrien
537ee54f88 Fix conflicts. 1999-08-30 09:58:28 +00:00
obrien
903d244211 Use the stock EGCS 1.1.2 file here. Our previous changes are OBE. 1999-08-30 09:54:31 +00:00
obrien
2bce35da0a This add Alpha and proper x86 support to EGCS 1.1.2. Functionally speaking,
this covers revs 1.{2,3}.
1999-08-30 08:41:19 +00:00
obrien
0191a04a93 This brings rev 1.2 (reality check and document profiling extensions)
into EGCS 1.1.2.
1999-08-30 07:51:44 +00:00
obrien
237b828920 This brings rev 1.2 (document printf0()) into EGCS 1.1.2. 1999-08-30 07:38:42 +00:00
obrien
61f8ac135c Fix conflicts. 1999-08-30 07:28:52 +00:00
obrien
308b546022 Fix conflicts.
This adds rev 1.2 (-fformat-extensions) to EGCS 1.1.2.
1999-08-30 04:01:02 +00:00
obrien
1179e4387f Fix conflict. 1999-08-30 01:02:55 +00:00
obrien
48597b2c18 Fix conflicts. 1999-08-30 00:01:36 +00:00
obrien
ec9280070b This brings rev 1.2 (FREEBSD_NATIVE) and rev 1.5 (mixed ELF/aout support)
into EGCS 1.1.2.
1999-08-29 23:53:46 +00:00
obrien
23cf060089 Correct vfork()/exit() to vfork()/_exit().
Also return "1" rather than "-1".  According to bde: -1 is unrepresentable.
Exit statuses must be >= 0 and <= 255, at least if chars are 8 bits and
shorts are 16 bits.  This seems to only be documented indirectly in exit.2
by referring to wait.2.  WEXITSTATUS() throws away all except the low 8 bits
of the status returned by _exit(), and the kernel actually only stores 8
bits of it (if chars are 8 bits, etc.), so wait() can't return any more bits.

Obtained from: rev 1.4 of contrib/gcc/gcc.c
1999-08-29 23:46:20 +00:00
obrien
6ae2479e39 Fix conflicts.
This brings rev 1.2 (-fformat-extensions) into EGCS 1.1.2.
1999-08-28 11:46:53 +00:00
obrien
3a35f41abc Fix conflicts.
This brings revs 1.{2,3} minus rev 1.4 into EGCS 1.1.2.
1999-08-28 11:27:19 +00:00
obrien
f77ff8b800 Fix conflicts. 1999-08-28 08:14:14 +00:00
obrien
c4b74a1764 Fix conflicts. This brings rev 1.2 (fix stabs ordering for a.out) into
EGCS 1.1.2.
1999-08-28 07:19:03 +00:00
obrien
550b040d68 Fix conflicts. This brings in rev 1.2 (FreeBSD native support -- do not
search the multitude of extended include file paths that do not exist)
into EGCS 1.1.2.
1999-08-27 11:02:42 +00:00
obrien
b1e989f610 Fix conflicts. This brings the "printf0" addition into EGCS 1.1.2. 1999-08-27 10:58:48 +00:00
obrien
e7996da3fa Don't accept %q length specifiers in the kernel (more precisely,
if compiling with -fformat-extensions). Gcc's format checker never
actually supported %q length specifiers.  It treats %q as an alias
for %ll, which is correct if quad_t is long long (e.g., on i386's)
and broken otherwise (e.g., on alphas).

quad_t's currently should be printed in the same way that they
already need to be printed to avoid compiler warnings on all
supported systems: cast them to a standard type that is at least
as large (long or long long) and use the length specifier for that
(%l or %ll).  This is problematic since long long isn't standard
yet.  C9x's intmax_t should be implemented soon.

Don't accept %L length specifiers in the kernel either.  The only
legitimate ones are for long doubles, but the kernel doesn't even
support plain doubles.  (gcc bogusly accepts %Ld as an alias for
%lld, and it sometimes prints "q" in error messages about "ll" and
"L" length specifiers, becauses it represents all these specifiers
as 'q'.)

Submitted by:	bde
1999-08-27 10:05:08 +00:00
obrien
a774007e84 Fixed kernel format checking:
- plain %r and %z were disallowed.  The hard NULs in the warnings were
  hopefully caused by disallowing of plain formats being nonsense.
- new formats for shortening to a byte were allowed, but even the libc
  printf doesn't support them.
- old %hr and %hz formats were allowed, but the kernel printf doesn't
  support them.  The kernel doesn't support %hd either, but this is
  harder to fix.

Submitted by:	bde
1999-08-27 10:02:56 +00:00
obrien
2f0dd791ee Fix conflicts.
This brings revs 1.2 (-fformat-extensions) and 1.3 (printf0())
into EGCS 1.1.2.
1999-08-27 10:01:05 +00:00
obrien
426fcb8f55 Fix conflicts. 1999-08-27 09:36:15 +00:00
obrien
0bedf4fb30 Virgin import of gcc from EGCS 1.1.2 1999-08-26 09:30:50 +00:00
obrien
ad6db0c2d6 This commit was generated by cvs2svn to compensate for changes in r50397,
which included commits to RCS files with non-trunk default branches.
1999-08-26 09:30:50 +00:00
obrien
46e13824b3 * Consistantly surround macro parameters with ()
* Consistantly put spaces after "," in macro param lists
* Consistantly align continuation characters.
* Don't need to supply all variations of __FOO__ in CPP_PREDEFINES,
  gcc will do that for us.
1999-08-20 09:01:55 +00:00
obrien
5b15ba9a9b Move two of the DBX config directives to the common configuration header.
Also simply CPP_PREDEFINES a little.
1999-08-19 09:16:23 +00:00
obrien
b1194cd711 Move "WORD_SWITCH_TAKES_ARG" & "SWITCH_TAKES_ARG" to the general spec file
since their definitions were identical.  FreeBSD/MIPS will need to override
these two defintions, but it can #undef them and define them approapiately.
1999-08-15 22:02:50 +00:00
obrien
e873ea78b5 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
obrien
d4db5fb866 Virgin import of GCC 2.7.2.3 1999-07-10 23:03:59 +00:00
obrien
597d081113 This commit was generated by cvs2svn to compensate for changes in r48743,
which included commits to RCS files with non-trunk default branches.
1999-07-10 23:03:59 +00:00
obrien
972ce87b94 * The OBSTACK_CHUNK_SIZE #define was in the "Code generation parameters"
section rather than the "Miscellaneous parameters" where it belongs.

* Clarify what we are locating using the -m rule.

Submitted by:	bde
1999-07-02 19:26:45 +00:00
obrien
1b821b7e71 The GNU standard about putting 2 spaces after sentences in comments
was not consistantly followed.

Submitted by:	bde
1999-07-02 19:20:44 +00:00
obrien
11285d42bb Define "OBSTACK_CHUNK_SIZE" as getpagesize().
Our malloc can allocte pagesized blocks efficiently and the EGCS default size
of 4072 bytes is not optimal.

Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-06-28 09:05:56 +00:00
simokawa
e2ee147d6e Remove 'SET_ASM_OP' macro, which is unused now and rather harmful
for recent egcs.
1999-06-10 12:05:48 +00:00
jdp
68c20b8d38 Fix typo (#unset where #undef was meant). 1999-05-21 04:56:32 +00:00
obrien
7f4b070df4 Consistantly protect "#define FOO ..." with "#undef FOO". 1999-05-20 08:30:48 +00:00
obrien
0d3ecf09a3 Turn DEFAULT_VTABLE_THUNKS back on. It caused problems with undefined symbols
in libstdc++.

Until I have a chance to look at what that problem is and to carefully consider
the upgrade issues of turning it back on at a later date if we leave it turned
off for any extended peroid of time.
1999-04-30 19:12:51 +00:00
obrien
522e272a7b 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
obrien
152572105d Simplify the definition of FBSD_SWITCH_TAKES_ARG, and make sure
SWITCH_TAKES_ARG isn't defined (which svr4.h does) when we assign our
definition to it.
1999-04-27 19:29:44 +00:00
obrien
01aaff1d4d Wait until EGCS 1.2 to use more efficient ``thunks'' to implement C++ vtables.
While I have yet to hear of any problems with us using thunks.  The EGCS
mailing list notes some have problems with it and not using them are a
safer default.  People wanting to use them, can set the appropiate
compiler flag.
1999-04-27 15:43:56 +00:00
obrien
acbe0a68a9 Use new FBSD_SWITCH_TAKES_ARG' and FBSD_WORD_SWITCH_TAKES_ARG'. 1999-04-22 17:45:24 +00:00
obrien
dbaaa127aa Move SWITCH_TAKES_ARG' to FBSD_SWITCH_TAKES_ARG' and `WORD_SWITCH_TAKES_ARG'
to `FBSD_WORD_SWITCH_TAKES_ARG' which allows architectures to tweak these
values if needed.
1999-04-22 17:45:01 +00:00
obrien
9163a26c66 Support linking against libgcc_r.
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1999-04-14 00:25:45 +00:00
bde
fa2c69b869 Removed unconditional definitions of __ELF__. They were redundant for
elf and wrong for i386-aout.
1999-04-08 13:57:13 +00:00
obrien
33869a012a Merge shared LIB_SPEC into share config header. 1999-04-08 07:49:24 +00:00
obrien
7b0c099985 merge alpha/freebsd-elf.h into alpha/freebsd.h
Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-04-08 07:48:49 +00:00
obrien
252934eed1 Mispelled global option in usage. 1999-04-06 13:09:24 +00:00
obrien
2a0996cae8 Fix space padding that was causing a problem in creating the final
CPP_PREDEFINES.
1999-04-04 22:46:18 +00:00
obrien
d5b807bf5c * Protect ourselves from any previously defined options.
* Turn on DEFAULT_VTABLE_THUNKS.  (it is the default anyway, I'm just being
  explicit about it, in case it causes us trouble it might be easier for
  someone to notice it this way)
1999-04-03 23:26:03 +00:00
obrien
53c1c29e25 Bump __FreeBSD_cc_version to 400002 in case we need to know we are using
EGCS at some point.

Submitted by:	jdp
1999-04-03 02:18:13 +00:00
obrien
b3def447d1 Alpha architecture config files.
Obtained from:	adapted from Hidetoshi Shimokawa <simokawa@FreeBSD.ORG>'s
		alpha suppliment to the Egcs port.
1999-03-30 07:47:06 +00:00
cvs2svn
b822db1505 This commit was manufactured by cvs2svn to create branch 'VENDOR-gcc'. 1999-03-30 07:36:37 +00:00
obrien
9ad28c2fca Base configuration file for all FreeBSD targets. 1999-03-30 07:36:36 +00:00
phk
c981a9a5a2 Remove the linker-set hack we used for BB profiling. 1999-03-21 12:28:14 +00:00
obrien
17849cc92e Update __FreeBSD__ and __FreeBSD_cc_version to be consistant with
__FreeBSD_version

Forgotten by: Eivind and Some anonymous release engineer
1999-01-22 11:09:00 +00:00
peter
8e07cd6f5f a.out is default 1999-01-16 08:51:46 +00:00
cracauer
86c5de6d0d Compile threaded proframs with -D_THREAD_SAFE, not -D_THREADSAFE 1998-12-15 16:43:14 +00:00
jdp
dea39ed229 Per request from ache, change the numbering scheme of __FreeBSD_cc_version.
Its form is now like __FreeBSD_version, with the FreeBSD revision in
the top digits.
1998-10-29 22:11:08 +00:00
jdp
5eec3e3f20 Add a new predefined preprocessor symbol "__FreeBSD_cc_version",
with a numeric value that describes the feature level of the
compiler.  This can be used to check for the presence/absence of
FreeBSD-specific compiler features.  The value is a decimal number
whose digits have the form VRRRRFF, where:

	V    = Compiler vendor.  0 (elided) means gcc.
	RRRR = Vendor's version number, e.g., 2721 for the current
	       gcc version (2.7.2.1).
	FF   = FreeBSD-specific revision level.  00 means the stock
	       compiler from the vendor.

The value of "__FreeBSD_cc_version" is hard-coded in
"src/contrib/gcc/config/i386/freebsd.h" and must be incremented
when new FreeBSD-specific compiler features are added.  I considered
simply picking up the value of FreeBSD_version from <osreldate.h>.
But that would break cross compiles of gcc.

PR:		Part of the fix for gnu/8452
Suggested by:	bde
1998-10-29 04:27:06 +00:00
imp
0a82f89ab6 Add alpha-*=freebsd* to configure 1998-09-09 17:07:36 +00:00
jdp
5b11e2a2f4 Make profiling work for ELF. gprof now autodetects the format of
the executable file, so it will work for both a.out and ELF format
files.  I have split the object format specific code into separate
source files.  It's cleaner than it was before, but it's still
pretty crufty.

Don't cheat on your make world for this update.  A lot of things
have to be rebuilt for it to work, including the compiler and all
of the profiled libraries.
1998-09-07 23:32:00 +00:00
jb
44d03426b1 Change /etc/objectformat to /etc/objformat. Last chance 'cause it's E-day.
Suggested by: jdp
1998-08-30 20:40:29 +00:00
bde
f0825df278 Support printf format checking of FreeBSD kernel formats %[Dbrz].
This is enabled by the undocumented option -fformat-extensions.
This option should be named better and/or give more control over
the extensions.

Fixed a message - don't warn about the field width when it's the
precision that has the wrong type.  Didn't fix excessive checking
for the precision relative to the type - ANSI requires both to be
ints, but gcc permits the field width to be either int or unsigned
int.
1998-08-24 06:33:52 +00:00
bde
559a9a5f7d Fixed printf format errors. gcc should have a macro HOST_PTR_PRINTF_TYPE
to go with its HOST_PTR_PRINTF[_FORMAT], since if %p is wrong for the
format then `void *' is probably wrong for the type.
1998-08-02 14:57:00 +00:00
jdp
0883088b05 Add support for a new archetype "printf0" for the "format" function
attribute.  It is like the existing "printf" archetype, except that
it doesn't complain if the format string is a null pointer.  See
the node "Function Attributes" in the GCC info pages if you don't
know what this is all about.

This change will allow us to add format string checking for the
err(3) family of functions.
1998-07-15 04:22:45 +00:00
bde
080e3ef296 Fixed printf format errors. 1998-06-30 19:53:09 +00:00
jb
ba935f3272 Add LIB_SPEC (same as on i386) so that gcc knows about libc_r. 1998-06-08 10:58:36 +00:00
peter
9527a97222 -pg was causing a link with -lc_r... :-]
Submitted by:  Dmitry Khrustalev <dima@xyzzy.machaon.ru>
PR: 6287
1998-04-13 14:12:34 +00:00
jb
035d92130a Document the FreeBSD specific options from LIB_SPEC. 1998-04-10 09:19:11 +00:00
jb
813e1f6dac Ouch, my local cvs walloped the version I thought I was committing.
Here is what I intended.
1998-03-14 03:02:19 +00:00
jb
7b1976eca5 On i386, freebsd.h and freebsd-elf.h have been merged to combine
aout and elf support. freebsd-elf.h died as a result, so the BINFORMAT
test for elf in src/gnu/usr.bin/cc/cc_tool/Makefile will need to
use freebsd.h, not freebsd-elf.h. That means that alpha will have to
go the same way. The new alpha/freebsd.h has the alpha/freebsd-elf.h
definitions merged in.
1998-03-13 21:12:12 +00:00
jb
cb348fd0d5 Nuke crti.o from the STARTFILE_SPEC again. No asm code is needed on alpha.
Add the define that lets gas know how to ".set" and enable pragmas
so that #pragma weak will work.
1998-03-11 20:56:24 +00:00
jb
c736173442 Change the LINK_SPEC to specify the same runtime loader as used on
i386-elf because that is what will be used for FreeBSD/Alpha.

Change the STARTFILE_SPEC to match the non-aout version of i386 so
that the csu files can be built in exactly the same way as i386-elf.
This means that FreeBSD/Alpha departs from NetBSD/Alpha which uses
crt0 and crtbegin/crtend. Since i386-aout uses crt0, I guess it was
decided that i386-elf should use crt1. i386-elf also references
crti and with this change, so does FreeBAS/Alpha.

I think it is important for FreeBSD to have a consistent implementation
across architectures and since ELF is quite compatible (ignoring
differences in 32 and 64 bits), gcc might as well be configured the
same.

Another change is that the entry symbol is _start, not __start as
in NetBSD.
1998-03-10 06:47:14 +00:00
peter
b0d1291cc8 Both our a.out (hacked) gas and the binutils gas support .weak
Prompted by: bde
1998-03-09 04:47:58 +00:00
peter
b4375c6592 Only do a.out/elf switching on i386 family 1998-03-09 04:13:31 +00:00
peter
b13939a64c Don't disable the use of $ in assembler labels.. It changes libstdc++
and libg++ so that they won't work with existing binaries (including
netscape!!).
1998-03-09 03:26:57 +00:00
peter
075f262da2 Spell -Bshareable correctly... :-] 1998-03-08 16:09:57 +00:00
peter
5a58d42fe2 svr4.h defines ASM_IDENTIFY_GCC, but neglects to define
ASM_IDENTIFY_LANGUAGE.  Use the osfrose.h method, because gdb assumes
'C' by default, so there's no need to further clutter the symbol table.
1998-03-08 13:26:15 +00:00
peter
d616a733c3 Cosmetic cleanup for a.out asm generation.. Don't put the end-of-file
markers that the stabs-in-elf system uses.
1998-03-08 12:47:45 +00:00
peter
89f7f39c2e Put the function stabs in traditional order on a.out, or gdb doesn't see
function local variables.
1998-03-08 11:54:04 +00:00
peter
69d046431c Add hooks for John Birrell's kernel thread support library.
Submitted by: John Birrell <jb@cimlogic.com.au>
1998-03-08 05:33:24 +00:00
peter
c39aed21a8 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
jb
e430c03c79 Upgrade the cpp pre-defines to include -Dunix. Turns out we need that
to compile m4.

And don't just define __FreeBSD__, but define it as -D__FreeBSD__=3
like on i386.
1998-01-12 02:53:28 +00:00
jb
f0c9fe97ad Add the alpha MD files for gcc to product ELF for FreeBSD/Alpha.
See freebsd.h and freebsd-elf.h for the silly comment that cgd@netbsd.org
wanted me to add about his claim that uncommented source files that
have been publicly available for ftp for nearly a year; that are
configuration patches to a GPL'ed program; are owned by his previous
employer who refuses to release them. Well... I did as he said. As if
that makes a difference!

At this point we've got cpp, gcc, g++ ported to FreeBSD/Alpha so all
the code that uses __FreeBSD__ is correctly pre-processed. Yay.

I'll commit the bootstrap makefile next to let others play, then on
to libc.
1998-01-11 04:39:46 +00:00
wosch
fde8a8ec46 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
peter
5c7910da94 Merge in some of my changes with John's. I've used this to build
an ELF system.  I'm not sure about some of the things here.  We definately
need to go back and rationalize this.
1997-08-29 06:11:52 +00:00
jdp
66c70016d7 Add the necessary defines to the freebsd-elf configuration so that
it can be built via BINFORMAT=elf in the environment.  Most likely
some of the directory defines such as STANDARD_EXEC_PREFIX will
change again soon, as we settle on the proper locations for the
various components.

Note, the build still fails when it tries to compile libgcc2.c
using the ELF compiler, unless arrangements have been made for the
compiler to find the ELF assembler instead of the a.out assembler.
1997-08-28 01:38:56 +00:00
bde
1508663a82 Attempt to fix clobbered vendor Id. 1997-06-29 11:43:31 +00:00
asami
b15bba4e8b Make all the info dir entries line up neatly. 1997-05-28 07:49:21 +00:00
eivind
7a1932b397 it's'' -> its'' where appropriate and typo fixes in time2posix.3.
Closes PR docs/3612.

Submitted by:	Josh Gilliam <soil@quick.net>
1997-05-19 16:33:27 +00:00
peter
4fade92ec3 The -pthread option was added to freebsd.h but missed from freebsd-elf.h 1997-05-12 09:24:27 +00:00
jmg
4e2b8410b9 change an' to a'...
Submitted by: Josh Gilliam
Closes PR#3471
1997-05-05 07:43:50 +00:00
jb
8063125723 Let gcc know about libc_r. Use -pthread to link against libc_r instead
of libc.
1997-05-03 02:58:54 +00:00
peter
93c713af2b correct vfork()/exit() to vfork()/_exit(). This is far more important
now that vfork() actually works in FreeBSD for the first time.

Spotted by: se
1997-04-25 06:42:57 +00:00
jdp
76800e1dac Make "gcc -shared" work properly for building shared libraries. An
up-to-date version of c++rt0.o is necessary for this to work right.

Closes PR gnu/3035: gcc -shared flag is broken.
1997-04-09 20:13:41 +00:00
jdp
8a34de70b7 Disallow "-p" when linking, with a diagnostic that recommends using
"-pg" and gprof(1) instead.  FreeBSD does not support plain "-p" or
prof(1).

Plain "-p" is still allowed when just compiling.  In the compile
phase, "-p" is identical "-pg".  It is used by <bsd.lib.mk> for
building profiled object files.
1997-04-05 16:19:08 +00:00