linked in addition to libc rather than instead of libc.
Ideally, "-pthread" would now be equivalent to adding "-lc_r" to the
end of the link command. But it is slightly different in this
implementation. Adding "-lc_r" to the link command would produce a
"ld" command line containing this:
... -lc_r /usr/lib/libgcc.a -lc /usr/lib/libgcc.a ...
but this implementation of the "-pthread" option produces this:
... /usr/lib/libgcc.a -lc_r -lc /usr/lib/libgcc.a ...
It would be possible to make them identical, but that doesn't fit
as nicely into GCC's way of doing things. I don't think the ordering
change will make any difference in practice.
This option depended on bits not part of the base system and required
people to install the LinuxThreads port in a manner non-consistent with
the workings of our Ports Collection.
The directions for properly linking with LinuxThreads are given by that
port at install time.
Requested by: jasone
before importing new versions of GCC. This differs from FREEBSD-Xlist
in that this is for use only with anoncvs checkouts, not tarball'ed
releases [snapshots].
This delete list applies to the 3-June-2000 import.
to generate the special .type and .size directives which are used to set
the corresponding fields of the linker symbol table entries in the ELF
object file. As such they are not i386-specific and thus belong in our
MI header. Otherwise on the Alpha we don't properly give the type and
size of dynamic symbols. Bintuil versions past 2.9.1 warn of this and
w/o this change, `ld' generates a lot of warnings during a `make world'.
I did not catch this on the EGCS 1.1.x --> GCC 2.95 upgrade.
So propogate this change to our custom hacks.
PR: 15549
Submitted by: Naohiko Tsuji <yakisoba@osaka.interq.or.jp>
Patrick Bihan-Faou <patrick@mindstep.com>
"The problem is that egcs/gcc-2.95's reorganisation of the prologue and
epilogue code to use rtl instead of output_asm_insn() completely broke our
hooks. rtl is emitted in a different order, only after optimisation, while
output_asm_insn() is emitted immediately. rtl is presumably used so that
the prologue and epilogue can be optimised.
I couldn't find any good examples to copy. gcc's own
FUNCTION_BLOCK_PROFILER still uses output_asm_insn() and seems to be
completely broken. One of the XXX comments points to this.
IIRC, the hacks here basically arrange to emit magic label names; then when
the magic names are output, they are transformed into prologue and epilogue
code."
Submitted by: bde
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)
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/
* 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)
* Commonalities with i386, moved to a FreeBSD wide config file.
* Major additions to this file were adapted from Hidetoshi Shimokawa
<simokawa@FreeBSD.ORG>'s Alpha suppliment to the Egcs 1.1.2 port.
As of GCC 2.95 these files from libiberty are absolutely required:
ansidecl.h libiberty.h splay-tree.h splay-tree.c
To keep from having to import all of libiberty, they are imported here
for now. Before all is said and done, libiberty might be imported, or
these files might move elsewhere.
As of GCC 2.95 these files:
choose-temp.c demangle.h getopt.h obstack.c pexecute.c
cplus-dem.c getopt.c getopt1.c obstack.h
were removed from the GCC compilers proper to libiberty. To continue our
revision history, and to keep from having to import all of libiberty,
they are imported here as if they were never moved.
* 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
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.
* 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.
* 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.
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.
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
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
- 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
* 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.
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>
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.
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.
* 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)