Add generic xm* fragments to prevent nasty surprises, such as being

mistaken for systemV :) (and real nasties, too)
This commit is contained in:
espie 1999-02-13 00:53:48 +00:00
parent d0896f7e9e
commit bb89b14a54
28 changed files with 144 additions and 36 deletions

View File

@ -3,7 +3,7 @@
# Date created: 25 sep 98
# Whom: Marc Espie
#
# $OpenBSD: Makefile,v 1.28 1999/02/09 10:47:44 espie Exp $
# $OpenBSD: Makefile,v 1.29 1999/02/13 00:53:48 espie Exp $
#
# This is a configuration file for egcs, snapshot flavor
# PLEASE use the regular egcs-stable for serious work, resort to this one
@ -220,7 +220,7 @@ PATCH_LIST+=patch-java-*
# get openbsd configuration files where they should be
post-patch:
# avoid packaging include copies along...
find ${WRKSRC} -name \*.orig|xargs ${RM}
#find ${WRKSRC} -name \*.orig|xargs ${RM}
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
-${RM} -rf ${WRKSRC}/texinfo
${MV} ${WRKSRC}/libiberty/mkstemp.c ${WRKSRC}/libiberty/mkstemps.c

View File

@ -1,9 +1,16 @@
$OpenBSD: README,v 1.4 1999/02/03 18:02:53 espie Exp $
$OpenBSD: README,v 1.5 1999/02/13 00:53:48 espie Exp $
Warning: highly experimental port.
It is assumed you know what you are doing by playing with this.
Some common problems:
- this port has no bison/yacc dependency. post-patch DOES fix the
timestamps so that the generated parser files are newer than the
corresponding yacc source. If this fails for you, blame your setup. *RUN*
a time protocol over NFS networks, heck, get a clue.
I am currently rewriting the openbsd configuration files, mostly from
scratch, in order to clean them up. Goal is to have something I can
file up with the FSF as soon as possible, so that egcs 1.1.2 will have
@ -64,9 +71,12 @@ This seems to be fixed as of 19990131
As of 19990117, I personally built egcs for m68k, i386, alpha, and sparc.
So all those archs *do* work. If it doesn't work for you, you've been doing
something wrong.
something wrong. Other arches are well along the way...
As of 19990131, I checked that i386 and m68k did work.
I don't recommend 19990208 for production uses. There are fairly recent
changes to the loop handling code that breaks useful stuff, such as
gnu-grep...
Once you get through all those caveats, and manage to build egcs, one
nice point is that you get fairly good C, C++, f77, objective-C, and

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <alpha/xm-alpha.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <i386/xm-i386.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <m68k/xm-openbsd.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <m88k/xm-m88k.h>

View File

@ -0,0 +1,5 @@
#include <xm-openbsd.h>
#include <mips/xm-mips.h>
/* we're NOT systemV */
#undef USG

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <ns32k/xm-ns32k.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <pa/xm-pa.h>

View File

@ -1,3 +1,6 @@
#include <xm-openbsd.h>
#include <rs6000/xm-rs6000.h>
#undef USG
/* OpenBSD is using the gnu-linker, and has no COFF dynamic library
specific support on rs6000 yet. */
#undef COLLECT_EXPORT_LIST

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <sparc/xm-sparc.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <xm/xm-vax.h>

View File

@ -0,0 +1,18 @@
/* `generic' xm-openbsd.h.
This file gets included by all architectures. It holds stuff
that ought to be defined when hosting a compiler on an OpenBSD
machine, independently of the architecture. It's included by
${cpu_type}/xm-openbsd.h, not included directly.
*/
/* OpenBSD is trying to be POSIX-compliant, to the point of fixing
problems that may occur with gcc's interpretation.
*/
#undef POSIX
#define POSIX
/* Ensure we get gnu C's defaults */
#ifdef __GNUC__
#define alloca __builtin_alloca
#endif

View File

