Clean Makefile up, mv patches around for conditional inclusion,

add beginning of m68k config.
This commit is contained in:
espie 1998-11-17 17:39:33 +00:00
parent 5f564b3eca
commit dcca223ff9
16 changed files with 712 additions and 86 deletions

View File

@ -3,37 +3,57 @@
# Date created: 25 sep 98
# Whom: Marc Espie
#
# $OpenBSD: Makefile,v 1.3 1998/11/16 21:11:13 espie Exp $
# $OpenBSD: Makefile,v 1.4 1998/11/17 17:39:33 espie Exp $
#
# This is a configuration file for egcs, recent snapshot
# right now, we only configure i386, C and C++.
# PLEASE use the regular egcs-stable for serious work, resort to this one
# for experimentations and testing.
# Right now, we can only configure i386. Bound to change in the future
# we could remove this dependency by patching configure, but this is not
# reasonable...
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
CATEGORIES= lang
MAINTAINER= Marc.Espie@openbsd.org
# this will improve over time as more and more architectures are handled
ONLY_FOR_ARCHS = i386
# user configuration section
# user configuration
# see files/tests for precise testing procedure
MAKE_TESTS=yes
MAKE_GXX=yes
MAKE_FORTRAN=yes
MAKE_OBJC=yes
# these are broken, as of this snapshot...
#MAKE_CHILL=yes
# these are broken, as of 1998-11-09
MAKE_CHILL=yes
# java archive is truncated, objc too
#MAKE_OBJC=yes
#MAKE_JAVA=yes
#PATCH_DEBUG=yes
# this configuration allow for ONE level of diff-files
LATEST=19981109
LATEST_DATE=1998-11-09
#### fetch section
# configuration is built so that you can test the next snapshot easily,
# define NEXT_DATE to the next snapshot... you lose the ability to check
# md5 sums, though.
# NEXT_DATE=1998-11-20
#PATCH_DEBUG=yes
LATEST != echo ${LATEST_DATE} | sed -e s/-//g;
DIRECTORY=egcs/snapshots/%SUBDIR%/
.if defined(NEXT)
.if defined(NEXT_DATE)
NEXT != echo ${NEXT_DATE} | sed -e s/-//g;
DISTNAME= egcs-${NEXT}
.else
DISTNAME= egcs-${LATEST}
.endif
CATEGORIES= lang
MAINTAINER= Marc.Espie@openbsd.org
# getting the right archives where they should be
MASTER_SITE_SUBDIR=${LATEST}
@ -75,9 +95,14 @@ DISTFILES+=egcs-objc-${LATEST}${EXTRACT_SUFX}
DISTFILES+=egcs-chill-${LATEST}${EXTRACT_SUFX}
.endif
# to do: check egcs-stable mirror list for sites which carry snapshots
MASTER_SITES= ftp://egcs.cygnus.com/pub/${DIRECTORY} \
ftp://ftp.lip6.fr/pub/${DIRECTORY}
# add a possible next snapshot
.if defined(NEXT)
PATCHFILES=egcs-core-${LATEST}-${NEXT}.diff.gz
.if defined(MAKE_TESTS)
@ -107,50 +132,90 @@ PATCHFILES+=egcs-chill-${LATEST}-${NEXT}.diff.gz
.endif
# to do: check egcs-stable mirror list for sites which carry snapshots
# synch the date
.if defined(NEXT)
post-extract:
${MV} ${WRKDIR}/egcs-${LATEST} ${WRKSRC}
.endif
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
####
# Patch section
# this rigmarole is needed as all patches DON'T necessarily apply
# to every configuration
pre-patch:
-${RM} -f ${PATCHDIR}/*
-${MKDIR} ${PATCHDIR}
${CP} ${FILESDIR}/patches/patch-core-* ${PATCHDIR}
.if defined(MAKE_GXX)
${CP} ${FILESDIR}/patches/patch-g++-* ${PATCHDIR}
.endif
# get openbsd configuration files where they should be
post-patch:
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
-${RM} -rf ${WRKSRC}/texinfo
.if !defined(MAKE_CHILL)
-${RM} -rf ${WRKSRC}/gcc/ch
.endif
# will improve over time as more and more architectures are handled
ONLY_FOR_ARCHS = i386
GNU_CONFIGURE= yes
USE_GMAKE= yes
# don't make bootstrap if you're impatient/you know what you're doing
# use bootstrap-lean if you don't have room.
ALL_TARGET=bootstrap
####
# configure section
#
# define AS_PATH/LD_PATH is you don't want to use the default as/ld.
# This should not be used for regular releases, but if you're on this
# snapshot, you know what you're doing, don't you ?
CONFIGURE_SCRIPT=../source/configure
CONFIGURE_ENV=CFLAGS=-O2
CONFIGURE_ARGS= --prefix=${PREFIX} \
--verbose --with-gnu-ld --with-gnu-as \
--program-transform-name=s,^,e,
--verbose --program-transform-name=s,^,e,
.if defined(AS_PATH)
CONFIGURE_ARGS += --with-as=${AS_PATH}
.else
CONFIGURE_ARGS += --with-gnu-as
.endif
.if defined(LD_PATH)
CONFIGURE_ARGS += --with-ld=${LD_PATH}
.else
CONFIGURE_ARGS += --with-gnu-ld
.endif
.if (${MACHINE_ARCH} != "alpha")
CONFIGURE_ARGS+=--enable-shared
.endif
.if defined(NEXT)
post-extract:
mv ${WRKDIR}/egcs-${LATEST} ${WRKSRC}
.endif
# get openbsd configuration files where they should be
post-patch:
cp -R ${FILESDIR}/config/* ${WRKSRC}
rm -rf ${WRKSRC}/texinfo
# rebuild configure file after patching, then move file around !!!
# XXX: don't try to autoconf the main configure file, it's not autoconf.
# + kludge to build in a separate directory.
pre-configure:
cd ${WRKSRC}/gcc && autoconf
mv ${WRKSRC} ${WRKDIR}/source
mkdir ${WRKSRC}
# cd ${WRKSRC}/gcc && autoconf
-${MV} ${WRKSRC} ${WRKDIR}/source
${MKDIR} ${WRKSRC}
####
# build section
# should work without gmake. If it turns out to be needed, this is a bug
#USE_GMAKE= yes
# you shouldn't skip bootstrap unless you know what you're doing
# use bootstrap-lean if you don't have room.
ALL_TARGET=bootstrap
# ALL_TARGET=bootstrap-lean
####
# Install section
M4FLAGS=-Uinclude -DDISTNAME=${DISTNAME}
.if defined(MAKE_GXX)
@ -171,10 +236,10 @@ M4FLAGS+= -DDYNAMIC
pre-install:
m4 ${M4FLAGS} -DARCH=`${WRKDIR}/source/config.guess` \
-DVERSION=`sed -e 's/.*\(egcs-[0-9.]*\) .*/\1/' <${WRKDIR}/source/gcc/version.c` \
-DVERSION=`${SED} -e 's/.*\(egcs-[0-9.]*\) .*/\1/' <${WRKDIR}/source/gcc/version.c` \
<${FILESDIR}/PLIST.template >${PKGDIR}/PLIST
pre-clean:
-rm ${PKGDIR}/PLIST
-${RM} ${PKGDIR}/PLIST ${PATCHDIR}/*
.include <bsd.port.mk>

View File

@ -0,0 +1,68 @@
#include <m68k/m68k.h>
/* Get generic OpenBSD definitions. */
#include <openbsd.h>
/* See m68k.h. 7 means 68020 with 68881. */
#define TARGET_DEFAULT 7
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
This will control the use of inline 68881 insns in certain macros. */
#undef CPP_SPEC
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(m68k) -Amachine(m68k)"
/* Make gcc agree with <machine/ansi.h> */
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Every structure or union's size must be a multiple of 2 bytes. */
#define STRUCTURE_SIZE_BOUNDARY 16
/* This is BSD, so it wants DBX format. */
#define DBX_DEBUGGING_INFO
/* Do not break .stabs pseudos into continuations. */
#define DBX_CONTIN_LENGTH 0
/* This is the char to use for continuation (in case we need to turn
continuation back on). */
#define DBX_CONTIN_CHAR '?'
/* Don't use the `xsfoo;' construct in DBX output; this system
doesn't support it. */
#define DBX_NO_XREFS
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0

