History log of /freebsd-9.3-release/contrib/gcc/gcc.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 260012 28-Dec-2013 pfg

MFC r259666, r259696:

gcc: warnings from -Wformat-security

Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)


# 247167 23-Feb-2013 kientzle

MFC support for -print-file-name=include.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 170077 28-May-2007 kan

Disable shared libgcc use for profiled builds. GNU linker pulls symbols
out of libgcc_s.so.1 somehow and fails to record DT_NEEED dependency
when linking with profiled libraries despite --ld-as-needed option.


# 169704 19-May-2007 kan

Merge local FreeBSD changes.


# 161660 26-Aug-2006 kan

Resolve conflicts after GCC 3.4.6 20060825 import.


# 146908 03-Jun-2005 kan

Merge conflicts for GCC 3.4.4.


# 132733 28-Jul-2004 kan

Merge FreeBSD modifications into gcc 3.4.2-prerelease:
1.{2,15} FREEBSD_NATIVE.
1.21 "GCC_OPTIONS".
1.{16,25,27} Cross-compiling issues.
1.38 Correct priority for GCC_EXEC_PREFIX.


# 122632 13-Nov-2003 kan

Use correct priority parameter value in add_prefix from corresponding
enum instead of passing literal 0. This fixes gcc invocations with
GCC_EXEC_PREFIX environment set.

Submitted By: Geoff Morrison
PR: gnu/53476


# 122197 07-Nov-2003 kan

Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.21 ("GCC_OPTIONS"); 1.{16,25,27}
(cross compiling issues).


# 117413 11-Jul-2003 kan

Merge FreeBSD modifications into gcc 3.3.1-prerelease:
1.{2,15} FREEBSD_NATIVE.
1.21 "GCC_OPTIONS".
1.{16,25,27} Cross-compiling issues.


# 110626 10-Feb-2003 kan

Merge FreeBSD modifications into gcc 3.2.2 release:
1.{2,15} FREEBSD_NATIVE.
1.21 "GCC_OPTIONS".
1.{16,25,27} Cross-compiling issues.


# 110024 29-Jan-2003 obrien

main() changed its argv declaration, so follow suit in some FBSD added code.


# 107594 04-Dec-2002 obrien

Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.21 ("GCC_OPTIONS"); 1.{16,25,27}
(cross compiling issues) into GCC 3.2.1 release.

Note revs 1.{5,13} (ELF and objformat support) are OBE with the a.out dike-out.


# 107286 26-Nov-2002 obrien

Remove our custom mixed ELF/a.out support. This means the base compiler
now only produce ELF objects. It also makes us closer to stock GCC, and
simplifies the set of changes we still need from stock GCC on every import.

Applauded by: peter
Approved by: re


# 104953 11-Oct-2002 obrien

ELF low-level toolchain bits now live in /usr/bin, not /usr/libexec/elf.


# 104763 10-Oct-2002 kan

Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.\\{2,15\\} FREEBSD_NATIVE
1.\\{5,13\\} ELF, and objformat support
1.\\{16,23,25\\} Better cross building control
1.21 'GCC_OPTIONS'
1.27 cross-arch MD_EXEC_PREFIX fixes
cc -print-search-dir fixes
1.28 Read specs from /usr/libdata/gcc/specs, if available

Approved by: obrien


# 102795 01-Sep-2002 kan

Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.\{2,15\} FREEBSD_NATIVE
1.\{5,13\} ELF, and objformat support
1.\{16,23,25\} Better cross building control
1.21 'GCC_OPTIONS'
1.27 cross-arch MD_EXEC_PREFIX fixes
cc -print-search-dir fixes
1.28 Read specs from /usr/libdata/gcc/specs,
if available

Approved by: obrien


# 97902 05-Jun-2002 obrien

Read specs from /usr/libdata/gcc/specs if it exists.


# 96736 16-May-2002 ru

MD_EXEC_PREFIX doesn't work for the cross-arch compiler.
The change also makes the `cc -print-search-dirs' output
sane (the pre-3.1 way) in the non-cross case.

Draft reviewed by: obrien


# 96285 09-May-2002 obrien

Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.{5,13} (ELF, and objformat support);
1.{16,23,25} (better cross building control); 1.21 ("GCC_OPTIONS")
into the GCC 3.1 prerelease.


# 91651 04-Mar-2002 obrien

Allow for better control over the GCC front-end when building a cross
compiler.

* Undo the diking out of cross compiler logic from gcc.c rev 1.16.
* Add the `CROSS_STARTFILE_PREFIX' knob.
* Add our own definition of `STANDARD_INCLUDE_DIR'. This should have been
included in freebsd-native.h rev 1.5.


# 91579 03-Mar-2002 obrien

Actually the rev 1.23 change also affects BINUTIL bits.
(my reading of the code was correct... now someone _please_ tell me why
they bother setting the "component" in the paths prefixes...)


# 91578 03-Mar-2002 obrien

Allow one to specify a STANDARD_EXEC_PREFIX for GCC (but not BINUTILS) bits.


# 91561 02-Mar-2002 obrien

Better granularity of the FREEBSD_NATIVE #ifdef's.


# 90277 06-Feb-2002 obrien

Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.{5,13} (ELF, and objformat support);
1.16 (allow specification of TOOLS_PREFIX); 1.21 ("GCC_OPTIONS")
into GCC 3.1-snap.

Note that rev 1.20 was fixed in the stock GCC 3 sources.


# 77389 29-May-2001 obrien

Support the environmental var "GCC_OPTIONS". Which can hold a set of
default options for GCC. These options are interpreted first and can be
overwritten by explicit command line parameters. This provides one way of
adding [temporary] options to your world build w/o editing /etc/make.conf.


# 72564 17-Feb-2001 obrien

Merge gcc-2.95.3-test3 changes onto mainline. Bump FreeBSD cc version.


# 70639 03-Jan-2001 obrien

Merge gcc.2.95.3-test1 changes onto mainline


# 57849 09-Mar-2000 obrien

Merge conflicts.


# 55220 29-Dec-1999 obrien

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)


# 54990 22-Dec-1999 obrien

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/


# 54778 18-Dec-1999 obrien

Provide complete coverage in switch statement to quiet -Wall.


# 53878 29-Nov-1999 obrien

* 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)


# 52840 03-Nov-1999 obrien

Structure field name changed.


# 52520 26-Oct-1999 obrien

Merge the FREEBSD_NATIVE and ELF/a.out support into GCC 2.95.1.


# 51232 13-Sep-1999 bde

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.


# 50599 29-Aug-1999 obrien

This brings rev 1.2 (FREEBSD_NATIVE) and rev 1.5 (mixed ELF/aout support)
into EGCS 1.1.2.


# 42719 16-Jan-1999 peter

a.out is default


# 38657 30-Aug-1998 jb

Change /etc/objectformat to /etc/objformat. Last chance 'cause it's E-day.

Suggested by: jdp


# 34356 09-Mar-1998 peter

Only do a.out/elf switching on i386 family


# 34229 08-Mar-1998 peter

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


# 25128 25-Apr-1997 peter

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


# 22994 22-Feb-1997 peter

check for /usr/libdata/gcc/specs and use it if it exists.


# 18346 18-Sep-1996 peter

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.


# 18335 18-Sep-1996 peter

This commit was generated by cvs2svn to compensate for changes in r18334,
which included commits to RCS files with non-trunk default branches.


# 18334 18-Sep-1996 peter

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.