This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
- To: pfeifer at dbai dot tuwien dot ac dot at, obrien at FreeBSD dot org, egcs-bugs at egcs dot cygnus dot com
- Subject: [PATCH] Re: Current egcs-mainline fails to build on FreeBSD 3.1
- From: Marc Espie <espie at quatramaran dot ens dot fr>
- Date: Thu, 3 Jun 1999 11:38:15 +0200
- Cc: egcs-patches at egcs dot cygnus dot com
- Organization: Ecole Normale Superieure de Paris
In article <Pine.GSO.4.10.9906022147240.17033-100000@markab.dbai.tuwien.ac.at> you write:
>...with the following abort, which remained after another
>`egcs_update -PAd`.
>
>Is it possible that this has been caused by the following patch?
>
>`SWITCH_TAKES_ARG' redefined
to undef
>/usr/libexec/elf/ld: cannot open values-Xa.o: No such file or directory
part of the svr4.h specs, which was previously overridden by linux.h
I don't know much about FreeBSD, but the following patch should be able
to fix the trouble. The SWITCH_TAKES_ARG is a no-brainer, and I've just
copied the linux specs that used to be included `verbatim'.
Thu Jun 3 11:34:34 CEST 1999 Marc Espie <espie@cvs.openbsd.org>
* freebsd-elf.h (SWITCH_TAKES_ARG): Redefine, not define.
(STARTFILE_SPEC): Define, override the svr4.h version.
(ENDFILE_SPEC): Likewise.
--- freebsd-elf.h.orig Thu Jun 3 11:26:09 1999
+++ freebsd-elf.h Thu Jun 3 11:30:22 1999
@@ -180,11 +180,36 @@
-z* options (for the linker) (comming from svr4).
We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
+#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \
|| (CHAR) == 'z' \
|| (CHAR) == 'R')
+
+/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
+ the magical crtbegin.o file (see crtstuff.c) which provides part
+ of the support for getting C++ file-scope static object constructed
+ before entering `main'. */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
+ %{!p:%{profile:gcrt1.o%s} \
+ %{!profile:crt1.o%s}}}} \
+ crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
+ the magical crtend.o file (see crtstuff.c) which provides part of
+ the support for getting C++ file-scope static object constructed
+ before entering `main', followed by a normal "finalizer" file,
+ `crtn.o'. */
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+
#undef LIB_SPEC
#if 1