summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config
Commit message (Collapse)AuthorAgeFilesLines
* Per request from ache, change the numbering scheme of __FreeBSD_cc_version.jdp1998-10-292-2/+2
| | | | | Its form is now like __FreeBSD_version, with the FreeBSD revision in the top digits.
* Add a new predefined preprocessor symbol "__FreeBSD_cc_version",jdp1998-10-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Make profiling work for ELF. gprof now autodetects the format ofjdp1998-09-072-8/+14
| | | | | | | | | | | 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.
* Fixed printf format errors. gcc should have a macro HOST_PTR_PRINTF_TYPEbde1998-08-021-2/+2
| | | | | to go with its HOST_PTR_PRINTF[_FORMAT], since if %p is wrong for the format then `void *' is probably wrong for the type.
* Fixed printf format errors.bde1998-06-302-4/+5
|
* Add LIB_SPEC (same as on i386) so that gcc knows about libc_r.jb1998-06-081-0/+4
|
* -pg was causing a link with -lc_r... :-]peter1998-04-132-2/+2
| | | | | Submitted by: Dmitry Khrustalev <dima@xyzzy.machaon.ru> PR: 6287
* Ouch, my local cvs walloped the version I thought I was committing.jb1998-03-141-18/+52
| | | | Here is what I intended.
* On i386, freebsd.h and freebsd-elf.h have been merged to combinejb1998-03-131-71/+0
| | | | | | | | 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.
* Nuke crti.o from the STARTFILE_SPEC again. No asm code is needed on alpha.jb1998-03-111-1/+8
| | | | | Add the define that lets gas know how to ".set" and enable pragmas so that #pragma weak will work.
* Change the LINK_SPEC to specify the same runtime loader as used onjb1998-03-101-12/+6
| | | | | | | | | | | | | | | | | | | 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.
* Both our a.out (hacked) gas and the binutils gas support .weakpeter1998-03-092-4/+0
| | | | Prompted by: bde
* Don't disable the use of $ in assembler labels.. It changes libstdc++peter1998-03-092-0/+6
| | | | | and libg++ so that they won't work with existing binaries (including netscape!!).
* Spell -Bshareable correctly... :-]peter1998-03-082-2/+2
|
* svr4.h defines ASM_IDENTIFY_GCC, but neglects to definepeter1998-03-082-0/+20
| | | | | 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.
* Cosmetic cleanup for a.out asm generation.. Don't put the end-of-filepeter1998-03-082-6/+20
| | | | markers that the stabs-in-elf system uses.
* Put the function stabs in traditional order on a.out, or gdb doesn't seepeter1998-03-082-12/+12
| | | | function local variables.
* Add hooks for John Birrell's kernel thread support library.peter1998-03-082-2/+2
| | | | Submitted by: John Birrell <jb@cimlogic.com.au>
* First round of changes to support generation of assembler for the oldpeter1998-03-083-691/+926
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Upgrade the cpp pre-defines to include -Dunix. Turns out we need thatjb1998-01-121-1/+1
| | | | | | | to compile m4. And don't just define __FreeBSD__, but define it as -D__FreeBSD__=3 like on i386.
* Add the alpha MD files for gcc to product ELF for FreeBSD/Alpha.jb1998-01-1114-0/+8479
| | | | | | | | | | | | | | | 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.
* Merge in some of my changes with John's. I've used this to buildpeter1997-08-291-32/+50
| | | | | an ELF system. I'm not sure about some of the things here. We definately need to go back and rationalize this.
* Add the necessary defines to the freebsd-elf configuration so thatjdp1997-08-281-1/+39
| | | | | | | | | | | 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.
* The -pthread option was added to freebsd.h but missed from freebsd-elf.hpeter1997-05-121-1/+1
|
* Let gcc know about libc_r. Use -pthread to link against libc_r insteadjb1997-05-032-2/+2
| | | | of libc.
* Make "gcc -shared" work properly for building shared libraries. Anjdp1997-04-092-8/+14
| | | | | | up-to-date version of c++rt0.o is necessary for this to work right. Closes PR gnu/3035: gcc -shared flag is broken.
* Disallow "-p" when linking, with a diagnostic that recommends usingjdp1997-04-052-10/+12
| | | | | | | | | "-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.
* Update the value of "__FreeBSD__" to 3 for the ELF compiler.jdp1997-03-261-1/+1
|
* -current is now 3.0. NOT a 2.2 candidate. :)asami1997-03-252-2/+2
|
* Undo rev 1.4 of freebsd.h and 1.2 freebsd-elf.h, where I addedobrien1997-02-243-3/+3
| | | | | _BSD4_4 as a predefined symbol. People on the lists generally didn't care for it.
* Add _BSD4_4 as a predefined symbol.obrien1997-02-163-3/+3
| | | | | | | Peter Dufault (dufault@hda.com) suggested this is the most approate symbol to use. 2.2-R candidate.
* Apparently this patch fixes the objc backend on the i386 platforms.peter1996-10-261-0/+7
| | | | | | | 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.
* Fix a bug that caused incorrect PIC code to be generated for exceptions.jdp1996-10-031-0/+16
| | | | | | | | | | | | | | | | | | 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.
* Activate the .weak code generation for libgcc.a and g++ now that it works.peter1996-10-012-14/+2
|
* Merge in freebsd-specific changespeter1996-09-185-112/+237
|
* Add in hooks to produce assembler output suitable for binutils+elfpeter1996-09-181-0/+199
| | | | Obtained from: John Polstra <jdp@freebsd.org>, from his elfkit.
* Import of 2.7.2.1 into vendor branchpeter1996-09-183-15/+11
|
* Import of unmodified (but trimmed) gcc-2.7.2. The bigger parts of thepeter1996-09-18128-0/+22242
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.
OpenPOWER on IntegriCloud