View File

@ -4,6 +4,4 @@ MD5 (egcs/egcs-g++-19981109.tar.gz) = 4f242afc45c8258a068f2bd305c69c61
MD5 (egcs/egcs-g++-tests-19981109.tar.gz) = a12924830e33565b7ca9af7636701b79
MD5 (egcs/egcs-g77-19981109.tar.gz) = 5d672c4261cfaffbf9dd6ab70b51f726
MD5 (egcs/egcs-g77-testsuite-19981109.tar.gz) = 1485cfe769b27512b17fd48491349b18
MD5 (egcs/egcs-java-19981109.tar.gz) = d9162b7f8dbf069f40077c494492694e
MD5 (egcs/egcs-objc-19981109.tar.gz) = 5ec0dac2be3b9eaa0474894841bb5e9c
MD5 (egcs/egcs-chill-19981109.tar.gz) = e574daed5262dc7fba86a6c0754f6ef6

View File

@ -0,0 +1,62 @@
--- gcc/configure.in.orig Sat Nov 7 14:00:02 1998
+++ gcc/configure.in Tue Nov 17 00:23:07 1998
@@ -1082,10 +1082,8 @@
fixincludes=fixinc.wrap
tmake_file=i386/t-freebsd
;;
- # We are hoping OpenBSD is still close enough to NetBSD that we can
- # share the configurations.
changequote(,)dnl
- i[34567]86-*-netbsd* | i[34567]86-*-openbsd*)
+ i[34567]86-*-netbsd*)
changequote([,])dnl
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
@@ -1093,6 +1091,16 @@
tmake_file=t-netbsd
;;
changequote(,)dnl
+ i[34567]86-*-openbsd*)
+changequote([,])dnl
+ tm_file=i386/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
+ ;;
+changequote(,)dnl
i[34567]86-*-coff*)
changequote([,])dnl
tm_file=i386/i386-coff.h
@@ -1947,6 +1955,15 @@
tmake_file=t-netbsd
float_format=m68k
;;
+ m68k*-*-openbsd*)
+ tm_file=m68k/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ float_format=m68k
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
+ ;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file="xm-alloca.h ${xm_file}"
xm_defines=USG
@@ -2916,6 +2933,14 @@
# On NetBSD, the headers are already okay, except for math.h.
fixincludes=fixinc.wrap
tmake_file=t-netbsd
+ ;;
+ sparc-*-openbsd*)
+ tm_file=sparc/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
;;
sparc-*-bsd*)
tm_file=sparc/bsd.h

