head	1.9;
access;
symbols
	RELEASE_7_1_0:1.8
	RELEASE_6_4_0:1.8
	RELEASE_5_EOL:1.8
	RELEASE_7_0_0:1.8
	RELEASE_6_3_0:1.8
	PRE_XORG_7:1.8
	RELEASE_4_EOL:1.8
	RELEASE_6_2_0:1.8
	RELEASE_6_1_0:1.8
	RELEASE_5_5_0:1.8
	RELEASE_6_0_0:1.8
	RELEASE_5_4_0:1.8
	RELEASE_4_11_0:1.8
	RELEASE_5_3_0:1.8
	RELEASE_4_10_0:1.8
	RELEASE_5_2_1:1.8
	RELEASE_5_2_0:1.8
	RELEASE_4_9_0:1.8
	RELEASE_5_1_0:1.8
	RELEASE_4_8_0:1.8
	RELEASE_5_0_0:1.8
	RELEASE_4_7_0:1.8
	RELEASE_4_6_2:1.8
	RELEASE_4_6_1:1.8
	RELEASE_4_6_0:1.8
	RELEASE_5_0_DP1:1.8
	RELEASE_4_5_0:1.8
	RELEASE_4_4_0:1.8
	RELEASE_4_3_0:1.8
	RELEASE_4_2_0:1.8
	RELEASE_4_1_1:1.7
	RELEASE_4_1_0:1.7
	RELEASE_3_5_0:1.7
	RELEASE_4_0_0:1.7
	RELEASE_3_4_0:1.7
	RELEASE_3_3_0:1.7
	RELEASE_3_2_0:1.7
	RELEASE_3_1_0:1.7
	RELEASE_2_2_8:1.6
	RELEASE_3_0_0:1.6
	RELEASE_2_2_7:1.4
	gcc_2_8_1:1.2
	RELEASE_2_2_6:1.1;
locks; strict;
comment	@# @;


1.9
date	2009.01.24.12.17.08;	author gerald;	state dead;
branches;
next	1.8;

1.8
date	2000.11.10.17.47.41;	author obrien;	state Exp;
branches;
next	1.7;

1.7
date	99.02.09.18.25.43;	author obrien;	state Exp;
branches;
next	1.6;

1.6
date	98.08.13.17.55.40;	author obrien;	state Exp;
branches;
next	1.5;

1.5
date	98.07.22.02.53.14;	author obrien;	state Exp;
branches;
next	1.4;

1.4
date	98.06.30.21.10.26;	author jdp;	state Exp;
branches;
next	1.3;

1.3
date	98.05.22.00.26.29;	author obrien;	state Exp;
branches;
next	1.2;

1.2
date	98.04.12.13.29.02;	author obrien;	state Exp;
branches;
next	1.1;

1.1
date	98.03.11.11.49.12;	author obrien;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Remove lang/gcc28 (GCC 2.8) which has been DEPRECATED for more than
3 years and does not build anywhere.

No objections:	mjl@@luckie.org.nz (maintainer), pav
@
text
@--- config/i386/freebsd-aout.h.orig	Sun Oct 19 09:31:05 1997
+++ config/i386/freebsd-aout.h	Tue Aug 11 14:28:56 1998
@@@@ -35,10 +35,21 @@@@
 #include "i386/perform.h"
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+
+/* FreeBSD using a.out does not support DWARF2 unwinding mechanisms.
+   Thus, need the equivalent of "-fsjlj-exceptions" (use setjmp/longjmp
+   for exceptions).  */
+#define DWARF2_UNWIND_INFO 0
+
+/* Provide a CPP_SPEC appropriate for OpenBSD.  Current we just deal with
+   the GCC option `-posix'.  */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
 
 /* Like the default, except no -lg.  */
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "unsigned int"
@@@@ -54,8 +65,13 @@@@
 #undef WCHAR_TYPE_SIZE
 #define WCHAR_TYPE_SIZE 16
 
