head	1.51;
access;
symbols
	pkgsrc-2013Q2:1.51.0.8
	pkgsrc-2013Q2-base:1.51
	pkgsrc-2012Q4:1.51.0.6
	pkgsrc-2012Q4-base:1.51
	pkgsrc-2011Q4:1.51.0.4
	pkgsrc-2011Q4-base:1.51
	pkgsrc-2011Q2:1.51.0.2
	pkgsrc-2011Q2-base:1.51
	pkgsrc-2009Q4:1.50.0.6
	pkgsrc-2009Q4-base:1.50
	pkgsrc-2009Q3:1.50.0.4
	pkgsrc-2009Q3-base:1.50
	pkgsrc-2009Q2:1.50.0.2
	pkgsrc-2009Q2-base:1.50
	pkgsrc-2009Q1:1.49.0.12
	pkgsrc-2009Q1-base:1.49
	pkgsrc-2008Q4:1.49.0.10
	pkgsrc-2008Q4-base:1.49
	pkgsrc-2008Q3:1.49.0.8
	pkgsrc-2008Q3-base:1.49
	cube-native-xorg:1.49.0.6
	cube-native-xorg-base:1.49
	pkgsrc-2008Q2:1.49.0.4
	pkgsrc-2008Q2-base:1.49
	cwrapper:1.49.0.2
	pkgsrc-2008Q1:1.48.0.8
	pkgsrc-2008Q1-base:1.48
	pkgsrc-2007Q4:1.48.0.6
	pkgsrc-2007Q4-base:1.48
	pkgsrc-2007Q3:1.48.0.4
	pkgsrc-2007Q3-base:1.48
	pkgsrc-2007Q2:1.48.0.2
	pkgsrc-2007Q2-base:1.48
	pkgsrc-2007Q1:1.47.0.6
	pkgsrc-2007Q1-base:1.47
	pkgsrc-2006Q4:1.47.0.4
	pkgsrc-2006Q4-base:1.47
	pkgsrc-2006Q3:1.47.0.2
	pkgsrc-2006Q3-base:1.47
	pkgsrc-2006Q2:1.45.0.4
	pkgsrc-2006Q2-base:1.45
	pkgsrc-2006Q1:1.45.0.2
	pkgsrc-2006Q1-base:1.45
	pkgsrc-2005Q4:1.41.0.2
	pkgsrc-2005Q4-base:1.41
	pkgsrc-2005Q3:1.37.0.2
	pkgsrc-2005Q3-base:1.37
	pkgsrc-2005Q2:1.36.0.2
	pkgsrc-2005Q2-base:1.36
	pkgsrc-2005Q1:1.34.0.4
	pkgsrc-2005Q1-base:1.34
	pkgsrc-2004Q4:1.34.0.2
	pkgsrc-2004Q4-base:1.34
	pkgsrc-2004Q3:1.33.0.4
	pkgsrc-2004Q3-base:1.33
	pkgsrc-2004Q2:1.33.0.2
	pkgsrc-2004Q2-base:1.33
	pkgsrc-2004Q1:1.32.0.2
	pkgsrc-2004Q1-base:1.32
	pkgsrc-2003Q4:1.29.0.2
	pkgsrc-2003Q4-base:1.29
	netbsd-1-6-1:1.18.0.2
	netbsd-1-6-1-base:1.18
	netbsd-1-6:1.14.0.4
	netbsd-1-6-RELEASE-base:1.14
	pkgviews:1.13.0.2
	pkgviews-base:1.13
	buildlink2:1.11.0.2
	buildlink2-base:1.12
	netbsd-1-5-PATCH003:1.11;
locks; strict;
comment	@# @;


1.51
date	2010.02.10.17.11.36;	author joerg;	state dead;
branches;
next	1.50;

1.50
date	2009.06.14.22.58.01;	author joerg;	state Exp;
branches;
next	1.49;

1.49
date	2008.05.26.02.13.21;	author joerg;	state Exp;
branches;
next	1.48;

1.48
date	2007.06.12.22.00.39;	author joerg;	state Exp;
branches;
next	1.47;

1.47
date	2006.09.27.15.46.11;	author abs;	state Exp;
branches;
next	1.46;

1.46
date	2006.07.27.18.48.02;	author jlam;	state Exp;
branches;
next	1.45;

1.45
date	2006.03.20.18.15.38;	author jlam;	state Exp;
branches;
next	1.44;

1.44
date	2006.03.04.21.29.54;	author jlam;	state Exp;
branches;
next	1.43;

1.43
date	2006.02.05.23.09.44;	author joerg;	state Exp;
branches;
next	1.42;

1.42
date	2005.12.29.06.21.45;	author jlam;	state Exp;
branches;
next	1.41;

1.41
date	2005.12.05.23.55.09;	author rillig;	state Exp;
branches;
next	1.40;

1.40
date	2005.12.05.20.50.25;	author rillig;	state Exp;
branches;
next	1.39;

1.39
date	2005.11.09.21.25.39;	author tv;	state Exp;
branches;
next	1.38;

1.38
date	2005.09.28.14.31.07;	author rillig;	state Exp;
branches;
next	1.37;

1.37
date	2005.06.24.17.17.51;	author kristerw;	state Exp;
branches;
next	1.36;

1.36
date	2005.05.22.20.08.09;	author jlam;	state Exp;
branches;
next	1.35;

1.35
date	2005.04.11.21.46.13;	author tv;	state Exp;
branches;
next	1.34;