View File

@ -0,0 +1,16 @@
--- gcc/cpp.texi.orig Sun Nov 1 20:10:10 1998
+++ gcc/cpp.texi Sun Nov 1 20:10:34 1998
@@ -1,11 +1,11 @@
\input texinfo
-@setfilename cpp.info
+@setfilename ecpp.info
@settitle The C Preprocessor
@ifinfo
@dircategory Programming
@direntry
-* Cpp: (cpp). The GNU C preprocessor.
+* ECpp: (ecpp). The experimental GNU C preprocessor.
@end direntry
@end ifinfo

View File

@ -0,0 +1,19 @@
--- gcc/gcc.texi.orig Sun Nov 1 20:04:09 1998
+++ gcc/gcc.texi Sun Nov 1 20:04:35 1998
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@setfilename gcc.info
+@setfilename egcc.info
@c @setfilename usegcc.info
@c @setfilename portgcc.info
@c To produce the full manual, use the "gcc.info" setfilename, and
@@ -82,7 +82,7 @@
@ifinfo
@dircategory Programming
@direntry
-* gcc: (gcc). The GNU C compiler.
+* egcc: (egcc). The experimental GNU C compiler.
@end direntry
@ifset INTERNALS
@ifset USING

View File

@ -0,0 +1,75 @@
--- gcc/Makefile.in.orig Sun Nov 1 20:06:26 1998
+++ gcc/Makefile.in Sun Nov 1 20:09:30 1998
@@ -459,6 +459,10 @@
PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t`
UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t`
+# documentation for cpp should not supersede default documentation
+CPP_INFO_NAME = `t='$(program_transform_name)'; echo cpp | sed -e $$t`
+CPP_MAN_NAME = `t='$(program_transform_name)'; echo cccp | sed -e $$t`
+
# Actual name to use when installing a cross-compiler.
GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
PROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo protoize | sed -e $$t`
@@ -2163,12 +2167,14 @@
info: cpp.info gcc.info lang.info
cpp.info: $(srcdir)/cpp.texi
- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi
+ $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o $(CPP_INFO_NAME).info \
+ $(srcdir)/cpp.texi && touch $@
gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
$(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
$(srcdir)/tm.texi $(srcdir)/gcov.texi
- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi
+ $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o $(GCC_INSTALL_NAME).info \
+ $(srcdir)/gcc.texi && touch $@
dvi: gcc.dvi cpp.dvi lang.dvi
@@ -2309,6 +2315,7 @@
-rm -f cexp.c cexp.output TAGS
-rm -f cpp.info* cpp.??s cpp.*aux
-rm -f gcc.info* gcc.??s gcc.*aux
+ -rm -f $(GCC_INSTALL_NAME).info* $(CPP_INFO_NAME).info*
#
# Entry points `install' and `uninstall'.
# Also use `install-collect2' to install collect2 when the config files don't.
@@ -2447,18 +2454,19 @@
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
install-info: doc installdirs lang.install-info
- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
- for f in cpp.info* gcc.info*; do \
+ -rm -f $(infodir)/$(CPP_INFO_NAME).info* \
+ $(infodir)/$(GCC_INSTALL_NAME).info*
+ for f in $(GCC_INSTALL_NAME).info* $(CPP_INFO_NAME).info*; do \
$(INSTALL_DATA) $$f $(infodir)/$$f; \
done
-if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
if [ -f $(infodir)/dir ] ; then \
- for f in cpp.info gcc.info; do \
+ for f in $(GCC_INSTALL_NAME).info $(CPP_INFO_NAME).info; do \
install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \
done; \
else true; fi; \
else true; fi;
- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
+ -chmod a-x $(infodir)/$(CPP_INFO_NAME).info* $(infodir)/$(GCC_INSTALL_NAME).info*
# Install the man pages.
install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
@@ -2471,9 +2479,9 @@
$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
fi
- -rm -f $(mandir)/cccp$(manext)
- -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
- -chmod a-x $(mandir)/cccp$(manext)
+ -rm -f $(mandir)/$(CPP_MAN_NAME)$(manext)
+ -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/$(CPP_MAN_NAME)$(manext)
+ -chmod a-x $(mandir)/$(CPP_MAN_NAME)$(manext)
# Install the library.
install-libgcc: libgcc.a installdirs

