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.
The changes from GCC 2.95.3 to 3.1 are large and it is hard to figure
out how to apply our changes. Once BDE can properly test GCC 3.1 he'll
add back in our changes.
Until we can figure out how to reimpliment our custom format warnings
since the FSF developers totally revamped them, and took away the hooks
we were using to accomplish our desires.
Note that the "NO_PROFILE_DATA"/"NO_PROFILE_COUNTERS" bits were added
to the stock FSF GCC 2.97 (and thus 3.1) source as i386 Linux needed them
also. (amazing what can get committed to the FSF GCC when needed by Linux...)
Remove our definition for FUNCTION_PROFILER as it is wrong.
Note that "jsr $28,_mcount" is a macro for
ldq $27, _mcount($29) !literal!1
jsr $28, ($27), _mcount !lituse_jsr!1
1. The call to _mcount is added by alpha_expand_prologue after we load the gp.
Our _mcount uses $27 for the incoming address, unlike OSF/1 and Linux,
which use $28. This probably doesn't matter since we probably don't use $27
within _mcount itself.
2. You can't use this insn with _mcount because it uses the PLT, which clobbers
the return address in $28. Note that the prologue_mcount pattern carefully
avoids adding the lituse_jsr relocation so that we call through the GOT
directly.
Submitted by: Richard Henderson <rth@redhat.com>
When rtld runs the .fini section in a shared lib (C++), the code in
question from .../contrib/gdb/config/alpha/crtbegin.asm first calls
__do_globals_dtors_aux and then __do_frame_takedown. Unfortunately, the
value of gp after a jsr is undefined and in this case had changed from before
the call, probably as a result of calling code in some other shared library.
The normal calling convention for alpha is to re-initialize gp using
'ldgp gp,0(ra)' after a jsr instruction but in this case no such
re-initialization is done. This leads to a bogus value being read for the
address of __do_frame_takedown and a quick segfault.
Submitted by: dfr
Obtained from: GCC 3.0
value, it forces GCC to not optimize above this level. For intance, GCC
made with "WANT_FORCE_OPTIMIZATION_DOWNGRADE=1" is a good setting for the
Alpha platform when building ports.
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.
If "WANT_DWARF2_UNWIND" you get it. Note that this is a different C++ ABI
than the FreeBSD default. So you will need to recompile all your C++ apps
that uses exceptions if you turn this on. I am adding it here for Yahoo!'s
use and for those that want to be early adopters to what I will make as the
default with the GCC 3.0 import.
that were removed from GCC 2.95.3.test4 and the subsequent release due
to problems on HP-UX. However, they work just fine on all the BSD's.
W/o these patches the following program segmentation faults if compiled
with -O2 (but not -Os or -O or -O0):
#include <stdio.h>
class A {
public:
A() { printf("c'tor A\n"); }
~A(){ printf("d'tor A\n"); }
};
class foo : public A {
public:
foo() { printf("C'tor foo\n"); throw 8; }
~foo() { printf("D'tor foo\n"); }
};
int main(){
try { foo fii; }
catch (int){ printf("catch ...\n"); }
return 0;
}
header to reduce the difference of our sources to the stock GNU/FSF ones.
While the mix binary format support was nice to have in the FreeBSD MI
header as a frame work, it just clutters up too much and makes the FreeBSD
MI header more different from the FSF/GNU stock one than it needs to be.