1.34
date	2004.12.03.15.15.00;	author wiz;	state Exp;
branches;
next	1.33;

1.33
date	2004.05.09.02.26.14;	author snj;	state Exp;
branches;
next	1.32;

1.32
date	2004.02.19.17.53.29;	author kristerw;	state Exp;
branches;
next	1.31;

1.31
date	2004.01.24.13.51.14;	author grant;	state Exp;
branches;
next	1.30;

1.30
date	2004.01.02.19.22.14;	author cjep;	state Exp;
branches;
next	1.29;

1.29
date	2003.09.01.10.13.10;	author cjep;	state Exp;
branches;
next	1.28;

1.28
date	2003.08.09.12.43.01;	author seb;	state Exp;
branches;
next	1.27;

1.27
date	2003.07.17.21.44.25;	author grant;	state Exp;
branches;
next	1.26;

1.26
date	2003.07.06.12.37.25;	author grant;	state Exp;
branches;
next	1.25;

1.25
date	2003.07.06.12.31.57;	author grant;	state Exp;
branches;
next	1.24;

1.24
date	2003.06.02.01.19.04;	author jschauma;	state Exp;
branches;
next	1.23;

1.23
date	2003.05.11.22.02.52;	author jmc;	state Exp;
branches;
next	1.22;

1.22
date	2003.04.27.11.53.56;	author cjep;	state Exp;
branches;
next	1.21;

1.21
date	2003.04.10.20.10.17;	author grant;	state Exp;
branches;
next	1.20;

1.20
date	2003.04.10.01.28.19;	author grant;	state Exp;
branches;
next	1.19;

1.19
date	2003.03.29.12.41.25;	author jmmv;	state Exp;
branches;
next	1.18;

1.18
date	2002.10.22.06.59.27;	author kent;	state Exp;
branches;
next	1.17;

1.17
date	2002.10.20.00.37.46;	author wiz;	state Exp;
branches;
next	1.16;

1.16
date	2002.10.16.04.30.53;	author kent;	state Exp;
branches;
next	1.15;

1.15
date	2002.10.05.21.11.03;	author dmcmahill;	state Exp;
branches;
next	1.14;

1.14
date	2002.08.17.01.27.41;	author dmcmahill;	state Exp;
branches;
next	1.13;

1.13
date	2002.07.13.10.08.49;	author kent;	state Exp;
branches;
next	1.12;

1.12
date	2002.05.14.14.01.34;	author yyamano;	state Exp;
branches;
next	1.11;

1.11
date	2002.04.05.19.20.53;	author kent;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2002.03.29.10.47.58;	author kent;	state Exp;
branches;
next	1.9;

1.9
date	2002.03.28.13.57.17;	author kent;	state Exp;
branches;
next	1.8;

1.8
date	2002.03.05.06.13.21;	author jmc;	state Exp;
branches;
next	1.7;

1.7
date	2002.02.16.14.46.20;	author kent;	state Exp;
branches;
next	1.6;

1.6
date	2002.01.04.05.57.22;	author kent;	state Exp;
branches;
next	1.5;

1.5
date	2001.11.29.01.12.39;	author hubertf;	state Exp;
branches;
next	1.4;

1.4
date	2001.09.27.23.18.17;	author jlam;	state Exp;
branches;
next	1.3;

1.3
date	2001.07.04.02.31.44;	author kent;	state Exp;
branches;
next	1.2;

1.2
date	2001.06.30.16.16.11;	author kent;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.22.13.54.34;	author kent;	state Exp;
branches;
next	;

1.11.2.1
date	2002.06.23.18.50.20;	author jlam;	state Exp;
branches;
next	;


desc
@@


1.51
log
@Retire gcc-ssp.
@
text
@# $NetBSD: Makefile,v 1.50 2009/06/14 22:58:01 joerg Exp $

DISTNAME=		gcc-2.95.3
PKGNAME=		gcc-ssp-2.95.3.13
PKGREVISION=		4
CATEGORIES=		lang security
MASTER_SITES=		${MASTER_SITE_GNU:=gcc/}

MAINTAINER=		pkgsrc-users@@NetBSD.org
HOMEPAGE=		http://www.trl.ibm.com/projects/security/ssp/
COMMENT=		GNU Compiler Collection with Stack-smashing protection

PATCH_SITES=		${MASTER_SITE_LOCAL}
PATCHFILES=		gcc-2.95.3-diff-2002-08-29.gz

SSP_PATCH=		protector-2.95.3-13.tar.gz
DISTFILES+=		${DISTNAME}.tar.gz ${SSP_PATCH}
SITES.protector-2.95.3-13.tar.gz=	http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/

PATCHDIR=		${.CURDIR}/../gcc/patches
GCC_FILESDIR=		${.CURDIR}/../gcc/files

#ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-sparc
#
# Build error for NetBSD/alpha
#NOT_FOR_PLATFORM=	NetBSD-*-alpha \
#			NetBSD-*-powerpc NetBSD-*-macppc \
#			NetBSD-*-prep NetBSD-*-bebox NetBSD-*-ofppc \
#			NetBSD-*-amigappc NetBSD-*-sandpoint
NOT_FOR_PLATFORM=	Interix-*-* *-*-x86_64 DragonFly-*-*

USE_TOOLS+=		gmake

HAS_CONFIGURE=		YES
CONFIGURE_SCRIPT=	${WRKSRC}/configure
CONFIGURE_ARGS+=	--host=${MACHINE_GNU_PLATFORM:Q}
CONFIGURE_ARGS+=	--prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+=	--enable-shared