View File

@ -0,0 +1,10 @@
--- libstdc++/configure.in.orig Sun Nov 1 20:05:25 1998
+++ libstdc++/configure.in Sun Nov 1 20:05:42 1998
@@ -49,6 +49,7 @@
*-*-irix[56]*) frags="${frags} irix5.ml" ;;
*-*-linux*aout*) ;;
*-*-linux*) frags="${frags} linux.ml" ;;
+ *-*-openbsd*) frags="${frags} openbsd.ml" ;;
*-*-sysv4*) frags="${frags} elf.ml" ;;
*-*-solaris*) frags="${frags} sol2shm.ml" ;;
*-*-sunos4*) frags="${frags} sunos4.ml" ;;

View File

@ -3,37 +3,57 @@
# Date created: 25 sep 98
# Whom: Marc Espie
#
# $OpenBSD: Makefile,v 1.3 1998/11/16 21:11:13 espie Exp $
# $OpenBSD: Makefile,v 1.4 1998/11/17 17:39:33 espie Exp $
#
# This is a configuration file for egcs, recent snapshot
# right now, we only configure i386, C and C++.
# PLEASE use the regular egcs-stable for serious work, resort to this one
# for experimentations and testing.
# Right now, we can only configure i386. Bound to change in the future
# we could remove this dependency by patching configure, but this is not
# reasonable...
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
CATEGORIES= lang
MAINTAINER= Marc.Espie@openbsd.org
# this will improve over time as more and more architectures are handled
ONLY_FOR_ARCHS = i386
# user configuration section
# user configuration
# see files/tests for precise testing procedure
MAKE_TESTS=yes
MAKE_GXX=yes
MAKE_FORTRAN=yes
MAKE_OBJC=yes
# these are broken, as of this snapshot...
#MAKE_CHILL=yes
# these are broken, as of 1998-11-09
MAKE_CHILL=yes
# java archive is truncated, objc too
#MAKE_OBJC=yes
#MAKE_JAVA=yes
#PATCH_DEBUG=yes
# this configuration allow for ONE level of diff-files
LATEST=19981109
LATEST_DATE=1998-11-09
#### fetch section
# configuration is built so that you can test the next snapshot easily,
# define NEXT_DATE to the next snapshot... you lose the ability to check
# md5 sums, though.
# NEXT_DATE=1998-11-20
#PATCH_DEBUG=yes
LATEST != echo ${LATEST_DATE} | sed -e s/-//g;
DIRECTORY=egcs/snapshots/%SUBDIR%/
.if defined(NEXT)
.if defined(NEXT_DATE)
NEXT != echo ${NEXT_DATE} | sed -e s/-//g;
DISTNAME= egcs-${NEXT}
.else
DISTNAME= egcs-${LATEST}
.endif
CATEGORIES= lang
MAINTAINER= Marc.Espie@openbsd.org
# getting the right archives where they should be
MASTER_SITE_SUBDIR=${LATEST}
@ -75,9 +95,14 @@ DISTFILES+=egcs-objc-${LATEST}${EXTRACT_SUFX}
DISTFILES+=egcs-chill-${LATEST}${EXTRACT_SUFX}
.endif
# to do: check egcs-stable mirror list for sites which carry snapshots
MASTER_SITES= ftp://egcs.cygnus.com/pub/${DIRECTORY} \
ftp://ftp.lip6.fr/pub/${DIRECTORY}
# add a possible next snapshot
.if defined(NEXT)
PATCHFILES=egcs-core-${LATEST}-${NEXT}.diff.gz
.if defined(MAKE_TESTS)
@ -107,50 +132,90 @@ PATCHFILES+=egcs-chill-${LATEST}-${NEXT}.diff.gz
.endif
# to do: check egcs-stable mirror list for sites which carry snapshots
# synch the date
.if defined(NEXT)
post-extract:
${MV} ${WRKDIR}/egcs-${LATEST} ${WRKSRC}
.endif
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
####
# Patch section
# this rigmarole is needed as all patches DON'T necessarily apply
# to every configuration
pre-patch:
-${RM} -f ${PATCHDIR}/*
-${MKDIR} ${PATCHDIR}
${CP} ${FILESDIR}/patches/patch-core-* ${PATCHDIR}
.if defined(MAKE_GXX)
${CP} ${FILESDIR}/patches/patch-g++-* ${PATCHDIR}
.endif
# get openbsd configuration files where they should be
post-patch:
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
-${RM} -rf ${WRKSRC}/texinfo
.if !defined(MAKE_CHILL)
-${RM} -rf ${WRKSRC}/gcc/ch
.endif
# will improve over time as more and more architectures are handled
ONLY_FOR_ARCHS = i386
GNU_CONFIGURE= yes
USE_GMAKE= yes
# don't make bootstrap if you're impatient/you know what you're doing
# use bootstrap-lean if you don't have room.
ALL_TARGET=bootstrap
####
# configure section
#
# define AS_PATH/LD_PATH is you don't want to use the default as/ld.
# This should not be used for regular releases, but if you're on this
# snapshot, you know what you're doing, don't you ?
CONFIGURE_SCRIPT=../source/configure
CONFIGURE_ENV=CFLAGS=-O2
CONFIGURE_ARGS= --prefix=${PREFIX} \
--verbose --with-gnu-ld --with-gnu-as \
--program-transform-name=s,^,e,
--verbose --program-transform-name=s,^,e,
.if defined(AS_PATH)
CONFIGURE_ARGS += --with-as=${AS_PATH}
.else
CONFIGURE_ARGS += --with-gnu-as
.endif
.if defined(LD_PATH)
CONFIGURE_ARGS += --with-ld=${LD_PATH}
.else
CONFIGURE_ARGS += --with-gnu-ld
.endif
.if (${MACHINE_ARCH} != "alpha")
CONFIGURE_ARGS+=--enable-shared
.endif
.if defined(NEXT)
post-extract:
mv ${WRKDIR}/egcs-${LATEST} ${WRKSRC}
.endif
# get openbsd configuration files where they should be
post-patch:
cp -R ${FILESDIR}/config/* ${WRKSRC}
rm -rf ${WRKSRC}/texinfo
# rebuild configure file after patching, then move file around !!!
# XXX: don't try to autoconf the main configure file, it's not autoconf.
# + kludge to build in a separate directory.
pre-configure:
cd ${WRKSRC}/gcc && autoconf
mv ${WRKSRC} ${WRKDIR}/source
mkdir ${WRKSRC}
# cd ${WRKSRC}/gcc && autoconf
-${MV} ${WRKSRC} ${WRKDIR}/source
${MKDIR} ${WRKSRC}
####
# build section
# should work without gmake. If it turns out to be needed, this is a bug
#USE_GMAKE= yes
# you shouldn't skip bootstrap unless you know what you're doing
# use bootstrap-lean if you don't have room.
ALL_TARGET=bootstrap
# ALL_TARGET=bootstrap-lean
####
# Install section
M4FLAGS=-Uinclude -DDISTNAME=${DISTNAME}
.if defined(MAKE_GXX)
@ -171,10 +236,10 @@ M4FLAGS+= -DDYNAMIC
pre-install:
m4 ${M4FLAGS} -DARCH=`${WRKDIR}/source/config.guess` \
-DVERSION=`sed -e 's/.*\(egcs-[0-9.]*\) .*/\1/' <${WRKDIR}/source/gcc/version.c` \
-DVERSION=`${SED} -e 's/.*\(egcs-[0-9.]*\) .*/\1/' <${WRKDIR}/source/gcc/version.c` \
<${FILESDIR}/PLIST.template >${PKGDIR}/PLIST
pre-clean:
-rm ${PKGDIR}/PLIST
-${RM} ${PKGDIR}/PLIST ${PATCHDIR}/*
.include <bsd.port.mk>

View File

@ -0,0 +1,68 @@
#include <m68k/m68k.h>
/* Get generic OpenBSD definitions. */
#include <openbsd.h>
/* See m68k.h. 7 means 68020 with 68881. */
#define TARGET_DEFAULT 7
/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
This will control the use of inline 68881 insns in certain macros. */
#undef CPP_SPEC
#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
/* Names to predefine in the preprocessor for this target machine. */
#define CPP_PREDEFINES "-Dunix -Dm68k -Dmc68000 -Dmc68020 -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(m68k) -Amachine(m68k)"
/* Make gcc agree with <machine/ansi.h> */
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* Every structure or union's size must be a multiple of 2 bytes. */
#define STRUCTURE_SIZE_BOUNDARY 16
/* This is BSD, so it wants DBX format. */
#define DBX_DEBUGGING_INFO
/* Do not break .stabs pseudos into continuations. */
#define DBX_CONTIN_LENGTH 0
/* This is the char to use for continuation (in case we need to turn
continuation back on). */
#define DBX_CONTIN_CHAR '?'
/* Don't use the `xsfoo;' construct in DBX output; this system
doesn't support it. */
#define DBX_NO_XREFS
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0

