aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2005-10-31 16:01:29 +0800
committerobrien <obrien@FreeBSD.org>2005-10-31 16:01:29 +0800
commit9cdee82e507b9af8d5f77acf0d6452aeb8ec8d7e (patch)
treead59cf5e9dd174fd5fb90d869b56153620a91b98 /lang
parent7eda32b20143582b13a5d587d6837b7ef7034279 (diff)
downloadfreebsd-ports-gnome-9cdee82e507b9af8d5f77acf0d6452aeb8ec8d7e.tar.gz
freebsd-ports-gnome-9cdee82e507b9af8d5f77acf0d6452aeb8ec8d7e.tar.zst
freebsd-ports-gnome-9cdee82e507b9af8d5f77acf0d6452aeb8ec8d7e.zip
Support FreeBSD 7.
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc33/Makefile5
-rw-r--r--lang/gcc33/files/freebsd7.h23
-rw-r--r--lang/gcc33/files/patch-config.gcc10
-rw-r--r--lang/gcc33/files/patch-freebsd-spec.h11
4 files changed, 46 insertions, 3 deletions
diff --git a/lang/gcc33/Makefile b/lang/gcc33/Makefile
index 7efcec434448..514830a76c38 100644
--- a/lang/gcc33/Makefile
+++ b/lang/gcc33/Makefile
@@ -8,6 +8,7 @@
PORTNAME= gcc
PORTVERSION= 3.3.6
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang
VERSIONSTRING= ${PORTVERSION}
@@ -37,9 +38,6 @@ NOMANCOMPRESS= yes # too hard to deal with differences on 5-cur and releng4
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700000
-IGNORE= does not support FreeBSD 7.x and above
-.endif
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
BROKEN= "Bus errors in stage2; system compiler may be broken."
@@ -84,6 +82,7 @@ post-patch:
pre-configure:
cd ${SRCDIR} ; contrib/gcc_update --touch
+ @${LN} -sf ${FILESDIR}/freebsd7.h ${SRCDIR}/gcc/config
@${RM} -f ${SRCDIR}/gcc/*/*.info*
@${MKDIR} ${CONFIGURE_WRKSRC}
diff --git a/lang/gcc33/files/freebsd7.h b/lang/gcc33/files/freebsd7.h
new file mode 100644
index 000000000000..72f243243c13
--- /dev/null
+++ b/lang/gcc33/files/freebsd7.h
@@ -0,0 +1,23 @@
+/* FreeBSD version number setting for FreeBSD 7.x systems.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
+ Copyright (C) 2005 David E. O'Brien.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define FBSD_MAJOR 7
diff --git a/lang/gcc33/files/patch-config.gcc b/lang/gcc33/files/patch-config.gcc
new file mode 100644
index 000000000000..d7615fb4d7ac
--- /dev/null
+++ b/lang/gcc33/files/patch-config.gcc
@@ -0,0 +1,10 @@
+--- gcc/config.gcc.orig Wed Apr 28 21:42:47 2004
++++ gcc/config.gcc Sun Oct 30 21:08:57 2005
+@@ -475,6 +475,7 @@ case $machine in
+ *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";;
+ *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";;
+ *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
++ *-*-freebsd7 | *-*-freebsd[7].*) fbsd_tm_file="freebsd7.h";;
+ *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
+ esac
+ tmake_file="t-slibgcc-elf-ver t-freebsd"
diff --git a/lang/gcc33/files/patch-freebsd-spec.h b/lang/gcc33/files/patch-freebsd-spec.h
new file mode 100644
index 000000000000..abb506655e14
--- /dev/null
+++ b/lang/gcc33/files/patch-freebsd-spec.h
@@ -0,0 +1,11 @@
+--- gcc/config/freebsd-spec.h.orig Thu Jan 13 18:06:26 2005
++++ gcc/config/freebsd-spec.h Sun Oct 30 21:22:05 2005
+@@ -59,6 +59,8 @@ Boston, MA 02111-1307, USA. */
+ builtin_define ("__FreeBSD__=4"); \
+ else if (FBSD_MAJOR == 3) \
+ builtin_define ("__FreeBSD__=3"); \
++ else if (FBSD_MAJOR == 7) \
++ builtin_define ("__FreeBSD__=7"); \
+ else \
+ builtin_define ("__FreeBSD__"); \
+ builtin_define_std ("unix"); \