Commit Graph

306 Commits

Author SHA1 Message Date
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
jdp
33b1550bf9 Update the value of "__FreeBSD__" to 3 for the ELF compiler. 1997-03-26 17:05:21 +00:00
asami
5db8032745 -current is now 3.0. NOT a 2.2 candidate. :) 1997-03-25 08:06:06 +00:00
jmg
9243f015c6 slight fix to gcc's man page... 1997-03-23 00:51:16 +00:00
obrien
aa03d66ddb Undo rev 1.4 of freebsd.h and 1.2 freebsd-elf.h, where I added
_BSD4_4 as a predefined symbol.  People on the lists generally didn't care
for it.
1997-02-24 13:19:34 +00:00
peter
03a8e14963 check for /usr/libdata/gcc/specs and use it if it exists. 1997-02-22 15:21:40 +00:00
peter
b041645f92 Back out easy $FreeBSD$ (file already left vendor branch) 1997-02-22 10:52:38 +00:00
obrien
0e2c5febdb Add _BSD4_4 as a predefined symbol.
Peter Dufault (dufault@hda.com) suggested this is the most approate symbol
to use.

2.2-R candidate.
1997-02-16 20:55:32 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
phk
f335bb5f50 Fix BB profiling.
Submitted by:	bde
1997-01-13 12:15:29 +00:00
jmacd
8514111caf This file has the info annotation, except its annotated name
is different from its filename for some reason.
1997-01-11 02:56:24 +00:00
peter
664237b984 Apparently this patch fixes the objc backend on the i386 platforms.
Without this, compiled programs die with FP errors.

This is originally credited to: jlemon@netcom.com (Jonathan Lemon), and
has been forwarded to me by quite a few of people.
1996-10-26 17:00:50 +00:00
peter
f27b081045 Remove temporary hack to disable use of libstdc++ now that it's built and
installed (and hopefully: working).
1996-10-04 08:51:18 +00:00
jdp
b400b72e46 Fix a bug that caused incorrect PIC code to be generated for exceptions.
The symptom was an assembler warning

    "GOT relocation burb: `___EXCEPTION_TABLE__' should be global"

followed (sometimes) by a core dump.  The fix makes the compiler
generate the correct GOTOFF addressing for that symbol, rather than the
GOT addressing it was emitting before.

Warning:  There is still at least one serious bug in the i386 exception
code for PIC.  The exception code that is generated clobbers the GOT
register (%ebx) and then tries to use it later.  That leads to core
dumps at program execution time.  I know where the problem is, but I do
not have a fix for it at this time.  Until it is fixed, exceptions will
not work in PIC code.  This is a general problem for all i386 platforms;
it is not specific to FreeBSD.
1996-10-03 17:49:35 +00:00
peter
cdaee83df3 Activate the .weak code generation for libgcc.a and g++ now that it works. 1996-10-01 02:20:27 +00:00
peter
ff1dd074e9 Temporarily disable the code that wants to add -lstdc++ in tge g++ driver
since we don't have it yet and I've taken too long on the libg++-2.7.2
stuff (it causes problems due to to the lack of .weak support which I've
nearly finished)

Submitted by: "Ph. Charnier" <charnier@xp11.frmug.org>
1996-09-27 05:13:40 +00:00
peter
94e258bfb2 Doc fixes and updates to reflect reality, as well as info about profiling
extensions.
1996-09-18 06:56:52 +00:00
peter
3f4cc3faf3 Merge in freebsd-specific changes 1996-09-18 06:54:11 +00:00
peter
59ec5b8a7a Add in hooks to produce assembler output suitable for binutils+elf
Obtained from: John Polstra <jdp@freebsd.org>, from his elfkit.
1996-09-18 06:50:39 +00:00
peter
e122308212 Add the hooks that we use for our profiling extensions.
Obtained from: bde
1996-09-18 06:47:49 +00:00
peter
30f62fbc36 When running native on freebsd (ie: in /usr/bin, /usr/libexec, not the
gnu-style /usr/local/lib/gcc* layout), only search the paths that
exist for the modules (cc1, cc1plus , cc1obj etc)

Also, update an error message.
1996-09-18 06:45:17 +00:00
peter
0d2830f018 When compiling native on freebsd, do not search the multitude of extended
include file paths that do not exist.
1996-09-18 06:40:54 +00:00
peter
be3d0a43ba build libgcc*.a a little more compact by removing excess local symbols
Obtained from: bde
1996-09-18 06:37:22 +00:00
peter
631dad77e7 My feeble attempt at fixing complaints that makeinfo makes about
errors in this doc.
1996-09-18 06:35:00 +00:00
peter
1a3f294135 Do not print two \n's in a fatal error message.
Obtained from: bde
1996-09-18 06:33:32 +00:00
peter
f64632475d Patches originally obtained from Bruce Evans <bde@freebsd.org> to make
gcc "do the right thing" when running standalone on FreeBSD
1996-09-18 06:31:42 +00:00
peter
acb2bcd167 Import of 2.7.2.1 into vendor branch 1996-09-18 05:45:16 +00:00
peter
d4691e641b Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of the
non-i386, non-unix, and generatable files have been trimmed, but can easily
be added in later if needed.

gcc-2.7.2.1 will follow shortly, it's a very small delta to this and it's
handy to have both available for reference for such little cost.

The freebsd-specific changes will then be committed, and once the dust has
settled, the bmakefiles will be committed to use this code.
1996-09-18 05:35:50 +00:00