View File

@ -4,6 +4,4 @@ MD5 (egcs/egcs-g++-19981109.tar.gz) = 4f242afc45c8258a068f2bd305c69c61
MD5 (egcs/egcs-g++-tests-19981109.tar.gz) = a12924830e33565b7ca9af7636701b79
MD5 (egcs/egcs-g77-19981109.tar.gz) = 5d672c4261cfaffbf9dd6ab70b51f726
MD5 (egcs/egcs-g77-testsuite-19981109.tar.gz) = 1485cfe769b27512b17fd48491349b18
MD5 (egcs/egcs-java-19981109.tar.gz) = d9162b7f8dbf069f40077c494492694e
MD5 (egcs/egcs-objc-19981109.tar.gz) = 5ec0dac2be3b9eaa0474894841bb5e9c
MD5 (egcs/egcs-chill-19981109.tar.gz) = e574daed5262dc7fba86a6c0754f6ef6

View File

@ -0,0 +1,62 @@
--- gcc/configure.in.orig Sat Nov 7 14:00:02 1998
+++ gcc/configure.in Tue Nov 17 00:23:07 1998
@@ -1082,10 +1082,8 @@
fixincludes=fixinc.wrap
tmake_file=i386/t-freebsd
;;
- # We are hoping OpenBSD is still close enough to NetBSD that we can
- # share the configurations.
changequote(,)dnl
- i[34567]86-*-netbsd* | i[34567]86-*-openbsd*)
+ i[34567]86-*-netbsd*)
changequote([,])dnl
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
@@ -1093,6 +1091,16 @@
tmake_file=t-netbsd
;;
changequote(,)dnl
+ i[34567]86-*-openbsd*)
+changequote([,])dnl
+ tm_file=i386/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
+ ;;
+changequote(,)dnl
i[34567]86-*-coff*)
changequote([,])dnl
tm_file=i386/i386-coff.h
@@ -1947,6 +1955,15 @@
tmake_file=t-netbsd
float_format=m68k
;;
+ m68k*-*-openbsd*)
+ tm_file=m68k/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ float_format=m68k
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
+ ;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file="xm-alloca.h ${xm_file}"
xm_defines=USG
@@ -2916,6 +2933,14 @@
# On NetBSD, the headers are already okay, except for math.h.
fixincludes=fixinc.wrap
tmake_file=t-netbsd
+ ;;
+ sparc-*-openbsd*)
+ tm_file=sparc/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-openbsd
+ # XXX may need adding until the bug is fixed...
+ use_collect2=yes
;;
sparc-*-bsd*)
tm_file=sparc/bsd.h