+/* We have atexit(3). */
 #define HAVE_ATEXIT
 
+/* We want gcc.c to call mktemp() for each file it generates. We would
+   prefer mkstemp(), but we will take what we get. XXX busted */
+/* #undef MKTEMP_EACH_FILE */
+
 #undef ASM_APP_ON
 #define ASM_APP_ON "#APP\n"
 
@@@@ -114,6 +130,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 +140,10 @@@@
 
 #define TYPE_OPERAND_FMT	"@@%s"
 
+/* Handle #pragma weak and #pragma pack. */
+
+#define HANDLE_SYSV_PRAGMA	1
+
 /* 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.  */
@@@@ -131,9 +158,9 @@@@
 #define ASM_DECLARE_RESULT(FILE, RESULT)
 #endif
 
-/* These macros generate the special .type and .size directives which
+/* these macros generate the special .type and .size directives which
    are used to set the corresponding fields of the linker symbol table
-   entries in an ELF object file under SVR4.  These macros also output
+   entries in an elf object file under svr4.  these macros also output
    the starting labels for the relevant functions/objects.  */
 
 /* Write the extra assembler code needed to declare a function properly.
@@@@ -185,6 +212,7 @@@@
          && DECL_INITIAL (DECL) == error_mark_node                      \
          && !size_directive_output)                                     \
        {                                                                \
+         size_directive_output = 1;                                     \
          fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                        \
 	 assemble_name (FILE, name);                                    \
 	 fprintf (FILE, ",%d\n",  int_size_in_bytes (TREE_TYPE (DECL)));\
@@@@ -213,33 +241,57 @@@@
       }									\
   } while (0)
 
+/* XXX - should ASM_SPEC be " %| %{fpic:-k} %{fPIC:-k -K}" ??? */
 #define ASM_SPEC   " %| %{fpic:-k} %{fPIC:-k}"
+
 #define LINK_SPEC \
-  "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+  "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
+  %{shared:-Bshareable} \
+  %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
+  %{pg:-Bstatic} %{Z}} \
+  %{assert*} %{R*}"
+
+#ifdef FROM_OPENBSD
+/* This defines which switch letters take arguments.  
+   make -R /path/to/lib work the same as -R/path/to/lib */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
+   || (CHAR) == 'R')
+#endif
+
+#define STARTFILE_SPEC  \
+  "%{shared:c++rt0.o%s} \
+  %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
 
-/* 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.
+#define MD_STARTFILE_PREFIX "/usr/lib/aout/"
+
+/* FREEBSD_NATIVE 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.
  */
 
 #ifdef FREEBSD_NATIVE
 
-#define INCLUDE_DEFAULTS { \
-	{ "/usr/include", 0, 0, 0 }, \
-	{ "/usr/include/g++", "G++", 1, 1 }, \
-	{ 0, 0, 0, 0} \
-	}
+#undef GCC_INCLUDE_DIR
+#define GCC_INCLUDE_DIR "/usr/include"
+
+#undef GPLUSPLUS_INCLUDE_DIR
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
+
+/* Look for the include files in the system-defined places.  */
+
+#undef INCLUDE_DEFAULTS
+#define INCLUDE_DEFAULTS			\
+  {						\
+    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },	\
+    { GCC_INCLUDE_DIR, 0, 0, 0 },		\
+    { 0, 0, 0, 0 }				\
+  }
 
 #undef MD_EXEC_PREFIX
 #define MD_EXEC_PREFIX "/usr/libexec/"
 
 #undef STANDARD_STARTFILE_PREFIX
 #define STANDARD_STARTFILE_PREFIX "/usr/lib"
-
-#if 0 /* This is very wrong!!! */
-#define DEFAULT_TARGET_MACHINE "i386-unknown-freebsd_1.0"
-#define GPLUSPLUS_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#define TOOL_INCLUDE_DIR "/usr/local/i386-unknown-freebsd_1.0/include"
-#define GCC_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#endif
 
 #endif /* FREEBSD_NATIVE */