USE_TOOLS+=		chmod pax
MAKE_ENV+=		ac_cv_prog_chmod=${TOOLS_CHMOD:Q}
MAKE_ENV+=		SHELL=${CONFIG_SHELL}

CONFIGURE_DIRS=		${WRKDIR}/objdir
BUILD_DIRS=		${CONFIGURE_DIRS}

FILES_SUBST+=		PKGNAME_NOREV=${PKGNAME_NOREV:Q}		\
			GCC_PREFIX=${GCC_PREFIX:Q}
PLIST_SUBST+=		GCC_PREFIX=${GCC_PREFIX:S|^${PREFIX}/||:Q}
MESSAGE_SUBST+=		PKGNAME_NOREV=${PKGNAME_NOREV}

INFO_FILES=		# PLIST

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
.  if ${CC:M*gcc*} == ""
BUILD_TARGET=		bootstrap
.  endif
# we know it's a GNU toolchain on Linux and the BSDs.
.elif ${OPSYS:M*BSD} != "" || ${OPSYS} == "Linux"
CONFIGURE_ARGS+=	--with-gnu-as
CONFIGURE_ARGS+=	--with-gnu-ld
.else
# play it safe, force a bootstrap build if we don't know for sure it
# is gcc.
.  if ${CC:M*gcc*} == ""
BUILD_TARGET=		bootstrap
.  endif
.endif

