Fix this port so that it can find crt0.o in /usr/lib/aout on recent
-current systems. Fix the definition of the preprocessor symbol __FreeBSD__. It had been defined as "2=3". Implement support for weak symbols. This solves the "___error" undefined problem on -current systems. Default to -fsjlj-exceptions even for C programs. This is needed because a few modules in libgcc are built with -fexceptions turned on, and the default style of exception support causes croakage. I tried a make buildworld on a recent -current system by adding the following to /etc/make.conf: CC=/usr/local/bin/gcc28 -B/usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/2.8.1/ CXX=/usr/local/bin/g++28 -B/usr/local/lib/gcc-lib/i386-unknown-freebsd3.0/2.8.1/ It got pretty far along before dying. The death occurred when building our old native libstdc++, almost certainly because of header file incompatibilities. Another obstacle for make world is that this port doesn't currently build a PIC version of libgcc (libgcc_pic.a).
This commit is contained in:
parent
ea465d63d9
commit
2c8f4253cc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=11633
@ -4,7 +4,7 @@
|
||||
# Date created: 17 Jan 1998
|
||||
# Whom: David O'Brien <obrien@NUXI.com>
|
||||
#
|
||||
# $Id: Makefile,v 1.9 1998/06/06 04:42:31 asami Exp $
|
||||
# $Id: Makefile,v 1.10 1998/06/10 20:16:08 asami Exp $
|
||||
#
|
||||
|
||||
DISTNAME= gcc-2.8.1
|
||||
@ -30,10 +30,10 @@ post-patch:
|
||||
@(cd ${WRKSRC}/config/i386/ ; \
|
||||
MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
|
||||
${MV} freebsd.h freebsd.h.in ; \
|
||||
${SED} -e "s:__FreeBSD__:__FreeBSD__=$${MAJ}:" freebsd.h.in \
|
||||
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
|
||||
>freebsd.h ; \
|
||||
${MV} freebsd-elf.h freebsd-elf.h.in ; \
|
||||
${SED} -e "s:__FreeBSD__:__FreeBSD__=$${MAJ}:" freebsd-elf.h.in \
|
||||
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd-elf.h.in \
|
||||
>freebsd-elf.h)
|
||||
|
||||
pre-install:
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- config/i386/freebsd.h.orig Sun Oct 19 09:31:05 1997
|
||||
+++ config/i386/freebsd.h Thu May 21 14:10:11 1998
|
||||
@@ -35,10 +35,19 @@
|
||||
+++ config/i386/freebsd.h Tue Jun 30 13:44:27 1998
|
||||
@@ -35,10 +35,24 @@
|
||||
#include "i386/perform.h"
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
@ -15,6 +15,11 @@
|
||||
+#error "CC1PLUS_SPEC needs ``-fsjlj-exceptions'', but is already defined."
|
||||
+#endif
|
||||
+#define CC1PLUS_SPEC "-fsjlj-exceptions"
|
||||
+
|
||||
+/* We also need "-fsjlj-exceptions" for CC1, because exceptions are
|
||||
+ enabled when building portions of libgcc. */
|
||||
+#undef CC1_SPEC
|
||||
+#define CC1_SPEC "-fsjlj-exceptions %(cc1_spec) "
|
||||
|
||||
/* Like the default, except no -lg. */
|
||||
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
|
||||
@ -22,7 +27,28 @@
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
@@ -215,7 +224,15 @@
|
||||
@@ -114,6 +128,7 @@
|
||||
|
||||
#define TYPE_ASM_OP ".type"
|
||||
#define SIZE_ASM_OP ".size"
|
||||
+#define SET_ASM_OP ".set"
|
||||
|
||||
/* The following macro defines the format used to output the second
|
||||
operand of the .type assembler directive. Different svr4 assemblers
|
||||
@@ -123,6 +138,12 @@
|
||||
|
||||
#define TYPE_OPERAND_FMT "@%s"
|
||||
|
||||
+#define HANDLE_SYSV_PRAGMA 1
|
||||
+
|
||||
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
|
||||
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
|
||||
+ fputc ('\n', FILE); } while (0)
|
||||
+
|
||||
/* Write the extra assembler code needed to declare a function's result.
|
||||
Most svr4 assemblers don't require any special declaration of the
|
||||
result value, but there are exceptions. */
|
||||
@@ -215,7 +236,17 @@
|
||||
|
||||
#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k}"
|
||||
#define LINK_SPEC \
|
||||
@ -36,6 +62,8 @@
|
||||
+#define STARTFILE_SPEC \
|
||||
+ "%{shared:c++rt0.o%s} \
|
||||
+ %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
|
||||
+
|
||||
+#define MD_STARTFILE_PREFIX "/usr/lib/aout/"
|
||||
|
||||
/* This is defined when gcc is compiled in the BSD-directory-tree, and must
|
||||
* make up for the gap to all the stuff done in the GNU-makefiles.
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
-#define CPP_PREDEFINES "-Dunix -D__ELF__ -D__FreeBSD__=2 -Asystem(FreeBSD)"
|
||||
+#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(FreeBSD) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
|
||||
+#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__=2 -Asystem(FreeBSD) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
|
||||
|
Loading…
Reference in New Issue
Block a user