@ -1,6 +1,6 @@
--- gcc/configure.in.orig Thu Jan 28 09:46:10 1999
+++ gcc/configure.in Fri Feb 12 00:42:39 1999
@@ -502,11 +502,21 @@
+++ gcc/configure.in Fri Feb 12 02:43:25 1999
@@ -502,11 +502,23 @@
tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h
@ -15,6 +15,8 @@
+ # On OpenBSD systems, the headers are okay
+ fixincludes=Makefile.in
+ tmake_file="t-libc-ok t-openbsd"
+ # avoid surprises, always provide an xm-openbsd file
+ xm_file=${cpu_type}/xm-openbsd.h
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ tmake_file="${tmake_file} t-openbsd-thread"
@ -23,7 +25,7 @@
esac
case $machine in
@@ -586,6 +596,12 @@
@@ -586,6 +598,12 @@
fixincludes=fixinc.wrap
gas=yes gnu_ld=yes
;;
@ -36,7 +38,7 @@
alpha*-dec-osf*)
if test x$stabs = xyes
@@ -776,6 +792,10 @@
@@ -776,6 +794,10 @@
h8300-*-*)
float_format=i32
;;
@ -47,7 +49,7 @@
hppa1.1-*-pro*)
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
xm_file=pa/xm-papro.h
@@ -1103,10 +1123,8 @@
@@ -1103,10 +1125,8 @@
fixincludes=fixinc.wrap
tmake_file=i386/t-freebsd
;;
@ -59,7 +61,7 @@
changequote([,])dnl
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
@@ -1114,6 +1132,14 @@
@@ -1114,6 +1134,14 @@
tmake_file=t-netbsd
;;
changequote(,)dnl
@ -74,7 +76,7 @@
i[34567]86-*-coff*)
changequote([,])dnl
tm_file=i386/i386-coff.h
@@ -1975,6 +2001,11 @@
@@ -1975,6 +2003,11 @@
tmake_file=t-netbsd
float_format=m68k
;;
@ -86,7 +88,7 @@
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file="xm-alloca.h ${xm_file}"
xm_defines=USG
@@ -2098,6 +2129,9 @@
@@ -2098,6 +2131,9 @@
tmake_file=m88k/t-luna
fi
;;
@ -96,7 +98,7 @@
m88k-*-sysv3*)
tm_file=m88k/sysv3.h
extra_parts="crtbegin.o crtend.o"
@@ -2306,6 +2340,16 @@
@@ -2306,6 +2342,16 @@
gas=yes
fixincludes=Makefile.in
;;
@ -113,7 +115,7 @@
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file="mips/news4.h ${tm_file}"
if test x$stabs = xyes; then
@@ -2656,6 +2700,9 @@
@@ -2656,6 +2702,9 @@
;;
pdp11-*-*)
;;
@ -123,7 +125,7 @@
pyramid-*-*)
cpu_type=pyr
xmake_file=pyr/x-pyr
@@ -2668,6 +2715,14 @@
@@ -2668,6 +2717,14 @@
xmake_file=romp/x-mach
use_collect2=yes
;;
@ -138,7 +140,7 @@
powerpc-*-beos*)
cpu_type=rs6000
tm_file=rs6000/beos.h
@@ -2962,6 +3017,10 @@
@@ -2962,6 +3019,10 @@
fixincludes=fixinc.wrap
tmake_file=t-netbsd
;;
@ -149,7 +151,7 @@
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
@@ -3189,6 +3248,9 @@
@@ -3189,6 +3250,9 @@
fixincludes=fixinc.wrap
tmake_file=t-netbsd
float_format=vax

View File

@ -3,7 +3,7 @@
# Date created: 25 sep 98
# Whom: Marc Espie
#
# $OpenBSD: Makefile,v 1.28 1999/02/09 10:47:44 espie Exp $
# $OpenBSD: Makefile,v 1.29 1999/02/13 00:53:48 espie Exp $
#
# This is a configuration file for egcs, snapshot flavor
# PLEASE use the regular egcs-stable for serious work, resort to this one
@ -220,7 +220,7 @@ PATCH_LIST+=patch-java-*
# get openbsd configuration files where they should be
post-patch:
# avoid packaging include copies along...
find ${WRKSRC} -name \*.orig|xargs ${RM}
#find ${WRKSRC} -name \*.orig|xargs ${RM}
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
-${RM} -rf ${WRKSRC}/texinfo
${MV} ${WRKSRC}/libiberty/mkstemp.c ${WRKSRC}/libiberty/mkstemps.c

View File

@ -1,9 +1,16 @@
$OpenBSD: README,v 1.4 1999/02/03 18:02:53 espie Exp $
$OpenBSD: README,v 1.5 1999/02/13 00:53:48 espie Exp $
Warning: highly experimental port.
It is assumed you know what you are doing by playing with this.
Some common problems:
- this port has no bison/yacc dependency. post-patch DOES fix the
timestamps so that the generated parser files are newer than the
corresponding yacc source. If this fails for you, blame your setup. *RUN*
a time protocol over NFS networks, heck, get a clue.
I am currently rewriting the openbsd configuration files, mostly from
scratch, in order to clean them up. Goal is to have something I can
file up with the FSF as soon as possible, so that egcs 1.1.2 will have
@ -64,9 +71,12 @@ This seems to be fixed as of 19990131
As of 19990117, I personally built egcs for m68k, i386, alpha, and sparc.
So all those archs *do* work. If it doesn't work for you, you've been doing
something wrong.
something wrong. Other arches are well along the way...
As of 19990131, I checked that i386 and m68k did work.
I don't recommend 19990208 for production uses. There are fairly recent
changes to the loop handling code that breaks useful stuff, such as
gnu-grep...
Once you get through all those caveats, and manage to build egcs, one
nice point is that you get fairly good C, C++, f77, objective-C, and

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <alpha/xm-alpha.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <i386/xm-i386.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <m68k/xm-openbsd.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <m88k/xm-m88k.h>

