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
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.
Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
cc1plus can apparently be built if you happen to have
/usr/bin/gperf, or set CXX to point to a C++ compiler
that can build gperf(1) in the bootstrap-tools stage
of buildworld.
The problem is the GCC driver now turns STANDARD_EXEC_PREFIX into a relative
path -- "<basename argv[0]>/../../libexec" for our normal install location.
However, in the middle of `buildworld' we need
"<basename argv[0]>/../../../../libexec" due to the prefix we tell the GCC
driver. But either the GCC driver is buggy, or we are confusing it, as it
tries to exec "<basename argv[0]>/../../libexec/cpp0" as if it were installed
in the normal place (but isn't).
MD_EXEC_PREFIX is still absolute, so I'll use that for now. I would like to
later make it so MD_EXEC_PREFIX is set only for `buildworld', as
MD_EXEC_PREFIX is also in the search path for libraries. Don't ask me why!
Another way is to add ${OBJFORMAT_PATH} (as set in CROSSENV) to the PATH
in src/Makefile.inc's WMAKEENV.
bits. Also remove comment about keeping in sync with other instances in
the source tree -- it was too easy to get out of sync, so the other
instances now use this instance.
collect2 was added based on the need of -frepo. However, -frepo is currently
broken on -CURRENT (Gcc 2.95.4 20020320 [FreeBSD] / ld 2.12.0 [FreeBSD]
2002-04-10). It is also broken on RELENG_4 (Gcc 2.95.3 20010315 / ld
2.11.2 20010719), so there is no need to MFC collect2 there yet. I have
a feeling the brokeness is due to the wide difference between the libiberty
bits of Gcc 2.95 and the later ld.
Testing by: fjoe
about 'STANDARD_EXEC_PREFIX'. It is used now and is needed if one does not
set 'MD_EXEC_PREFIX'.
Do not define a 'MD_EXEC_PREFIX'. It is not needed, not used in the
cross case, and just ends up causing "/usr/libexec" being added to the
library search path.
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.
I am committing this here rather than in gcc/config/freebsd.h because the
profiled libgcc only exists with the native system compiler. It is not
created by a stock FSF build and we will never be able to get these bits
committed to the FSF CVS repo. Thus this is very much a FreeBSD "native"
issue.
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.
* Minimize a little bit more, things we dike out in the FREEBSD_NATIVE case.
Submitted by: ru & obrien
cross case, and just ends up causing "/usr/libexec" being added to the
library search path.
Also remove misleading comment about 'STANDARD_EXEC_PREFIX'. It is needed
if one does not set 'MD_EXEC_PREFIX'.
Submitted by: ru
It is here in case we decide we want the directory to match the binary name
since neither the binary nor the source file(s) are named 'cccp' any longer.
Really irritating changes are the "forced" layering of malloc + friends
in order to use the GNU versions. Sorry, we have a *very* fine malloc,
and we will use it. Period. Even more irritating is that the GNU people
now want to replace ctype also!! So we partially dike it out here.
We now have to use the GCC stdarg.h varargs.h. We simply have no choice
as it has an internal representation that we really cannot properly define
in our headers.
This thing grew. We now have to link with many more files as if it
were one of the driver programs. We also have to deal with the very
irritating layering of malloc and friends. Our malloc works *very*
well thank you. Thus we will use it.
"build-tools". If we do not do this, the "depend" stage of
"buildworld" will build ``.depend'' and it will record the wrong
library and header dependencies (DESTDIR=${WORLDTMP}). Even worse,
the "all" stage may clobber build-architecture-format build tools
built in the "build-tools" stage with target-architecture-format ones.
Submitted by: ru
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.
of stuff (and thus length of error output) we put on the invocation command
line. Also follow the new FSF/GNU style of giving the symbol a value so it
can be used in `if()' statements in addition to `#if' so seldomly compiled
in code (on some platforms) gets compiled always, to help reduce bit-rot.
non-threaded programs. This provides threaded programs with the
needed exception frame symbols.
parts submitted by: Max Khon <fjoe@iclub.nsu.ru>
PR: 23252
LinuxThreads port. Dike it out as it was removed from freebsd.h on
19-July-2000 as 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.
Requested by: jasone
where it is used. c-decl has symbols that conflict with several of the
cc1plus sources.
GNU `ld' was changed in Dec 1999 to be more be compatable with the way that
other linkers work (specifically in the Solaris linker). The 2.9.1 `ld',
did the Wrong Thing in that if a library contained a common symbol that
matched a definition of that symbol in another (already linked in object)
it would also be linked in, even if there was no other reason to do so.
This is wrong. The library should only be linked in if it contains
non-common, non-weak symbols which are needed by previously linked in
objects.
in rev.1.44 (the egcs to gcc switch). The problem is that print-rtl.o
is now needed to build some tools, but it wasn't added to the list of
objects which are specially handled because they are prerequisites for
tools."
Submitted by: bde
build-tools target and by the actual target. In a cross-building situation
proj.o is both a native object and a cross-object (i.e., for the target
arch) and thus doesn't work. Creating seperate opjects from the same
source file solves this...
This patch may also fix the following issue:
> it looks like -DNOCLEAN doesn't work too well.
> cd /usr/src/gnu/usr.bin/cc/f771; make build-tools
> make: don't know how to make /usr/obj/usr/src/i386/usr/include/stdarg.h. Stop
This seems caused by wrong dependency information. Dependency
information shouldn't be created for build-tools sources.
Submitted by: marcel
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/
anymore as building -CURRENT sources on 3-STABLE was the reason for the
previous revision adding this.
Note that since the GCC Project moved mkstemp.c from GCC's world to
libiberty, we no longer support building -CURRENT sources on non-FreeBSD
boxes unless that box has a very simular libc mix as FreeBSD.
__FreeBSD_version < 400004.
This allows -STABLE to build -CURRENT sources.
[mkstemps() was added to -current just before the version bump to 400004
(a matter of hours in this case), so the test is as exact as possible.]
Submitted by: marcel
When I imported EGCS into contrib/egcs/ I failed to prune out
egcs/gcc/cp/hash.h which is generated from gxx.gperf. Thus `cc1plus' wasn't
using the hash.h we generated by cc/cc_tools/Makefile, but rather the one in
egcs/gcc/cp/.
When I imported contrib/gcc/ I did prune gcc/cp/hash.h. Unfortunately the
GCC maintainers weren't smart on their file nameing and there is also a
egcs/gcc/hash.h (name overloading does NOT work as well on the filesystem
as in C++...). Due to the -I ordering we are were then picking up gcc/hash.h
when compiling `cc1plus'.
Configuration header inclusion has been moved around to reduce diffs from
the offical GCC distribution. We now generate the same ``tm.h'' produced by
gcc's `configure' script [minus all the "#ifdef IN_GCC"'s].
Jeff Law of EGCS/Cygus says the new "approved" way of doing configure-related
includes is to list them all in ``tm.h'' rather than having the architure
config headers include large numbers of other configure headers.
was installed in /usr/bin normally got clobbered when objformat
was installed. Indirection through objformat is correct although
underscore handling is the only thing that differs for aout and
elf -- going through objformat is the easiest way to set c++filt's
underscore handling flag correctly.
code still applies, but the code attached to it had rotted:
# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
# Prevent mkdep from using it, so that we don't have to give rules for
# aliases of generated headers.
Many other makefiles seem to have the same bug (i.e., spelling "." as
"${.OBJDIR}" or as an even more complicated alias in -I directives).
The previous commit made things worse by breaking the -j0 case and
moving around the breakage for the -jN case. The fix involves
restoring .ORDER statements that were deleted in the previous commit,
removing wrong special handling of tree-check.h, and rewriting the
generation of fudged dependencies based on an idea I got from the
previous commit (filter out problematic objects first).