View File

@ -0,0 +1,16 @@
--- gcc/cpp.texi.orig Sun Nov 1 20:10:10 1998
+++ gcc/cpp.texi Sun Nov 1 20:10:34 1998
@@ -1,11 +1,11 @@
\input texinfo
-@setfilename cpp.info
+@setfilename ecpp.info
@settitle The C Preprocessor
@ifinfo
@dircategory Programming
@direntry
-* Cpp: (cpp). The GNU C preprocessor.
+* ECpp: (ecpp). The experimental GNU C preprocessor.
@end direntry
@end ifinfo

View File

@ -0,0 +1,19 @@
--- gcc/gcc.texi.orig Sun Nov 1 20:04:09 1998
+++ gcc/gcc.texi Sun Nov 1 20:04:35 1998
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@setfilename gcc.info
+@setfilename egcc.info
@c @setfilename usegcc.info
@c @setfilename portgcc.info
@c To produce the full manual, use the "gcc.info" setfilename, and
@@ -82,7 +82,7 @@
@ifinfo
@dircategory Programming
@direntry
-* gcc: (gcc). The GNU C compiler.
+* egcc: (egcc). The experimental GNU C compiler.
@end direntry
@ifset INTERNALS
@ifset USING

View File

@ -0,0 +1,75 @@
--- gcc/Makefile.in.orig Sun Nov 1 20:06:26 1998
+++ gcc/Makefile.in Sun Nov 1 20:09:30 1998
@@ -459,6 +459,10 @@
PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t`
UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t`
+# documentation for cpp should not supersede default documentation
+CPP_INFO_NAME = `t='$(program_transform_name)'; echo cpp | sed -e $$t`
+CPP_MAN_NAME = `t='$(program_transform_name)'; echo cccp | sed -e $$t`
+
# Actual name to use when installing a cross-compiler.
GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
PROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo protoize | sed -e $$t`
@@ -2163,12 +2167,14 @@
info: cpp.info gcc.info lang.info
cpp.info: $(srcdir)/cpp.texi
- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi
+ $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o $(CPP_INFO_NAME).info \
+ $(srcdir)/cpp.texi && touch $@
gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
$(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
$(srcdir)/tm.texi $(srcdir)/gcov.texi
- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi
+ $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o $(GCC_INSTALL_NAME).info \
+ $(srcdir)/gcc.texi && touch $@
dvi: gcc.dvi cpp.dvi lang.dvi
@@ -2309,6 +2315,7 @@
-rm -f cexp.c cexp.output TAGS
-rm -f cpp.info* cpp.??s cpp.*aux
-rm -f gcc.info* gcc.??s gcc.*aux
+ -rm -f $(GCC_INSTALL_NAME).info* $(CPP_INFO_NAME).info*
#
# Entry points `install' and `uninstall'.
# Also use `install-collect2' to install collect2 when the config files don't.
@@ -2447,18 +2454,19 @@
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
install-info: doc installdirs lang.install-info
- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
- for f in cpp.info* gcc.info*; do \
+ -rm -f $(infodir)/$(CPP_INFO_NAME).info* \
+ $(infodir)/$(GCC_INSTALL_NAME).info*
+ for f in $(GCC_INSTALL_NAME).info* $(CPP_INFO_NAME).info*; do \
$(INSTALL_DATA) $$f $(infodir)/$$f; \
done
-if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
if [ -f $(infodir)/dir ] ; then \
- for f in cpp.info gcc.info; do \
+ for f in $(GCC_INSTALL_NAME).info $(CPP_INFO_NAME).info; do \
install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \
done; \
else true; fi; \
else true; fi;
- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
+ -chmod a-x $(infodir)/$(CPP_INFO_NAME).info* $(infodir)/$(GCC_INSTALL_NAME).info*
# Install the man pages.
install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
@@ -2471,9 +2479,9 @@
$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
fi
- -rm -f $(mandir)/cccp$(manext)
- -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
- -chmod a-x $(mandir)/cccp$(manext)
+ -rm -f $(mandir)/$(CPP_MAN_NAME)$(manext)
+ -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/$(CPP_MAN_NAME)$(manext)
+ -chmod a-x $(mandir)/$(CPP_MAN_NAME)$(manext)
# Install the library.
install-libgcc: libgcc.a installdirs

View File

@ -0,0 +1,10 @@
--- libstdc++/configure.in.orig Sun Nov 1 20:05:25 1998
+++ libstdc++/configure.in Sun Nov 1 20:05:42 1998
@@ -49,6 +49,7 @@
*-*-irix[56]*) frags="${frags} irix5.ml" ;;
*-*-linux*aout*) ;;
*-*-linux*) frags="${frags} linux.ml" ;;
+ *-*-openbsd*) frags="${frags} openbsd.ml" ;;
*-*-sysv4*) frags="${frags} elf.ml" ;;
*-*-solaris*) frags="${frags} sol2shm.ml" ;;
*-*-sunos4*) frags="${frags} sunos4.ml" ;;