summaryrefslogtreecommitdiff
path: root/lang/gcc3-c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gcc3-c')
-rw-r--r--lang/gcc3-c/DESCR15
-rw-r--r--lang/gcc3-c/Makefile15
-rw-r--r--lang/gcc3-c/Makefile.common39
-rw-r--r--lang/gcc3-c/buildaddon.mk23
-rw-r--r--lang/gcc3-c/buildlink2.mk40
-rw-r--r--lang/gcc3-c/buildlink3.mk25
-rw-r--r--lang/gcc3-c/language.mk12
7 files changed, 102 insertions, 67 deletions
diff --git a/lang/gcc3-c/DESCR b/lang/gcc3-c/DESCR
index bef410282ba..e4ee87edaaf 100644
--- a/lang/gcc3-c/DESCR
+++ b/lang/gcc3-c/DESCR
@@ -1,14 +1,3 @@
-This directory contains the GNU Compiler Collection (GCC) version 3.3.
-It includes all of the support for compiling C, C++, Objective C, Fortran,
-Java, and Chill.
+The GNU Compiler Collection (GCC) version 3.x.
-The GNU Compiler Collection is free software. See the file COPYING for copying
-permission.
-
-See the file gcc.texi (together with other files that it includes) for
-installation and porting information. The file INSTALL contains a
-copy of the installation information, as plain ASCII.
-
-See the Bugs chapter of the GCC Manual for how to report bugs
-usefully. An online readable version of the manual is in the files
-gcc.info*.
+This package includes support for compiling the C language.
diff --git a/lang/gcc3-c/Makefile b/lang/gcc3-c/Makefile
index 400723ca9ef..794cc639caf 100644
--- a/lang/gcc3-c/Makefile
+++ b/lang/gcc3-c/Makefile
@@ -1,16 +1,19 @@
-# $NetBSD: Makefile,v 1.7 2003/08/11 14:16:00 drochner Exp $
-#
+# $NetBSD: Makefile,v 1.8 2004/02/01 14:05:46 jlam Exp $
-PKGNAME= gcc3${GCC3_PKGMODIF}-c-${GCC_VERSION}
-COMMENT= GNU Compiler Collection, version 3, C compiler
+PKGNAME= gcc3${GCC3_PKGMODIF}-c-${GCC_VERSION}
+COMMENT= GNU Compiler Collection, v3 - C compiler
INFO_FILES= cpp.info gcc.info gccint.info cppinternals.info
.include "Makefile.common"
-# the "gcc" frontend knows all languages (by patch)
+# The "gcc" frontend knows all languages (by patch)
CONFIGURE_ARGS+= --enable-languages=c
-PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+
+.if empty(CC_VERSION:Mgcc-*)
+ALL_TARGET= bootstrap
+.endif
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
diff --git a/lang/gcc3-c/Makefile.common b/lang/gcc3-c/Makefile.common
index e3c5b0e4945..d1c110f6fcf 100644
--- a/lang/gcc3-c/Makefile.common
+++ b/lang/gcc3-c/Makefile.common
@@ -1,5 +1,4 @@
-# $NetBSD: Makefile.common,v 1.8 2004/01/24 13:51:14 grant Exp $
-#
+# $NetBSD: Makefile.common,v 1.9 2004/02/01 14:05:47 jlam Exp $
GCC_VERSION= 3.3.2
DISTNAME= gcc-${GCC_VERSION}
@@ -12,15 +11,15 @@ HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
NOT_FOR_PLATFORM= Darwin-*-*
-USE_BUILDLINK2= YES
-USE_PKGINSTALL= YES
+USE_BUILDLINK3= yes
+USE_PKGINSTALL= yes
USE_GNU_TOOLS+= make
-HAS_CONFIGURE= YES
+HAS_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
# Make location overridable, to allow ping-pong bootstraps.
-GCC3_DEFAULT_SUBPREFIX= gcc3
+GCC3_DEFAULT_SUBPREFIX= gcc3
GCC3_INSTALLTO_SUBPREFIX?= ${GCC3_DEFAULT_SUBPREFIX}
.if ${GCC3_INSTALLTO_SUBPREFIX} != ${GCC3_DEFAULT_SUBPREFIX}
GCC3_PKGMODIF= _${GCC3_INSTALLTO_SUBPREFIX}
@@ -43,9 +42,7 @@ INFO_DIR= ${GCC_SUBPREFIX}/info
.if ${OPSYS} == "NetBSD" && exists(/usr/include/pthread.h)
GCC_PLATFORM= ${MACHINE_GNU_ARCH}--netbsdelf2.0
PTHREAD_OPTS+= require native
-.include "../../mk/pthread.buildlink2.mk"
-CPPFLAGS+= -I${BUILDLINK_DIR}/include
-CFLAGS+= -I${BUILDLINK_DIR}/include
+. include "../../mk/pthread.buildlink3.mk"
.else
GCC_PLATFORM= ${MACHINE_GNU_PLATFORM}
.endif
@@ -53,31 +50,23 @@ CONFIGURE_ARGS+= --host=${GCC_PLATFORM}
PLIST_SUBST+= GCC_PLATFORM=${GCC_PLATFORM}
.if ${OPSYS} == "NetBSD" && !defined(USE_BINUTILS)
-AS_VERSION!= ${AS} --version | ${AWK} '{ \
- split($$3, v, /[.]/); \
- printf "%02d%02d%02d%02d\n",v[1],v[2],v[3],v[4]; \
- exit; \
- }'
-USE_BINUTILS!= ${TEST} ${AS_VERSION} -lt 02130201 && echo YES || echo NO
+AS_VERSION!= ${AS} --version | ${AWK} '{ \
+ split($$3, v, /[.]/); \
+ printf "%02d%02d%02d%02d\n",v[1],v[2],v[3],v[4]; \
+ exit; \
+ }'
+USE_BINUTILS!= ${TEST} ${AS_VERSION} -lt 02130201 && echo YES || echo NO
.endif
-.if defined(USE_BINUTILS) && ${USE_BINUTILS} == "YES"
+.if defined(USE_BINUTILS) && !empty(USE_BINUTILS:M[yY][eE][sS])
DEPENDS= binutils>=2.13.2.1:../../devel/binutils
CONFIGURE_ARGS+= --with-as=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/as
-#. include "../../devel/binutils/buildlink2.mk"
.endif
-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --enable-shared
.else
-. if ${OPSYS} == "SunOS"
-CONFIGURE_ARGS+= --enable-shared
-. else
CONFIGURE_ARGS+= --disable-shared
-. endif
-. if ${CC:M*gcc*} == ""
-ALL_TARGET= bootstrap
-. endif
.endif
GCC_ARCHSUBDIR= ${GCC_SUBPREFIX}/lib/gcc-lib/${GCC_PLATFORM}/${GCC_VERSION}
diff --git a/lang/gcc3-c/buildaddon.mk b/lang/gcc3-c/buildaddon.mk
deleted file mode 100644
index 8c170334b4e..00000000000
--- a/lang/gcc3-c/buildaddon.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# $NetBSD: buildaddon.mk,v 1.6 2003/12/03 11:28:55 drochner Exp $
-
-.include "../../lang/gcc3-c/Makefile.common"
-
-pre-build:
- (cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} tconfig.h)
- ${LN} -sf ${GCC_PREFIX}/lib/libiberty.a ${WRKSRC}/libiberty
- ${LN} -sf ${GCC_PREFIX}/bin/gcc ${WRKSRC}/gcc/xgcc
-
-BUILDLINK_DEPENDS.gcc3c?= gcc3${GCC3_PKGMODIF}-c-3.3.2
-BUILDLINK_PKGSRCDIR.gcc3c?= ../../lang/gcc3-c
-
-BUILDLINK_PREFIX.gcc3c= ${LOCALBASE}
-
-BUILDLINK_PACKAGES+= gcc3c
-
-BUILDLINK_FILES.gcc3c+= ${GCC_ARCHSUBDIR}/libgcc.a
-BUILDLINK_FILES.gcc3c+= ${GCC_ARCHSUBDIR}/libgcc_eh.a
-BUILDLINK_FILES.gcc3c+= ${GCC_SUBPREFIX}/lib/libgcc_s.*
-
-BUILDLINK_TARGETS+= gcc3c-buildlink
-
-gcc3c-buildlink: _BUILDLINK_USE
diff --git a/lang/gcc3-c/buildlink2.mk b/lang/gcc3-c/buildlink2.mk
new file mode 100644
index 00000000000..04f018e2a73
--- /dev/null
+++ b/lang/gcc3-c/buildlink2.mk
@@ -0,0 +1,40 @@
+# $NetBSD: buildlink2.mk,v 1.3 2004/02/01 14:05:47 jlam Exp $
+
+.if !defined(GCC3C_BUILDLINK2_MK)
+GCC3C_BUILDLINK2_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(GCC3_INSTALLTO_SUBPREFIX)
+GCC3_PKGMODIF= _${GCC3_INSTALLTO_SUBPREFIX}
+.endif
+BUILDLINK_PACKAGES+= gcc3c
+BUILDLINK_DEPENDS.gcc3c?= gcc3${GCC3_PKGMODIF}-c>=${_GCC_REQD}
+BUILDLINK_PKGSRCDIR.gcc3c?= ../../lang/gcc3-c
+
+# Packages that link against gcc shared libraries need a full
+# dependency.
+#
+.if defined(USE_GCC_SHLIB)
+BUILDLINK_DEPMETHOD.gcc3c+= full
+.else
+BUILDLINK_DEPMETHOD.gcc3c?= build
+.endif
+
+BUILDLINK_PREFIX.gcc3c= ${LOCALBASE}
+BUILDLINK_WRAPPER_ENV+= \
+ COMPILER_PATH="${BUILDLINK_DIR}/bin"; export COMPILER_PATH
+
+BUILDLINK_FILES.gcc3c= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/include/*/*/*/*
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/include/*/*/*
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/include/*/*
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/include/*
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/lib*.*
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}lib/gcc-lib/*/*/specs
+BUILDLINK_FILES.gcc3c+= ${_GCC_SUBPREFIX}/lib/libgcc_s.*
+
+BUILDLINK_TARGETS+= gcc3c-buildlink
+
+gcc3c-buildlink: _BUILDLINK_USE
+
+.endif # GCC3C_BUILDLINK2_MK
diff --git a/lang/gcc3-c/buildlink3.mk b/lang/gcc3-c/buildlink3.mk
new file mode 100644
index 00000000000..7fceca06919
--- /dev/null
+++ b/lang/gcc3-c/buildlink3.mk
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/02/01 14:05:47 jlam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+GCC3C_BUILDLINK3_MK:= ${GCC3C_BUILDLINK3_MK}+
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(GCC3C_BUILDLINK3_MK:M+)
+. if defined(GCC3_INSTALLTO_SUBPREFIX)
+GCC3_PKGMODIF= _${GCC3_INSTALLTO_SUBPREFIX}
+. endif
+BUILDLINK_PACKAGES+= gcc3c
+BUILDLINK_DEPENDS+= gcc3c
+BUILDLINK_DEPENDS.gcc3c+= gcc3${GCC3_PKGMODIF}-c>=${_GCC_REQD}
+BUILDLINK_PKGSRCDIR.gcc3c?= ../../lang/gcc3-c
+
+# Packages that link against shared libraries need a full dependency.
+. if defined(USE_GCC_SHLIB)
+BUILDLINK_DEPMETHOD.gcc3c+= full
+. else
+BUILDLINK_DEPMETHOD.gcc3c?= build
+. endif
+.endif # GCC3C_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/lang/gcc3-c/language.mk b/lang/gcc3-c/language.mk
new file mode 100644
index 00000000000..bdaf0391dfd
--- /dev/null
+++ b/lang/gcc3-c/language.mk
@@ -0,0 +1,12 @@
+# $NetBSD: language.mk,v 1.1 2004/02/01 14:05:47 jlam Exp $
+
+GCC_REQD+= ${GCC_VERSION}
+
+.include "../../lang/gcc3-c/Makefile.common"
+
+BUILDLINK_DEPMETHOD.gcc3c+= full
+
+pre-build:
+ cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} tconfig.h
+ ${LN} -sf ${GCC_PREFIX}/lib/libiberty.a ${WRKSRC}/libiberty
+ ${LN} -sf ${GCC_PREFIX}/bin/gcc ${WRKSRC}/gcc/xgcc