@


1.8
log
@Don't define "ASM_WEAKEN_LABEL" in the a.out case.

PR:		16882
Submitted by:	Bly Hostetler <hostetlb@@agcs.com>
@
text
@@


1.7
log
@GNUHOST is now "i386-unknown-freebsd3" for ELF machines and
"i386-unknown-freebsdaout3" for a.out machines.
@
text
@d49 1
a49 1
@@@@ -123,6 +140,16 @@@@
a55 6
+
+/* This is how we tell the assembler that a symbol is weak. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+  do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+  fputc ('\n', FILE); } while (0)
@


1.6
log
@* Minor bug fixes from OpenBSD (and some stuff to ease diff'ing in the future)
* Some initial support for FreeBSD-alpha
* Add some optimizations required by g77, which still might be of some use
  to adventuring C/C++ programmers.

Obtained from:	OpenBSD (parts)
@
text
@d1 2
a2 2
--- config/i386/freebsd.h.orig	Sun Oct 19 09:31:05 1997
+++ config/i386/freebsd.h	Tue Aug 11 14:28:56 1998
@


1.5
log
@Better way to do the equivalent of "-fsjlj-exceptions".
@
text
@d2 2
a3 2
+++ config/i386/freebsd.h	Sun Jul 19 14:31:18 1998
@@@@ -35,10 +35,15 @@@@
d14 6
d27 15
a41 1
@@@@ -114,6 +119,7 @@@@
d49 1
a49 1
@@@@ -123,6 +129,12 @@@@
d53 2
d57 2
d66 23
a88 1
@@@@ -215,7 +227,17 @@@@
d90 1
d92 1
d101 9
d113 18
d132 25
a156 1
+#define MD_STARTFILE_PREFIX "/usr/lib/aout/"
d158 1
a158 3
 /* 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.

@


1.4
log
@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).
@
text
@d2 2
a3 2
+++ config/i386/freebsd.h	Tue Jun 30 13:44:27 1998
@@@@ -35,10 +35,24 @@@@
d10 4
a13 13
+/* need "-fsjlj-exceptions" (use setjmp/longjmp for exceptions) the default.
+   The standard exception implementation reliably
+   dumps core under FreeBSD.  Users can put "-fno-sjlj-exceptions" on
+   the command line if they really want to override the new default. */
+#ifdef CC1PLUS_SPEC
+#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) "
d21 1
a21 1
@@@@ -114,6 +128,7 @@@@
d29 1
a29 1
@@@@ -123,6 +138,12 @@@@
d42 1
a42 1
@@@@ -215,7 +236,17 @@@@
d61 1
@


1.3
log
@Fix the LINK_SPEC for a.out.

Submitted by:	roberto
@
text
@d2 2
a3 2
+++ config/i386/freebsd.h	Thu May 21 14:10:11 1998
@@@@ -35,10 +35,19 @@@@
d18 5
d30 22
a51 1
@@@@ -215,7 +224,15 @@@@
d65 2
@


1.2
log
@Sync-up CPP predefines w/our stock compiler and EGCS.
1. we are not 386BSD
2. ELF shouldn't need "-fsjlj-exceptions"
@
text
@d2 2
a3 2
+++ config/i386/freebsd.h	Sun Apr 12 06:19:42 1998
@@@@ -35,7 +35,16 @@@@
d8 1
a8 1
+#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
d20 22
a41 1
 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
@


1.1
log
@Define __FreeBSD__ to be the major version (rather than empty).

Add -fsjlj-exceptions as the default.
Requested by:	John Fiber
@
text
@d2 4
a5 2
+++ config/i386/freebsd.h	Wed Mar 11 03:04:25 1998
@@@@ -37,6 +37,15 @@@@
d7 3
a9 2
 #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
 
d18 1
a18 1
+
a20 1
 
@
