aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/gcc.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove contrib/gcc and contrib/gcclibsEd Maste2020-02-291-7950/+0
| | | | | | | | | GCC 4.2.1 was disconnected from FreeBSD in r358454. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358459
* GCC: Add a new option "-fstack-protector-strong"Pedro F. Giffuni2015-07-301-1/+1
| | | | | | | | | | | | | This includes additional functions to be protected: those that have local array definitions, or have references to local frame addresses. This is a new option in GCC-4.9 that was relicensed by Han Shen from Google under GPLv2 for OpenBSD. Obtained from: OpenBSD (2014-01-14) MFC after: 2 weeks Notes: svn path=/head/; revision=286074
* gcc: clean some warnings from -Wformat-securityPedro F. Giffuni2013-12-201-2/+2
| | | | | | | | Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) MFC after: 1 week Notes: svn path=/head/; revision=259666
* gcc: another round of merges from the gcc pre-43 branch.Pedro F. Giffuni2013-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Bring The following revisions from the gcc43 branch[1]: 118360, 118361, 118363, 118576, 119820, 123906, 125246, and 125721. They all have in common that the were merged long ago into Apple's gcc and should help improve the general quality of the compiler and make it easier to bring new features from Apple's gcc42. For details please review the additions to the files: gcc/ChangeLog.gcc43 gcc/cp/ChangeLog.gcc43 (new, adds previous revisions) Reference: [1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700 Obtained from: gcc pre4.3 (GPLv2) branch MFC after: 3 weeks Notes: svn path=/head/; revision=258428
* Implement -print-file-name=include (which is undocumentedTim Kientzle2012-02-101-0/+11
| | | | | | | | | | | | | | | but used by some Linux boot loaders). This option prints out the directory holding the include files needed by a freestanding program. The default implementation of this doesn't work on FreeBSD because of the different include file layout. But it's easy to implement: just return /usr/include (or the cross-compiling equivalent). Reviewed by: kan MFC after: 1 week Notes: svn path=/head/; revision=231336
* Disable shared libgcc use for profiled builds. GNU linker pulls symbolsAlexander Kabaev2007-05-281-2/+3
| | | | | | | | out of libgcc_s.so.1 somehow and fails to record DT_NEEED dependency when linking with profiled libraries despite --ld-as-needed option. Notes: svn path=/head/; revision=170077
* Merge local FreeBSD changes.Alexander Kabaev2007-05-191-835/+1298
| | | | Notes: svn path=/head/; revision=169704
* Resolve conflicts after GCC 3.4.6 20060825 import.Alexander Kabaev2006-08-261-1/+3
| | | | Notes: svn path=/head/; revision=161660
* Merge conflicts for GCC 3.4.4.Alexander Kabaev2005-06-031-5/+13
| | | | Notes: svn path=/head/; revision=146908
* Merge FreeBSD modifications into gcc 3.4.2-prerelease:Alexander Kabaev2004-07-281-1002/+1126
| | | | | | | | | | 1.{2,15} FREEBSD_NATIVE. 1.21 "GCC_OPTIONS". 1.{16,25,27} Cross-compiling issues. 1.38 Correct priority for GCC_EXEC_PREFIX. Notes: svn path=/head/; revision=132733
* Use correct priority parameter value in add_prefix from correspondingAlexander Kabaev2003-11-131-1/+1
| | | | | | | | | | | enum instead of passing literal 0. This fixes gcc invocations with GCC_EXEC_PREFIX environment set. Submitted By: Geoff Morrison PR: gnu/53476 Notes: svn path=/head/; revision=122632
* Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.21 ("GCC_OPTIONS"); 1.{16,25,27}Alexander Kabaev2003-11-071-0/+3
| | | | | | | (cross compiling issues). Notes: svn path=/head/; revision=122197
* Merge FreeBSD modifications into gcc 3.3.1-prerelease:Alexander Kabaev2003-07-111-437/+533
| | | | | | | | | 1.{2,15} FREEBSD_NATIVE. 1.21 "GCC_OPTIONS". 1.{16,25,27} Cross-compiling issues. Notes: svn path=/head/; revision=117413
* Merge FreeBSD modifications into gcc 3.2.2 release:Alexander Kabaev2003-02-101-2/+3
| | | | | | | | | 1.{2,15} FREEBSD_NATIVE. 1.21 "GCC_OPTIONS". 1.{16,25,27} Cross-compiling issues. Notes: svn path=/head/; revision=110626
* main() changed its argv declaration, so follow suit in some FBSD added code.David E. O'Brien2003-01-291-2/+2
| | | | Notes: svn path=/head/; revision=110024
* Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.21 ("GCC_OPTIONS"); 1.{16,25,27}David E. O'Brien2002-12-041-3/+6
| | | | | | | | | (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. Notes: svn path=/head/; revision=107594
* Remove our custom mixed ELF/a.out support. This means the base compilerDavid E. O'Brien2002-11-261-55/+0
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=107286
* ELF low-level toolchain bits now live in /usr/bin, not /usr/libexec/elf.David E. O'Brien2002-10-121-1/+1
| | | | Notes: svn path=/head/; revision=104953
* Merge FreeBSD modifications into gcc 3.2.1-prerelease:Alexander Kabaev2002-10-101-94/+282
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=104763
* Merge FreeBSD modifications into gcc 3.2.1-prerelease:Alexander Kabaev2002-09-011-1/+1
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=102795
* Read specs from /usr/libdata/gcc/specs if it exists.David E. O'Brien2002-06-061-2/+2
| | | | Notes: svn path=/head/; revision=97902
* MD_EXEC_PREFIX doesn't work for the cross-arch compiler.Ruslan Ermilov2002-05-161-1/+7
| | | | | | | | | | 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 Notes: svn path=/head/; revision=96736
* Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.{5,13} (ELF, and objformat support);David E. O'Brien2002-05-091-62/+47
| | | | | | | | 1.{16,23,25} (better cross building control); 1.21 ("GCC_OPTIONS") into the GCC 3.1 prerelease. Notes: svn path=/head/; revision=96285
* Allow for better control over the GCC front-end when building a crossDavid E. O'Brien2002-03-051-1/+5
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=91651
* Allow one to specify a STANDARD_EXEC_PREFIX for GCC (but not BINUTILS) bits.David E. O'Brien2002-03-031-1/+3
| | | | Notes: svn path=/head/; revision=91578
* Better granularity of the FREEBSD_NATIVE #ifdef's.David E. O'Brien2002-03-021-6/+7
| | | | Notes: svn path=/head/; revision=91561
* Merge revs 1.{2,15} (FREEBSD_NATIVE); 1.{5,13} (ELF, and objformat support);David E. O'Brien2002-02-061-1483/+2634
| | | | | | | | | | 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. Notes: svn path=/head/; revision=90277
* Support the environmental var "GCC_OPTIONS". Which can hold a set ofDavid E. O'Brien2001-05-291-0/+52
| | | | | | | | | 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. Notes: svn path=/head/; revision=77389
* Merge gcc-2.95.3-test3 changes onto mainline. Bump FreeBSD cc version.David E. O'Brien2001-02-171-1/+2
| | | | Notes: svn path=/head/; revision=72564
* Merge gcc.2.95.3-test1 changes onto mainlineDavid E. O'Brien2001-01-031-5/+5
| | | | Notes: svn path=/head/; revision=70639
* Merge conflicts.David E. O'Brien2000-03-091-2/+2
| | | | Notes: svn path=/head/; revision=57849
* Allow the specification of a prefix for gcc to find all the various bits.David E. O'Brien1999-12-291-3/+3
| | | | | | | | | | 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) Notes: svn path=/head/; revision=55220
* Reduce the FreeBSD custom hacks to gcc.c by using the GCC provided methodsDavid E. O'Brien1999-12-221-6/+0
| | | | | | | | | | | | | | | | | | | 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/ Notes: svn path=/head/; revision=54990
* Provide complete coverage in switch statement to quiet -Wall.David E. O'Brien1999-12-181-0/+4
| | | | Notes: svn path=/head/; revision=54778
* * Use getobjformat() rather than manually do what it does.David E. O'Brien1999-11-291-71/+43
| | | | | | | | | | | * 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) Notes: svn path=/head/; revision=53878
* Structure field name changed.David E. O'Brien1999-11-031-1/+1
| | | | Notes: svn path=/head/; revision=52840
* Merge the FREEBSD_NATIVE and ELF/a.out support into GCC 2.95.1.David E. O'Brien1999-10-261-528/+520
| | | | Notes: svn path=/head/; revision=52520
* Merge from ../egcs/gcc/gcc.c rev.1.5:Bruce Evans1999-09-131-0/+4
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=51232
* This brings rev 1.2 (FREEBSD_NATIVE) and rev 1.5 (mixed ELF/aout support)David E. O'Brien1999-08-291-1148/+1739
| | | | | | | into EGCS 1.1.2. Notes: svn path=/head/; revision=50599
* a.out is defaultPeter Wemm1999-01-161-4/+0
| | | | Notes: svn path=/head/; revision=42719
* Change /etc/objectformat to /etc/objformat. Last chance 'cause it's E-day.John Birrell1998-08-301-3/+3
| | | | | | | Suggested by: jdp Notes: svn path=/head/; revision=38657
* Only do a.out/elf switching on i386 familyPeter Wemm1998-03-091-6/+8
| | | | Notes: svn path=/head/; revision=34356
* First round of changes to support generation of assembler for the oldPeter Wemm1998-03-081-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=34229
* correct vfork()/exit() to vfork()/_exit(). This is far more importantPeter Wemm1997-04-251-1/+1
| | | | | | | | | now that vfork() actually works in FreeBSD for the first time. Spotted by: se Notes: svn path=/head/; revision=25128
* check for /usr/libdata/gcc/specs and use it if it exists.Peter Wemm1997-02-221-0/+1
| | | | Notes: svn path=/head/; revision=22994
* When running native on freebsd (ie: in /usr/bin, /usr/libexec, not thePeter Wemm1996-09-181-3/+18
| | | | | | | | | | 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. Notes: svn path=/head/; revision=18346
* Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of thePeter Wemm1996-09-181-0/+5254
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. Notes: svn path=/vendor/gcc/dist/; revision=18334