GCC_PREFIX=	${PREFIX}/${PKGNAME_NOREV}
GCC_VERSION=	${DISTNAME:C/^.*-//}
GCC_ARCHDIR=	${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}
PLIST_SRC=	${WRKDIR}/PLIST_DYNAMIC

post-extract:
	${MKDIR} ${WRKSRC}
	${CP} ${GCC_FILESDIR}/xm-netbsd.h ${WRKSRC}/gcc/config
	${CP} ${GCC_FILESDIR}/xm-target64.h ${WRKSRC}/gcc/config
	for file in ${GCC_FILESDIR}/*_* ; do \
		arch=`${BASENAME} $${file} | ${SED} -e "s/_.*//"`;	\
		dest=`${BASENAME} $${file} | ${SED} -e "s/$${arch}_//"`; \
		${MKDIR} ${WRKSRC}/gcc/config/$${arch};			\
		${CP} $${file} ${WRKSRC}/gcc/config/$${arch}/$${dest};	\
	done; \
	${RM} ${WRKSRC}/gcc/config/alpha/netbsd-elf.h
	${RM} ${WRKSRC}/gcc/config/arm/t-netbsd
	${RM} ${WRKSRC}/gcc/config/mips/x-netbsd
	${RM} ${WRKSRC}/libf2c/libF77/dtime_.c
	${RM} ${WRKSRC}/libf2c/libF77/etime_.c

post-patch:
	cd ${WRKDIR} && pax -O -zrf ${_DISTDIR}/${SSP_PATCH}
	${CP} ${WRKDIR}/protector.c ${WRKDIR}/protector.h ${WRKSRC}/gcc/
	${PATCH} -p0 -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protector.dif
	${PATCH} -p0 -d ${WRKSRC} --forward --quiet -E < ${WRKDIR}/protectonly.dif

pre-configure:
	${MKDIR} ${BUILD_DIRS}
	cd ${WRKSRC} && contrib/egcs_update --touch

post-build:
	@@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc.mk > ${WRKDIR}/gcc.mk
.if ${OPSYS} != "SunOS"
	@@${ECHO} "===> Check whether stack protection works or not"
	${BUILD_DIRS}/gcc/xgcc -B${BUILD_DIRS}/gcc/ -O2 -o ${WRKDIR}/buffer ${FILESDIR}/buffer.c
	ulimit -c 0 && ${WRKDIR}/buffer abcdefghijklmnopqrstuvwxyz  2> ${WRKDIR}/output || ${TRUE}
	@@if [ x"`${CAT} ${WRKDIR}/output`" = "x: stack smashing attack in function main" ]; then \
	    ${ECHO} "===> Stack protection succeeded."; \
	    exit 0; \
	else \
	    ${ECHO} "**** Stack protection failed."; \
	    exit 1; \
	fi
.endif

.if ${OPSYS} == "SunOS"
#
# remove empty file and directories that show up when one does:
#       make install; make deinstall; make install
#
post-install:
	-cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
.else
post-install:
.  if exists(/usr/include/g++/FlexLexer.h)
	${LN} -fs /usr/include/g++/FlexLexer.h				\
		${GCC_PREFIX}/include/g++-3/FlexLexer.h
.  endif
	 ${RM} -f ${GCC_ARCHDIR}/include/curses.h ${GCC_PREFIX}/bin/cc
.endif
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${PKGNAME_NOREV}
	${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/share/examples/${PKGNAME_NOREV}/mk.conf
	${LN} -s gcc ${GCC_PREFIX}/bin/cc
	${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
	${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print		\
		| ${SORT} | ${SED} -e "s,${PREFIX}/,,g"			\
		>> ${PLIST_SRC}

.include "../../mk/bsd.pkg.mk"

# Make bootstrap with compiler != gcc possible.
LDFLAGS=		${_STRIPFLAG_CC}
@


1.50
log
@Remove @@dirrm related logic.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.49 2008/05/26 02:13:21 joerg Exp $
@


1.49
log
@Second round of explicit pax dependencies. As reminded by tnn@@,
many packages used to use ${PAX}. Use the common way of directly calling
pax, it is created as tool after all.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.48 2007/06/12 22:00:39 joerg Exp $
a139 3
	${FIND} ${GCC_PREFIX} -type d -print				\
		| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@@dirrm ,g"	\
		>> ${PLIST_SRC}
@


1.48
log
@Doesn't support TLS and is therefore pretty much useless on DragonFly.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.47 2006/09/27 15:46:11 abs Exp $
d40 1
a40 1
USE_TOOLS+=		chmod
d94 1
a94 1
	cd ${WRKDIR} && ${PAX} -O -zrf ${_DISTDIR}/${SSP_PATCH}
@


1.47
log
@Set MAKE_ENV+=SHELL=${CONFIG_SHELL} for all gcc packages. Fixes SHELL set
to non sh compatible shell in environment. Thanks to Georg Schwarz.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.46 2006/07/27 18:48:02 jlam Exp $
d30 1
a30 1
NOT_FOR_PLATFORM=	Interix-*-* *-*-x86_64
@


1.46
log
@Rename "SITES_* to "SITES.*" for file-specific lists of sites from which
to fetch the file.  This completes the renaming described in revision
1.1799 of bsd.pkg.mk.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.45 2006/03/20 18:15:38 jlam Exp $
d42 1
@


1.45
log
@* Nuke all references to and definitions of INFO_DIR in package Makefiles
  and replace with appropriate references to PKGINFODIR instead.

* Properly account for split info files during installation.

* Move info file listings directly into the package PLISTs.

This fixes info-file-related PLIST problems.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.44 2006/03/04 21:29:54 jlam Exp $
d18 1
a18 1
SITES_protector-2.95.3-13.tar.gz=	http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
@


1.44
log
@Point MAINTAINER to pkgsrc-users@@NetBSD.org in the case where no
developer is officially maintaining the package.

The rationale for changing this from "tech-pkg" to "pkgsrc-users" is
that it implies that any user can try to maintain the package (by
submitting patches to the mailing list).  Since the folks most likely
to care about the package are the folks that want to use it or are
already using it, this would leverage the energy of users who aren't
developers.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.43 2006/02/05 23:09:44 joerg Exp $
d46 3
a48 1
FILES_SUBST+=		PKGNAME_NOREV=${PKGNAME_NOREV:Q} GCC_PREFIX=${GCC_PREFIX:Q}
d51 1
a51 2
INFO_DIR=		${GCC_PREFIX:S|^${PREFIX}/||}/info
INFO_FILES=		chill.info cpp.info g77.info gcc.info
@


1.43
log
@Recursive revision bump / recommended bump for gettext ABI change.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.42 2005/12/29 06:21:45 jlam Exp $
d9 1
a9 1
MAINTAINER=		tech-pkg@@NetBSD.org
@


1.42
log
@Remove USE_PKGINSTALL from pkgsrc now that mk/install/pkginstall.mk
automatically detects whether we want the pkginstall machinery to be
used by the package Makefile.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.41 2005/12/05 23:55:09 rillig Exp $
d5 1
a5 1
PKGREVISION=		3
@


1.41
log
@Ran "pkglint --autofix", which corrected some of the quoting issues in
CONFIGURE_ARGS.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.40 2005/12/05 20:50:25 rillig Exp $
a31 1
USE_PKGINSTALL=		YES
@


1.40
log
@Fixed pkglint warnings. The warnings are mostly quoting issues, for
example MAKE_ENV+=FOO=${BAR} is changed to MAKE_ENV+=FOO=${BAR:Q}. Some
other changes are outlined in

    http://mail-index.netbsd.org/tech-pkg/2005/12/02/0034.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.39 2005/11/09 21:25:39 tv Exp $
d37 2
a38 2
CONFIGURE_ARGS+=	--host=${MACHINE_GNU_PLATFORM}
CONFIGURE_ARGS+=	--prefix=${GCC_PREFIX}
@


1.39
log
@NOT_FOR_PLATFORM Interix.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.38 2005/09/28 14:31:07 rillig Exp $
d37 1
a37 1
CONFIGURE_ARGS=		--host=${MACHINE_GNU_PLATFORM}
d42 1
a42 1
MAKE_ENV+=		ac_cv_prog_chmod="${TOOLS_CHMOD}"
d47 1
a47 1
FILES_SUBST+=		PKGNAME_NOREV=${PKGNAME_NOREV} GCC_PREFIX=${GCC_PREFIX}
@


1.38
log
@Removed trailing white-space.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.37 2005/06/24 17:17:51 kristerw Exp $
d30 1
a30 1
NOT_FOR_PLATFORM=	*-*-x86_64
@


1.37
log
@Prevent paths to the build directories from being included in the package.
Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.36 2005/05/22 20:08:09 jlam Exp $
d118 2
a119 2
# 
# remove empty file and directories that show up when one does: 
d121 1
a121 1
# 
@


1.36
log
@Remove USE_GNU_TOOLS and replace with the correct USE_TOOLS definitions:

	USE_GNU_TOOLS	-> USE_TOOLS
	awk		-> gawk
	m4		-> gm4
	make		-> gmake
	sed		-> gsed
	yacc		-> bison
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2005/04/11 21:46:13 tv Exp $
d5 1
a5 1
PKGREVISION=		2
d41 3
@


1.35
log
@Remove USE_BUILDLINK3 and NO_BUILDLINK; these are no longer used.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.34 2004/12/03 15:15:00 wiz Exp $
d33 1
a33 1
USE_GNU_TOOLS+=		make
@


1.34
log
@Rename ALL_TARGET to BUILD_TARGET for consistency with other *_TARGETs.
Suggested by Roland Illig, ok'd by various.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2004/05/09 02:26:14 snj Exp $
a31 1
USE_BUILDLINK3=		YES
@


1.33
log
@Convert to buildlink3.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.32 2004/02/19 17:53:29 kristerw Exp $
d55 1
a55 1
ALL_TARGET=		bootstrap
d65 1
a65 1
ALL_TARGET=		bootstrap
@


1.32
log
@gcc 2.95 does not support the x86_64 architecture.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.31 2004/01/24 13:51:14 grant Exp $
d32 1
a32 1
USE_BUILDLINK2=		YES
@


1.31
log
@replace deprecated USE_GMAKE with USE_GNU_TOOLS+=make.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.30 2004/01/02 19:22:14 cjep Exp $
d30 1
@


1.30
log
@
Synchronize patches with lang/gcc. Fixes build on -current. PKGREVISION++
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.29 2003/09/01 10:13:10 cjep Exp $
d33 1
a33 1
USE_GMAKE=		YES
@


1.29
log
@whitespace fixes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.28 2003/08/09 12:43:01 seb Exp $
d5 1
a5 1
PKGREVISION=		1
@


1.28
log
@Make this package looking more like the other gcc packages.

Most user visible change is: this version of gcc is now installed
in its own directory hierachy.

Else and among other things:
- remove build dependency on bison.
- install info files.
- remove per OPSYS PLISTs.
- example mk file style changed to match with other gcc packages.
- ...

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27 2003/07/17 21:44:25 grant Exp $
d114 1
a114 1
.if ${OPSYS} == "SunOS" 
d119 1
a119 1
post-install: 
@


1.27
log
@s/netbsd.org/NetBSD.org/
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.26 2003/07/06 12:37:25 grant Exp $
a3 1
GCC_VERSION=		2.95.3
d5 1
a5 4
PKGVERSION=		${GCC_VERSION}
PKGREVISION=
PKGBASENAME=		gcc-ssp
WRKSRC=			${WRKDIR}/objdir
d19 3
a21 2
PATCHDIR=		../gcc/patches
GCC_FILESDIR=		${FILESDIR}/../../gcc/files
d31 3
a33 1
BUILD_DEPENDS+=		bison-[0-9]*:../../devel/bison
a34 1
USE_GMAKE=		YES
d36 13
a48 10
CONFIGURE_ARGS=		--host=${MACHINE_GNU_PLATFORM} \
			--prefix=${GCC_PREFIX} \
			--enable-shared
CONFIGURE_SCRIPT=	${SRCDIR}/configure
INFO_FILES=		# Not instal info files.

MESSAGE_SUBST+=		MAKE=${MAKE} \
			PKGBASENAME=${PKGBASENAME}
PLIST_SUBST+=		PKGBASENAME=${PKGBASENAME}
SRCDIR=			${WRKDIR}/${DISTNAME}
d52 8
a59 3
.if ${OPSYS} != "SunOS"
CONFIGURE_ARGS+=	--with-gnu-as --with-gnu-ld
GCC_PREFIX=		${LOCALBASE}/${PKGBASENAME}
d61 2
a65 4
GCC_PREFIX=		${LOCALBASE}
PLIST_SRC=		${PKGDIR}/PLIST.SunOS
PLIST_SUBST+=		GCC_VERSION=${GCC_VERSION}
CONFLICTS+=		gcc-[0-9]* pgcc-[0-9]*
d68 5
d75 7
a81 8
	cd ${WRKSRC}/../${DISTNAME}/gcc/config; \
	${CP} ${GCC_FILESDIR}/xm-netbsd.h .; \
	${CP} ${GCC_FILESDIR}/xm-target64.h .; \
	for FILE in ${GCC_FILESDIR}/*_* ; do \
	  ARCH=`basename $${FILE} | ${CUT} -d_ -f1`; \
	  DEST=`basename $${FILE} | ${SED} -e "s/$${ARCH}_//"`; \
	  ${MKDIR} $${ARCH}; \
	  ${CP} $${FILE} $${ARCH}/$${DEST}; \
d83 5
a87 5
	cd ${WRKSRC}/../${DISTNAME}; \
	for i in gcc/config/alpha/netbsd-elf.h gcc/config/arm/t-netbsd \
		gcc/config/mips/x-netbsd libf2c/libF77/dtime_.c libf2c/libF77/etime_.c; do \
	  ${RM} $${i};\
	done
a89 1
	${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
d91 7
a97 3
	${CP} ${WRKDIR}/protector.c ${WRKDIR}/protector.h ${WRKDIR}/${DISTNAME}/gcc/
	${PATCH} -p0 -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protector.dif
	${PATCH} -p0 -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protectonly.dif
d99 2
a101 7
post-build:
	for FILE in ${FILESDIR}/gcc.mk; do \
	  ${SED} -e 's#@@@@MAKE@@@@#${MAKE}#g' \
		 -e 's#@@@@PKGBASENAME@@@@#${PKGBASENAME}#g' \
		 -e 's#@@@@PREFIX@@@@#${PREFIX}#g' \
	   <$$FILE >${WRKDIR}/`basename $$FILE`; \
	done
d103 1
a103 1
	${WRKSRC}/gcc/xgcc -B${WRKSRC}/gcc/ -O2 -o ${WRKDIR}/buffer ${FILESDIR}/buffer.c
d114 7
a120 10
pre-install:
#	${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} any PRE-INSTALL
#	This is not needed because of no info.

.if ${OPSYS} != "SunOS"
post-install:
	${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}/include/curses.h ${PREFIX}/${PKGBASENAME}/bin/cc
	${LN} -s gcc ${PREFIX}/${PKGBASENAME}/bin/cc
	${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGBASENAME}.mk
	${RM} -fr ${GCC_PREFIX}/info
a121 2
# remove empy file and directories that show up when one
# does make install; make deinstall; make install
d123 5
a127 3
	-cd ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}/include && \
	${RM} -f fixed && \
	${RMDIR} v7 v9
d129 10
@


1.26
log
@style nits. use CC:M*gcc* to match any gcc, as per other packages.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2003/07/06 12:31:57 grant Exp $
d13 1
a13 1
MAINTAINER=		tech-pkg@@netbsd.org
@


1.25
log
@set GCC_VERSION for use in GCC_ARCHDIR. remove a superfluous comment
about GCC_PREFIX.

XXX why is GCC_PREFIX ${PREFIX}/gcc3 ?
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.24 2003/06/02 01:19:04 jschauma Exp $
d51 1
a51 1
.if (${OPSYS} != SunOS)
a52 1

d55 1
a55 1
.if (${CC} != gcc)
d57 1
a57 1
.endif
d88 1
a88 1
.if (${OPSYS} != SunOS)
d112 1
a112 1
.if (${OPSYS} != SunOS)
@


1.24
log
@Use tech-pkg@@ in favor of packages@@ as MAINTAINER for orphaned packages.
Should anybody feel like they could be the maintainer for any of thewe packages,
please adjust.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2003/05/11 22:02:52 jmc Exp $
d123 1
a123 1
	-cd ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include && \
@


1.23
log
@It's CUT for cut, not CAT.....
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2003/04/27 11:53:56 cjep Exp $
d13 1
a13 1
MAINTAINER=		packages@@netbsd.org
@


1.22
log
@Use ${SED}, ${CUT}, ${TRUE} and ${ECHO}.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2003/04/10 20:10:17 grant Exp $
d71 1
a71 1
	  ARCH=`basename $${FILE} | ${CAT} -d_ -f1`; \
@


1.21
log
@make usage of pax more consistent, use -O to bomb on broken archives
(suggested by lukem), group z, r and f flags.

some whitespace cleanup.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2003/04/10 01:28:19 grant Exp $
d71 2
a72 2
	  ARCH=`basename $${FILE} | cut -d_ -f1`; \
	  DEST=`basename $${FILE} | sed -e "s/$${ARCH}_//"`; \
d97 1
a97 1
	@@echo "===> Check whether stack protection works or not"
d99 3
a101 3
	ulimit -c 0 && ${WRKDIR}/buffer abcdefghijklmnopqrstuvwxyz  2> ${WRKDIR}/output || true
	@@if [ x"`/bin/cat ${WRKDIR}/output`" = "x: stack smashing attack in function main" ]; then \
	    echo "===> Stack protection succeeded."; \
d104 1
a104 1
	    echo "**** Stack protection failed."; \
@


1.20
log
@make ${PAX} usage consistent:

- group 'zrw' and 'p' args, -s last
- use the && operator consistently
- strip unneeded parens
- some whitespace cleanup
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2003/03/29 12:41:25 jmmv Exp $
d84 1
a84 1
	cd ${WRKDIR} && ${PAX} -rzf ${_DISTDIR}/${SSP_PATCH}
@


1.19
log
@Place WRKSRC where it belongs, to make pkglint happy; ok'ed by wiz.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2002/10/22 06:59:27 kent Exp $
a61 1
MESSAGE=		${PKGDIR}/MESSAGE.SunOS
@


1.18
log
@Update to 2.95.3-13
 - Improve 64bit architecture support
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2002/10/20 00:37:46 wiz Exp $
d9 1
a47 1
WRKSRC=			${WRKDIR}/objdir
@


1.17
log
@Prefer pax to GNU tar. By Greg A. Woods in PR 18719.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2002/10/16 04:30:53 kent Exp $
d5 1
a5 1
PKGNAME=		gcc-ssp-2.95.3.12
d19 1
a19 1
SSP_PATCH=		protector-2.95.3-12.tar.gz
d21 1
a21 1
SITES_protector-2.95.3-12.tar.gz=	http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
@


1.16
log
@Update to 2.95.3-12
Changes:
 - add protection for alloca()
 - fix a problem on m68k

Remove NOT_FOR_PLATFORM temporarily.
If we have build error on a platform, lang/gcc also has the same
error and patches for lang/gcc should be improved.  If
protection check in post-build fails, it is a problem in the ssp
patch, we should tell the ssp author the problem, and add the
platform to NOT_FOR_PLATFORM.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2002/10/05 21:11:03 dmcmahill Exp $
d85 1
a85 1
	cd ${WRKDIR} && ${GTAR} xzf ${_DISTDIR}/${SSP_PATCH}
@


1.15
log
@sync with most recent lang/gcc updates.  Problem noted in PR 18545
filed by Greg Woods.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2002/08/17 01:27:41 dmcmahill Exp $
d5 1
a5 1
PKGNAME=		gcc-ssp-2.95.3.5
d19 1
a19 1
SSP_PATCH=		protector-2.95.3-5.tar.gz
d21 1
a21 1
SITES_protector-2.95.3-5.tar.gz=	http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
a24 1
# Please let me know what platforms this package works or doesn't work on.
d28 4
a31 4
NOT_FOR_PLATFORM=	NetBSD-*-alpha \
			NetBSD-*-powerpc NetBSD-*-macppc \
			NetBSD-*-prep NetBSD-*-bebox NetBSD-*-ofppc \
			NetBSD-*-amigappc NetBSD-*-sandpoint
@


1.14
log
@fix after last lang/gcc update.  Tested on 1.5.3 sparc.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2002/07/13 10:08:49 kent Exp $
d16 2
a17 2
PATCH_SITES=            ${MASTER_SITE_LOCAL}
PATCHFILES=             gcc-2.95.3-diff-2002-08-11.gz
@


1.13
log
@Fix build problem on Solaris.
The fix was provided by minoura@@netbsd.org
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2002/05/14 14:01:34 yyamano Exp $
d15 3
@


1.12
log
@Replace STRIPFLAG with _STRIPFLAG_CC to fix pkg/15467.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2002/04/05 19:20:53 kent Exp $
d59 1
d61 1
a61 1
#CONFLICTS+=		gcc-[0-9]* pgcc-[0-9]*
d76 2
a77 1
	for i in gcc/config/alpha/netbsd-elf.h gcc/config/arm/t-netbsd gcc/config/mips/x-netbsd libf2c/libF77/dtime_.c libf2c/libF77/etime_.c; do \
d83 1
a83 1
	cd ${WRKDIR} && /usr/bin/tar zxf ${_DISTDIR}/${SSP_PATCH}
d85 2
a86 2
	${PATCH} -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protector.dif
	${PATCH} -d ${WRKDIR}/${DISTNAME} --forward --quiet -E < ${WRKDIR}/protectonly.dif
@


1.11
log
@Update the ssp patch to 2.95.3-5.
Change in 2.95.3-5:
  - Some fixes at the copying arguments

More concretely, a problem at compilation of src/usr.sbin/pppd/pppd/eui64.c
is solved.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2002/03/29 10:47:58 kent Exp $
d128 1
a128 1
LDFLAGS=		${STRIPFLAG}
@


1.11.2.1
log
@Merge from pkgsrc-current to buildlink2 branch.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2002/05/14 14:01:34 yyamano Exp $
d128 1
a128 1
LDFLAGS=		${_STRIPFLAG_CC}
@


1.10
log
@Update ssp patch to 2.95.3-4.
 - Support mips.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2002/03/28 13:57:17 kent Exp $
d5 1
a5 1
PKGNAME=		gcc-ssp-2.95.3.4
d16 1
a16 1
SSP_PATCH=		protector-2.95.3-4.tar.gz
d18 1
a18 1
SITES_protector-2.95.3-4.tar.gz=	http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
d98 1
a98 1
	    echo "---- Stack protection succeeded."; \
@


1.9
log
@Sync with lang/gcc.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2002/03/05 06:13:21 jmc Exp $
d5 3
a7 2
PKGNAME=		gcc-ssp-2.95.3
PKGREVISION=		
d16 1
a16 2
MASTER_SITES+=		http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/
SSP_PATCH=		protector-2.95.3-2.tar.gz
d18 1
d43 1
a43 2
PLIST_SUBST+=		MACHINE_GCC_PLATFORM=${MACHINE_GNU_PLATFORM} \
			PKGBASENAME=${PKGBASENAME}
@


1.8
log
@Don't compile on powerpc, gcc needs help out of the box for netbsd/powerpc.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2002/02/16 14:46:20 kent Exp $
a20 2
BUILD_DEPENDS+=		bison-[0-9]*:../../devel/bison

d25 2
a26 1
NOT_FOR_PLATFORM=	NetBSD-*-alpha NetBSD-*-powerpc NetBSD-*-macppc \
d30 1
a30 7
.include "../../mk/bsd.prefs.mk"

.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
MACHINE_GCC_PLATFORM=	${MACHINE_GNU_PLATFORM}elf
.else
MACHINE_GCC_PLATFORM=	${MACHINE_GNU_PLATFORM}
.endif
d34 1
a34 1
CONFIGURE_ARGS=		--host=${MACHINE_GCC_PLATFORM} \
d42 1
a42 1
PLIST_SUBST+=		MACHINE_GCC_PLATFORM=${MACHINE_GCC_PLATFORM} \
a52 4
.if ${MACHINE_PLATFORM:MNetBSD-*-sparc}
PLIST_SRC=		${PKGDIR}/PLIST.NetBSD-sparc
PLIST_SRC+=		${PKGDIR}/PLIST
.endif
d60 1
a60 1
CONFLICTS+=		gcc-[0-9]* pgcc-[0-9]*
d67 4
a70 1
	for ARCH in arm arm i386 m68k sh sparc vax; do \
d72 1
a72 1
	  ${CP} ${GCC_FILESDIR}/$${ARCH}_netbsd-elf.h $${ARCH}/netbsd-elf.h; \
d74 4
a77 1
	${CP} ${GCC_FILESDIR}/sparc_netbsd-elf-common.h sparc/netbsd-elf-common.h
d108 1
d112 1
a112 1
	${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GCC_PLATFORM}/${GCC_VERSION}/include/curses.h ${PREFIX}/${PKGBASENAME}/bin/cc
d116 7
@


1.7
log
@Add missing sparc/netbsd-elf-common.h.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2002/01/04 05:57:22 kent Exp $
d27 3
a29 1
NOT_FOR_PLATFORM=	NetBSD-*-alpha
@


1.6
log
@Bump to 2.95.3 to synchronize with lang/gcc.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2001/11/29 01:12:39 hubertf Exp $
d79 2
a80 1
	done
@


1.5
log
@Get rid of manually adding "nbX" to PKGNAME when a pkg was changed in
pkgsrc. Instead, a new variable PKGREVISION is invented that can get
bumped independent of DISTNAME and PKGNAME.

Example #1:
        DISTNAME=       foo-X.Y
        PKGREVISION=    Z
     => PKGNAME=        foo-X.YnbZ

Example #2:
        DISTNAME=       barthing-X.Y
        PKGNAME=        bar-X.Y
        PKGREVISION=    Z
     => PKGNAME=        bar=X.YnbZ (!)

On subsequent changes, only PKGREVISION needs to be bumped, no more risk
of getting DISTNAME changed accidentally.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2001/09/27 23:18:17 jlam Exp $
d3 4
a6 4
DISTNAME=		gcc-2.95.2
GCC_VERSION=		2.95.2
PKGNAME=		gcc-ssp-2.95.2
PKGREVISION=		3
d11 1
a11 1
MAINTAINER=		kent@@netbsd.org
d15 2
a16 2
MASTER_SITES+=		http://www.trl.ibm.com/projects/security/ssp/gcc2_95_2/
SSP_PATCH=		protector-2.95.2-2.tar.gz
d19 1
a19 1
GCC_FILESDIR=		../gcc/files
a28 1

d43 1
d47 1
a47 2
PLIST_SUBST+=		GCC_VERSION=${GCC_VERSION} \
			MACHINE_GCC_PLATFORM=${MACHINE_GCC_PLATFORM} \
d56 1
d63 1
d65 1
d74 6
a79 1
	${CP} ${GCC_FILESDIR}/netbsd*.ml ${WRKSRC}/../${DISTNAME}/libstdc++/config
d96 1
d99 1
a99 1
	@@if [ x"`cat ${WRKDIR}/output`" = "x: stack smashing attack in function main" ]; then \
d103 1
a103 1
	    echo "*** Stack protection failed."; \
d108 3
d113 1
a114 1
	${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GCC_PLATFORM}/${GCC_VERSION}/include/curses.h
d116 1
@


1.4
log
@Mechanical changes to 375 files to change dependency patterns of the form
foo-* to foo-[0-9]*.  This is to cause the dependencies to match only the
packages whose base package name is "foo", and not those named "foo-bar".
A concrete example is p5-Net-* matching p5-Net-DNS as well as p5-Net.  Also
change dependency examples in Packages.txt to reflect this.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2001/07/04 02:31:44 kent Exp $
d5 2
a6 1
PKGNAME=		gcc-ssp-2.95.2nb3
@


1.3
log
@-fstack-protector is enabled by default.
Build with `make bootstrap.'
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2001/06/30 16:16:11 kent Exp $
d20 1
a20 1
BUILD_DEPENDS+=		bison-*:../../devel/bison
@


1.2
log
@Update for the extension patch released at 29 Jun 2001, which fixes bugs
for sparc and mipsEEel.

Change installation directory: ${LOCALBASE}/gcc-ssp-2.95.2 -> ${LOCALBASE}/gcc-ssp
Change name of make configuration file: gcc-ssp-2.95.2.mk -> gcc-ssp.mk
Comment ONLY_FOR_PLATFORM out, and add NOT_FOR_PLATFORM.
Add a test of stack-protection.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2001/05/22 13:54:34 kent Exp $
d5 1
a5 1
PKGNAME=		gcc-ssp-2.95.2nb2
a61 1
.if (${CC} != gcc)
a62 1
.endif
d78 1
d88 1
a88 1
	${WRKSRC}/gcc/xgcc -B${WRKSRC}/gcc/ -O2 -fstack-protector -o ${WRKDIR}/buffer ${FILESDIR}/buffer.c
@


1.1
log
@New 'gcc with stack-smashing protection' package.
@
text
@d1 1
a1 1
# $NetBSD$
d4 3
a6 1
PKGNAME=		gcc-ssp-2.95.2
d15 1
a15 1
SSP_PATCH=		protector2-95-2.tar.gz
d22 6
a27 3
# The platforms listed below are the only tested platforms so far.
# If you get gcc working on other platforms, then please add them.
ONLY_FOR_PLATFORM=	NetBSD-*-i386
d44 2
a45 2
GCC_VERSION=		${PKGNAME:C/.*-//}
MESSAGE_SUBST+=		MAKE=${MAKE}
d47 2
a48 1
			MACHINE_GCC_PLATFORM=${MACHINE_GCC_PLATFORM}
d56 1
a56 1
GCC_PREFIX=		${LOCALBASE}/${PKGNAME}
d79 1
a79 1
	${PATCH} -d ${WRKDIR}/${DISTNAME}/gcc --forward --quiet -E < ${WRKDIR}/protector.dif
d85 1
a85 1
		 -e 's#@@@@PKGNAME@@@@#${PKGNAME}#g' \
d89 9
d102 1
a102 1
	${LN} -s gcc ${PREFIX}/${PKGNAME}/bin/cc
d104 1
a104 1
	${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
@