View File

@ -0,0 +1,5 @@
#include <xm-openbsd.h>
#include <mips/xm-mips.h>
/* we're NOT systemV */
#undef USG

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <ns32k/xm-ns32k.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <pa/xm-pa.h>

View File

@ -1,3 +1,6 @@
#include <xm-openbsd.h>
#include <rs6000/xm-rs6000.h>
#undef USG
/* OpenBSD is using the gnu-linker, and has no COFF dynamic library
specific support on rs6000 yet. */
#undef COLLECT_EXPORT_LIST

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <sparc/xm-sparc.h>

View File

@ -0,0 +1,2 @@
#include <xm-openbsd.h>
#include <xm/xm-vax.h>

View File

@ -0,0 +1,18 @@
/* `generic' xm-openbsd.h.
This file gets included by all architectures. It holds stuff
that ought to be defined when hosting a compiler on an OpenBSD
machine, independently of the architecture. It's included by
${cpu_type}/xm-openbsd.h, not included directly.
*/
/* OpenBSD is trying to be POSIX-compliant, to the point of fixing
problems that may occur with gcc's interpretation.
*/
#undef POSIX
#define POSIX
/* Ensure we get gnu C's defaults */
#ifdef __GNUC__
#define alloca __builtin_alloca
#endif

View File

@ -1,6 +1,6 @@
--- gcc/configure.in.orig Thu Jan 28 09:46:10 1999
+++ gcc/configure.in Fri Feb 12 00:42:39 1999
@@ -502,11 +502,21 @@
+++ gcc/configure.in Fri Feb 12 02:43:25 1999
@@ -502,11 +502,23 @@
tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h
@ -15,6 +15,8 @@
+ # On OpenBSD systems, the headers are okay
+ fixincludes=Makefile.in
+ tmake_file="t-libc-ok t-openbsd"
+ # avoid surprises, always provide an xm-openbsd file
+ xm_file=${cpu_type}/xm-openbsd.h
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ tmake_file="${tmake_file} t-openbsd-thread"
@ -23,7 +25,7 @@
esac
case $machine in
@@ -586,6 +596,12 @@
@@ -586,6 +598,12 @@
fixincludes=fixinc.wrap
gas=yes gnu_ld=yes
;;
@ -36,7 +38,7 @@
alpha*-dec-osf*)
if test x$stabs = xyes
@@ -776,6 +792,10 @@
@@ -776,6 +794,10 @@
h8300-*-*)
float_format=i32
;;
@ -47,7 +49,7 @@
hppa1.1-*-pro*)
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
xm_file=pa/xm-papro.h
@@ -1103,10 +1123,8 @@
@@ -1103,10 +1125,8 @@
fixincludes=fixinc.wrap
tmake_file=i386/t-freebsd
;;
@ -59,7 +61,7 @@
changequote([,])dnl
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
@@ -1114,6 +1132,14 @@
@@ -1114,6 +1134,14 @@
tmake_file=t-netbsd
;;
changequote(,)dnl
@ -74,7 +76,7 @@
i[34567]86-*-coff*)
changequote([,])dnl
tm_file=i386/i386-coff.h
@@ -1975,6 +2001,11 @@
@@ -1975,6 +2003,11 @@
tmake_file=t-netbsd
float_format=m68k
;;
@ -86,7 +88,7 @@
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file="xm-alloca.h ${xm_file}"
xm_defines=USG
@@ -2098,6 +2129,9 @@
@@ -2098,6 +2131,9 @@
tmake_file=m88k/t-luna
fi
;;
@ -96,7 +98,7 @@
m88k-*-sysv3*)
tm_file=m88k/sysv3.h
extra_parts="crtbegin.o crtend.o"
@@ -2306,6 +2340,16 @@
@@ -2306,6 +2342,16 @@
gas=yes
fixincludes=Makefile.in
;;
@ -113,7 +115,7 @@
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file="mips/news4.h ${tm_file}"
if test x$stabs = xyes; then
@@ -2656,6 +2700,9 @@
@@ -2656,6 +2702,9 @@
;;
pdp11-*-*)
;;
@ -123,7 +125,7 @@
pyramid-*-*)
cpu_type=pyr
xmake_file=pyr/x-pyr
@@ -2668,6 +2715,14 @@
@@ -2668,6 +2717,14 @@
xmake_file=romp/x-mach
use_collect2=yes
;;
@ -138,7 +140,7 @@
powerpc-*-beos*)
cpu_type=rs6000
tm_file=rs6000/beos.h
@@ -2962,6 +3017,10 @@
@@ -2962,6 +3019,10 @@
fixincludes=fixinc.wrap
tmake_file=t-netbsd
;;
@ -149,7 +151,7 @@
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
@@ -3189,6 +3248,9 @@
@@ -3189,6 +3250,9 @@
fixincludes=fixinc.wrap
tmake_file=t-netbsd
float_format=vax