pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import gcc44-4.4.7nb7 as wip/gcc44.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Dec 22 14:59:44 2016 +0100
Changeset:	442e3bd683db99c332ed8c08ff138786d49685f4

Added Files:
	gcc44/DESCR
	gcc44/Makefile
	gcc44/buildlink3.mk
	gcc44/distinfo
	gcc44/files/hello.f
	gcc44/files/hello.m
	gcc44/files/values.c
	gcc44/options.mk
	gcc44/patches/patch-ac
	gcc44/patches/patch-ad
	gcc44/patches/patch-af
	gcc44/patches/patch-ag
	gcc44/patches/patch-ai
	gcc44/patches/patch-aj
	gcc44/patches/patch-ak
	gcc44/patches/patch-al
	gcc44/patches/patch-am
	gcc44/patches/patch-gcc_doc_c-tree.texi
	gcc44/patches/patch-gcc_doc_cppopts.texi
	gcc44/patches/patch-gcc_doc_invoke.texi
	gcc44/patches/patch-gcc_doc_sourcebuild.texi
	gcc44/patches/patch-gcc_ginclude_stddef.h
	gcc44/patches/patch-gcc_toplev.h
	gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
	gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h

Log Message:
Import gcc44-4.4.7nb7 as wip/gcc44.

This is the gcc 4.4.0 compiler suite.

This package has a test target. For testing (only), this
package requires dejagnu.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=442e3bd683db99c332ed8c08ff138786d49685f4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gcc44/DESCR                                        |   4 +
 gcc44/Makefile                                     | 137 +++++++++++++++++++++
 gcc44/buildlink3.mk                                |  71 +++++++++++
 gcc44/distinfo                                     |  23 ++++
 gcc44/files/hello.f                                |   5 +
 gcc44/files/hello.m                                |   6 +
 gcc44/files/values.c                               |  64 ++++++++++
 gcc44/options.mk                                   |  98 +++++++++++++++
 gcc44/patches/patch-ac                             |  17 +++
 gcc44/patches/patch-ad                             |  35 ++++++
 gcc44/patches/patch-af                             |  16 +++
 gcc44/patches/patch-ag                             |  29 +++++
 gcc44/patches/patch-ai                             |  22 ++++
 gcc44/patches/patch-aj                             |  46 +++++++
 gcc44/patches/patch-ak                             |  14 +++
 gcc44/patches/patch-al                             |  16 +++
 gcc44/patches/patch-am                             |  24 ++++
 gcc44/patches/patch-gcc_doc_c-tree.texi            |  22 ++++
 gcc44/patches/patch-gcc_doc_cppopts.texi           |  15 +++
 gcc44/patches/patch-gcc_doc_invoke.texi            |  61 +++++++++
 gcc44/patches/patch-gcc_doc_sourcebuild.texi       |  15 +++
 gcc44/patches/patch-gcc_ginclude_stddef.h          |  19 +++
 gcc44/patches/patch-gcc_toplev.h                   |  20 +++
 ...bstdc++-v3_config_os_bsd_netbsd_ctype__inline.h |  13 ++
 ...dc++-v3_config_os_bsd_netbsd_ctype__noninline.h |  57 +++++++++
 25 files changed, 849 insertions(+)

diffs:
diff --git a/gcc44/DESCR b/gcc44/DESCR
new file mode 100644
index 0000000..9f24f41
--- /dev/null
+++ b/gcc44/DESCR
@@ -0,0 +1,4 @@
+This is the gcc 4.4.0 compiler suite.
+
+This package has a test target. For testing (only), this
+package requires dejagnu.
diff --git a/gcc44/Makefile b/gcc44/Makefile
new file mode 100644
index 0000000..331702b
--- /dev/null
+++ b/gcc44/Makefile
@@ -0,0 +1,137 @@
+# $NetBSD: Makefile,v 1.47 2016/07/09 06:38:24 wiz Exp $
+
+DISTNAME=		gcc-${GCC_VERSION}
+PKGNAME=		gcc44-${GCC_VERSION}
+PKGREVISION=		7
+CATEGORIES=		lang
+MASTER_SITES=		${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
+EXTRACT_SUFX=		.tar.bz2
+
+MAINTAINER=		sbd%NetBSD.org@localhost
+HOMEPAGE=		http://gcc.gnu.org/
+COMMENT=		GNU Compiler Collection 4.4
+LICENSE=		gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+
+USE_TOOLS+=		awk:run bash:run chmod gmake:run makeinfo sed:run
+
+GCC_VERSION=		4.4.7
+
+GCC_SUBPREFIX=		gcc44
+GCC_PREFIX=		${PREFIX}/${GCC_SUBPREFIX}
+FILES_SUBST+=		PKGNAME=${PKGNAME}
+
+# To avoid GNU surprises
+CONFIG_SHELL=		${TOOLS_PATH.bash}
+
+NOT_FOR_PLATFORM=	Interix-*-* DragonFly-*-*
+UNLIMIT_RESOURCES+=	datasize
+UNLIMIT_RESOURCES+=	stacksize
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+# Determine whether to use binutils
+.if ${OPSYS} == "SunOS"
+CONFIGURE_ENV+=		OBJDUMP=/usr/sfw/bin/gobjdump
+CONFIGURE_ARGS+=	--without-gnu-ld --with-ld=/usr/ccs/bin/ld
+. if !exists(/usr/sfw/bin/gas)
+CONFIGURE_ARGS+=	--without-gnu-as --with-as=/usr/ccs/bin/as
+. else
+CONFIGURE_ARGS+=	--with-gnu-as --with-as=/usr/sfw/bin/gas
+.endif
+.endif
+
+
+# REPLACE_AWK+=	gcc/testsuite/gcc.test-framework/test-framework.awk	\
+# 		gcc/mkmap-symver.awk					\
+# 		gcc/optc-gen.awk					\
+# 		gcc/mkmap-flat.awk					\
+# 		gcc/opt-gather.awk					\
+# 		gcc/opth-gen.awk					\
+# 		gcc/opt-functions.awk
+
+REPLACE_BASH+= contrib/dg-cmp-results.sh
+REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-patchlist
+REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-update
+REPLACE_BASH+= contrib/reghunt/bin/gcc-svn-update-fix
+REPLACE_BASH+= contrib/reghunt/bin/reg-hunt
+REPLACE_BASH+= contrib/reghunt/bin/reg-test
+REPLACE_BASH+= contrib/reghunt/date_based/reg_periodic
+REPLACE_BASH+= contrib/reghunt/date_based/reg_search
+REPLACE_BASH+= gcc/dbgcnt.def
+REPLACE_BASH+= gcc/testsuite/gcc.test-framework/gen_directive_tests
+REPLACE_BASH+= libstdc++-v3/scripts/run_doxygen
+
+CONFIGURE_ARGS+=	--prefix=${GCC_PREFIX:Q}
+CONFIGURE_ARGS+=	--enable-languages=${LANGS:Q}
+CONFIGURE_ARGS+=	--enable-shared
+CONFIGURE_ARGS+=	--enable-long-long
+CONFIGURE_ARGS+=	--with-local-prefix=${GCC_PREFIX:Q}
+CONFIGURE_ARGS+=	--disable-libssp
+CONFIGURE_ARGS+=	--enable-threads=posix
+
+# See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to
+# create a stub library, not just to remove symbols, so we must not
+# let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the
+# build fails for missing files.
+CONFIGURE_ARGS.Darwin+=	STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip}
+
+CONFIGURE_ENV+=		CONFIG_SHELL=${CONFIG_SHELL}
+
+MAKE_ENV+=		SHELL=${CONFIG_SHELL}
+MAKE_ENV+=		ac_cv_path_ac_cv_prog_chmod=${TOOLS_CHMOD}
+
+# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
+# a binary so we need to make sure we give it the installed sed and not
+# the tool wrapped one.
+MAKE_ENV+=		lt_cv_path_SED=${TOOLS_SED}
+
+CPPFLAGS+=		-I${BUILDLINK_DIR}/include
+CFLAGS+=		-I${BUILDLINK_DIR}/include
+
+# Somone should fix this so it will match the NetBSD system compiler
+#.if ${OPSYS} == "NetBSD"
+#GCC_PLATFORM=	${MACHINE_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
+#CONFIGURE_ARGS+=	--host=${GCC_PLATFORM:Q}
+#MAKE_ENV+=		AR=/usr/bin/ar
+#.endif # NetBSD
+
+.if ${OPSYS} == "NetBSD"
+.if !empty(OS_VERSION:M5.*)
+MAKE_ENV+=		ac_cv_func_gethostbyname_r=no
+.endif
+.endif
+
+LIBS.SunOS+=		-lgmp
+
+# Ignore missing rpaths in "fake" library.
+CHECK_SHLIBS_SKIP+=	${GCC_PKGNAME}/lib*/libgcj_bc.so*
+
+do-configure:
+	${MKDIR} ${WRKDIR}/obj
+	cd ${WRKDIR}/obj; ${SETENV} ${CONFIGURE_ENV} ${CONFIG_SHELL} ${WRKSRC}/configure ${CONFIGURE_ARGS}
+
+do-build:
+	(${_ULIMIT_CMD} cd ${WRKDIR}/obj && ${SETENV} ${MAKE_ENV} ${GMAKE} -j${MAKE_JOBS:U1:Q} )
+
+do-test:
+#.if (${MACHINE_GNU_ARCH} == "x86_64")
+#	(cd ${FILESDIR} && ${CP} netbsd64macro.dfs ${WRKSRC}/gcc/testsuite/ada/acats/support/macro.dfs)
+#.endif
+	(cd ${WRKDIR}/obj && ${GMAKE} -k check)
+
+do-install:
+	(cd ${WRKDIR}/obj && ${SETENV} ${MAKE_ENV} ${GMAKE} install DESTDIR=${DESTDIR} \
+	 && ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || ${LN} -f ${DESTDIR}${GCC_PREFIX}/bin/gcc ${DESTDIR}${GCC_PREFIX}/bin/cc)
+
+.if ${OPSYS} == "SunOS" && ${OS_VERSION} != "5.11" && !empty(MACHINE_ARCH:M*86*)
+post-install:
+	-${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32
+	-${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64
+.endif
+
+GENERATE_PLIST+=                                                        \
+	cd ${DESTDIR}${PREFIX} && ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print \
+	| ${SORT} ;
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/gcc44/buildlink3.mk b/gcc44/buildlink3.mk
new file mode 100644
index 0000000..b4e7961
--- /dev/null
+++ b/gcc44/buildlink3.mk
@@ -0,0 +1,71 @@
+# $NetBSD: buildlink3.mk,v 1.11 2015/11/25 12:51:16 jperkin Exp $
+
+BUILDLINK_TREE+=	gcc44
+
+.if !defined(GCC44_BUILDLINK3_MK)
+GCC44_BUILDLINK3_MK:=
+
+_GCC44_SUBDIR=	gcc44
+_GCC44_PREFIX=	${BUILDLINK_PREFIX.gcc44}/${_GCC44_SUBDIR}
+
+BUILDLINK_API_DEPENDS.gcc44+=	gcc44>=4.4
+BUILDLINK_ABI_DEPENDS.gcc44+=	gcc44>=4.4.5nb2
+BUILDLINK_PKGSRCDIR.gcc44?=	../../lang/gcc44
+
+.if exists(${_GCC44_PREFIX}/bin/gcc)
+
+# logic for detecting the ADA compiler (not yet supported)
+#gcc44_GNAT1!=${_GCC44_PREFIX}/bin/gcc -print-prog-name=gnat1
+#.  if exists(${gcc44_GNAT1})
+#CONFIGURE_ENV+=	ADAC=${_GCC44_PREFIX}/bin/gcc
+#MAKE_ENV+=	ADAC=${_GCC44_PREFIX}/bin/gcc
+#.  endif
+
+# add libraries
+BUILDLINK_LIBDIRS.gcc44+=	${_GCC44_SUBDIR}/lib
+
+# find the gcc architecture
+gcc44_GCC_ARCHDIR!=	${DIRNAME} `${_GCC44_PREFIX}/bin/gcc --print-libgcc-file-name`
+
+# add the architecture dep libraries
+.  if empty(gcc44_GCC_ARCHDIR:M*not_found*)
+BUILDLINK_LIBDIRS.gcc44+=	${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/
+
+# add the ada libraries (not yet supported)
+#.    if exists(${gcc44_GNAT1})
+#BUILDLINK_LIBDIRS.gcc44+=	${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/adalib
+#.    endif
+
+# add the header files
+BUILDLINK_INCDIRS.gcc44+=	${_GCC44_SUBDIR}/include ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/include
+.  endif
+.endif
+
+BUILDLINK_FILES_CMD.gcc44=	\
+	(cd  ${BUILDLINK_PREFIX.gcc44} &&	\
+	${FIND} ${_GCC44_SUBDIR}/bin ${_GCC44_SUBDIR}/include ${_GCC44_SUBDIR}/libexec ${_GCC44_SUBDIR}/lib \( -type f -o -type l \) -print)
+
+# When not using the GNU linker, gcc will always link shared libraries
+# against the shared version of libgcc. Always enable _USE_GCC_SHILB on
+# platforms that don't use the GNU linker, such as SunOS.
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} == "SunOS"
+_USE_GCC_SHLIB=	yes
+.endif
+
+# Packages that link against shared libraries need a full dependency.
+.if defined(_USE_GCC_SHLIB)
+BUILDLINK_DEPMETHOD.gcc44+=	full
+.else
+BUILDLINK_DEPMETHOD.gcc44?=	build
+.endif
+
+.include "../../mk/pthread.buildlink3.mk"
+pkgbase := gcc44
+.include "../../mk/pkg-build-options.mk"
+.if !empty(PKG_BUILD_OPTIONS.gcc44:Mnls)
+.include "../../devel/gettext-lib/buildlink3.mk"
+.endif
+.endif # GCC44_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-gcc44
diff --git a/gcc44/distinfo b/gcc44/distinfo
new file mode 100644
index 0000000..9a39244
--- /dev/null
+++ b/gcc44/distinfo
@@ -0,0 +1,23 @@
+$NetBSD: distinfo,v 1.21 2015/11/03 22:50:35 agc Exp $
+
+SHA1 (gcc-4.4.7.tar.bz2) = a6c834b0c2f58583da1d093de7a81a20ede9af75
+RMD160 (gcc-4.4.7.tar.bz2) = 481609ebff38bf8a1fdf9a300dc460c1f425836a
+SHA512 (gcc-4.4.7.tar.bz2) = 5562a7319cfd8cc7c5261de9170f2cda86cbd3a231a444a5ec0ad3d8fd60af6f8bd86af8f201cebb7bddcd083d761834d1cbd652c68af0f5607d22a63439ed0e
+Size (gcc-4.4.7.tar.bz2) = 63179340 bytes
+SHA1 (patch-ac) = 7da8c27d521164c1a7801dda8ca62d1057ac8d32
+SHA1 (patch-ad) = 96722d5af63a955e3d9c934b1249e5e8a1173a8c
+SHA1 (patch-af) = 12f58f01e973f5684e8443ab402a70291bb6d621
+SHA1 (patch-ag) = 0897b7ed75b4dc7d6ad50ecfa886edca7e29703b
+SHA1 (patch-ai) = 96ffd5c07761a53dbb036930c49e4c84574455c7
+SHA1 (patch-aj) = 9baf098316200a19b2b4553f05b8fa6970a887e7
+SHA1 (patch-ak) = 08da661b8b19fdd9fa086f67b185266c1d378658
+SHA1 (patch-al) = 462059744f7f057f13d6c472d0aff9d012546082
+SHA1 (patch-am) = fcfabcec9e6d0b8e9ada348dc65e8ddb890f96ca
+SHA1 (patch-gcc_doc_c-tree.texi) = 2ba810a99ecd56a03d74818b6e52869cd6edc45e
+SHA1 (patch-gcc_doc_cppopts.texi) = d352618e29983ebff03d82c1d669c4258705fc59
+SHA1 (patch-gcc_doc_invoke.texi) = ed61af2e4bee1ed26bd9c5ee8d821828ce477a72
+SHA1 (patch-gcc_doc_sourcebuild.texi) = 0672ec36f2c4ae2dd44154e1553bf1add445e194
+SHA1 (patch-gcc_ginclude_stddef.h) = 867e3ff87f0b8865b37823c42c9b01935b94e5fb
+SHA1 (patch-gcc_toplev.h) = 536f52c86635b2a5ba894499fa6c398f9206c82a
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h) = 768705c3be094cba77ec0b20517ffb8cd579059c
+SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h) = 8a1b82b95ae1bdd796a5052415023abaf816503d
diff --git a/gcc44/files/hello.f b/gcc44/files/hello.f
new file mode 100644
index 0000000..4b34eed
--- /dev/null
+++ b/gcc44/files/hello.f
@@ -0,0 +1,5 @@
+
+      PROGRAM hello
+      print*, 'Hello, World!'
+      END
+
diff --git a/gcc44/files/hello.m b/gcc44/files/hello.m
new file mode 100644
index 0000000..c25ba5a
--- /dev/null
+++ b/gcc44/files/hello.m
@@ -0,0 +1,6 @@
+#import <stdio.h>
+
+int main( int argc, const char *argv[] ) {
+    printf( "hello world\n" );
+    return 0;
+}
diff --git a/gcc44/files/values.c b/gcc44/files/values.c
new file mode 100644
index 0000000..52ff732
--- /dev/null
+++ b/gcc44/files/values.c
@@ -0,0 +1,64 @@
+#if 0 /* $NetBSD: values.c,v 1.1 2011/10/12 16:10:48 hans Exp $ */
+#
+# This is Solaris x86 specific GCC run-time environment patch, which
+# makes it possible to reliably deploy .init snippets. Trouble is that
+# Solaris linker erroneously pads .init segment with zeros [instead of
+# nops], which is bound to SEGV early upon program start-up. This bug
+# was recognized by GCC team [it is mentioned in source code], but
+# workaround apparently and obviously erroneously slipped away in some
+# newer GCC release. This patch compensates for this mishap by dropping
+# modified values-X*.o into GCC installation tree. Object modules in
+# question are normally provided by Sun and linked prior crtbegin.o.
+# Modified versions are additionally crafted with custom .init segment,
+# which does some magic:-)
+#						<appro%fy.chalmers.se@localhost>
+set -e
+gcc=gcc
+if [[ "x$1" = x*gcc ]]; then
+	gcc=$1; shift
+fi
+gcc_dir=`${gcc} "$@" -print-libgcc-file-name`
+gcc_dir=${gcc_dir%/*}	#*/
+set -x 
+${gcc} "$@" -c -o $gcc_dir/values-Xa.o -DXa $0
+${gcc} "$@" -c -o $gcc_dir/values-Xc.o -DXc $0
+${gcc} "$@" -c -o $gcc_dir/values-Xt.o -DXt $0
+exit
+#endif
+
+#include <math.h>
+
+#if defined(Xa)
+const enum version _lib_version = ansi_1;
+#elif defined(Xc)
+const enum version _lib_version = strict_ansi;
+#elif defined(Xt)
+const enum version _lib_version = c_issue_4;
+#else
+#error "compile by issuing 'ksh -f values.c [gcc] [-m64]'"
+#endif
+
+#if defined(__x86_64__)
+asm("\n"
+".section	.init\n"
+".align	1\n"
+"	leaq	1f(%rip),%rax\n"
+"1:	cmpl	$0,2f-1b(%rax)\n"
+"	jne	2f\n"
+"	jmp	2f+5\n"
+"	.skip	9\n"	/* pad up to 0x1b bytes */
+"2:\n"
+);
+#else
+asm("\n"
+".section	.init\n"
+".align	1\n"
+"	call	1f\n"
+"1:	popl	%eax\n"
+"	cmpl	$0,2f-1b(%eax)\n"
+"	jne	2f\n"
+"	jmp	2f+5\n"
+"	.skip	10\n"	/* pad up to 0x1b bytes */
+"2:\n"
+);
+#endif
diff --git a/gcc44/options.mk b/gcc44/options.mk
new file mode 100644
index 0000000..0f45c03
--- /dev/null
+++ b/gcc44/options.mk
@@ -0,0 +1,98 @@
+# $NetBSD: options.mk,v 1.13 2016/09/30 13:16:59 sevan Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.gcc44
+PKG_SUPPORTED_OPTIONS=	gcc-inplace-math nls gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada
+PKG_SUGGESTED_OPTIONS=	gcc-c++ gcc-fortran gcc-objc
+# gcc-java was dropped from PKG_SUGGESTED_OPTIONS to spare legacy systems attempting bulkbuilds
+# For example on Darwin/PowerPC this option adds another 24 hours to build time on a G4.
+
+PKG_SUGGESTED_OPTIONS.NetBSD+=	nls
+PKG_SUGGESTED_OPTIONS.SunOS+=	gcc-inplace-math
+
+PKG_OPTIONS_LEGACY_VARS+=	BUILD_CXX:gcc-c++
+PKG_OPTIONS_LEGACY_VARS+=	BUILD_FORTRAN:gcc-fortran
+PKG_OPTIONS_LEGACY_VARS+=	BUILD_JAVA:gcc-java
+PKG_OPTIONS_LEGACY_VARS+=	BUILD_OBJC:gcc-objc
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Build math libraries in place
+###
+.if !empty(PKG_OPTIONS:Mgcc-inplace-math)
+.include "../../devel/gmp/inplace.mk"
+.include "../../math/mpfr/inplace.mk"
+.else
+CONFIGURE_ARGS+=	--with-gmp=${BUILDLINK_PREFIX.gmp}
+CONFIGURE_ARGS+=	--with-mpfr=${BUILDLINK_PREFIX.mpfr}
+.include "../../devel/gmp/buildlink3.mk"
+.include "../../math/mpfr/buildlink3.mk"
+.endif
+
+###
+### Native Language Support
+###
+.if !empty(PKG_OPTIONS:Mnls)
+CONFIGURE_ARGS+=	--enable-nls
+USE_TOOLS+=		msgfmt
+MAKE_ENV+=		ICONVPREFIX=${BUILDLINK_PREFIX.iconv}
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--disable-nls
+.endif
+
+###
+### Optional languages
+### Ada could be added although there is a bootstrapping issue.  See
+### ../gcc34-ada for guidance
+###
+
+LANGS=			c
+
+.if !empty(PKG_OPTIONS:Mgcc-java)
+.  if empty(PKG_OPTIONS:Mgcc-c++)
+PKG_OPTIONS+=		gcc-c++
+.  endif
+
+LANGS+=			java
+REPLACE_PYTHON=		libjava/contrib/aot-compile.in
+
+USE_TOOLS+=		unzip zip:run
+CONFIGURE_ARGS+=	--with-system-zlib
+
+# ${WRKSRC}/gcc-4.4.1/libjava/contrib/aotcompile.py.in stores the path to
+# a 'make' program so we need to make sure we give it the installed 'make' and not
+# the tool wrapped one.
+CONFIGURE_ENV+=		PKGSRC_MAKE=${TOOLS_PATH.gmake}
+MAKE_ENV+=		PKGSRC_MAKE=${TOOLS_PATH.gmake}
+
+# fastjar-0.93 from pkgsrc/archivers/fastjar seems to trigger a build
+# failure (seen on NetBSD-5.0/i386) when building java.  So in case
+# the fastjar package is installed, make sure the configure script
+# doesn't pick it up.
+CONFIGURE_ENV+=		JAR=no
+MAKE_ENV+=		JAR=no
+MAKE_ENV+=		ac_cv_prog_JAR=no
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-c++)
+LANGS+=			c++
+USE_TOOLS+=		perl
+CONFIGURE_ARGS+=	--enable-__cxa_atexit
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-fortran)
+LANGS+=			fortran
+.endif
+
+.if !empty(PKG_OPTIONS:Mgcc-objc)
+LANGS+=			objc
+.endif
+
+#.if !empty(PKG_OPTIONS:Mgcc-ada)
+#LANGS+=		ada
+#.endif
diff --git a/gcc44/patches/patch-ac b/gcc44/patches/patch-ac
new file mode 100644
index 0000000..c867b0b
--- /dev/null
+++ b/gcc44/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.4 2014/05/15 22:56:02 pho Exp $
+
+Add gcc libdir to a programs rpath so that _this gcc's_ support
+libraries are found. Note that there must not be a whitespace between
+$(LINKER_RPATH_FLAG) and the path. Otherwise the flag may be
+misinterpreted by linker (e.g. Apple's ld).
+
+--- gcc/Makefile.in.orig	2004-06-17 15:56:58.000000000 -0600
++++ gcc/Makefile.in
+@@ -1944,6 +1944,7 @@ c-omp.o : c-omp.c $(CONFIG_H) $(SYSTEM_H
+ # Language-independent files.
+ 
+ DRIVER_DEFINES = \
++  -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(exec_prefix)/lib\"" \
+   -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
+   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
+   -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
diff --git a/gcc44/patches/patch-ad b/gcc44/patches/patch-ad
new file mode 100644
index 0000000..035784d
--- /dev/null
+++ b/gcc44/patches/patch-ad
@@ -0,0 +1,35 @@
+$NetBSD: patch-ad,v 1.4 2012/05/03 12:20:19 hans Exp $
+
+--- configure.orig	2010-10-02 11:40:32.000000000 +0000
++++ configure
+@@ -4534,7 +4534,7 @@ if test "${with_mpfr_lib+set}" = set; th
+ fi;
+ 
+ if test "x$with_mpfr" != x; then
+-  gmplibs="-L$with_mpfr/lib $gmplibs"
++  gmplibs="-L$with_mpfr/lib ${COMPILER_RPATH_FLAG}$with_mpfr/lib $gmplibs"
+   gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+@@ -4544,8 +4544,10 @@ if test "x$with_mpfr_lib" != x; then
+   gmplibs="-L$with_mpfr_lib $gmplibs"
+ fi
+ if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
+-  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
+-  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
++  sdir=
++  test -d "${srcdir}/mpfr/src" && sdir=/src
++  gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr'"${sdir}"'/.libs -L$$r/$(HOST_SUBDIR)/mpfr'"${sdir}/_libs $gmplibs"
++  gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr'"${sdir} "'-I$$s/mpfr'"${sdir} $gmpinc"
+   # Do not test the mpfr version.  Assume that it is sufficient, since
+   # it is in the source tree, and the library has not been built yet
+   # but it would be included on the link line in the version check below
+@@ -4598,7 +4600,7 @@ fi
+ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
+   gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
+   gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
+-  extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp'
++  extra_mpfr_configure_flags='--with-gmp-include=$$r/$(HOST_SUBDIR)/gmp --with-gmp-lib=$$r/${HOST_SUBDIR}/gmp'"$lt_cv_objdir"
+   # Do not test the gmp version.  Assume that it is sufficient, since
+   # it is in the source tree, and the library has not been built yet
+   # but it would be included on the link line in the version check below
diff --git a/gcc44/patches/patch-af b/gcc44/patches/patch-af
new file mode 100644
index 0000000..66253a4
--- /dev/null
+++ b/gcc44/patches/patch-af
@@ -0,0 +1,16 @@
+$NetBSD: patch-af,v 1.2 2011/02/25 13:34:56 hans Exp $
+
+Avoid a reference to the wrapped make in the pkgsrc work directory from showing up
+in an installed file.  See ${WRKDIR}/gcc-4.4.1/libjava/contrib/aotcompile.py.in
+
+--- libjava/configure.orig	2009-07-22 07:43:59.000000000 +0000
++++ libjava/configure	2009-09-23 12:51:11.000000000 +0000
+@@ -28129,7 +28129,7 @@ echo "${ECHO_T}Python modules dir: ${pyt
+ 
+ 
+ # needed for aot-compile-rpm
+-MAKE=`which make`
++MAKE=${PKGSRC_MAKE}
+ 
+ 
+ # Check whether --enable-aot-compile-rpm or --disable-aot-compile-rpm was given.
diff --git a/gcc44/patches/patch-ag b/gcc44/patches/patch-ag
new file mode 100644
index 0000000..61e41ef
--- /dev/null
+++ b/gcc44/patches/patch-ag
@@ -0,0 +1,29 @@
+$NetBSD: patch-ag,v 1.2 2011/05/14 18:00:24 wiz Exp $
+
+No need to use bash for this small script.
+
+Also -print0 is not portable to solaris and perhaps others.
+
+--- libjava/contrib/rebuild-gcj-db.in.orig	2008-07-02 13:17:54.000000000 +0000
++++ libjava/contrib/rebuild-gcj-db.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # rebuild-gcj-db
+ 
+ ## Copyright (C) 2000, 2002, 2003, 2008 Free Software Foundation
+@@ -16,12 +16,12 @@ for i in `@prefix@/bin/gcc --print-multi
+    base=@prefix@/lib/$dirname
+    dbLocation=`@prefix@/bin/gcj-dbtool -p $base`
+    libdir=$base/gcj
+-   if ! test -d $libdir; then
++   if test ! -d $libdir; then
+       # No shared libraries here.
+       continue
+    fi
+    dirname $dbLocation | xargs mkdir -p
+    @prefix@/bin/gcj-dbtool -n $dbLocation 64
+-   find $libdir -follow -name '*.db' -print0 | \
++   find $libdir -follow -name '*.db' -print | @AWK@ '{printf("%s%c", $1, 0);}' | \
+       @prefix@/bin/gcj-dbtool -0 -m $dbLocation $dbLocation
+ done
diff --git a/gcc44/patches/patch-ai b/gcc44/patches/patch-ai
new file mode 100644
index 0000000..31a32a6
--- /dev/null
+++ b/gcc44/patches/patch-ai
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.2 2011/05/14 18:00:24 wiz Exp $
+
+--- gcc/fortran/f95-lang.c.orig	2010-04-21 23:26:11.000000000 +0200
++++ gcc/fortran/f95-lang.c
+@@ -871,10 +871,17 @@
+ 
+   gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble, 
+ 		      BUILT_IN_CABSL, "cabsl", true);
++#if defined (__NetBSD__)
++  gfc_define_builtin ("__builtin_cabs", func_cdouble_double, 
++		      BUILT_IN_CABS, "__c99_cabs", true);
++  gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, 
++		      BUILT_IN_CABSF, "__c99_cabsf", true);
++#else
+   gfc_define_builtin ("__builtin_cabs", func_cdouble_double, 
+ 		      BUILT_IN_CABS, "cabs", true);
+   gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, 
+ 		      BUILT_IN_CABSF, "cabsf", true);
++#endif
+  
+   gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1], 
+ 		      BUILT_IN_COPYSIGNL, "copysignl", true);
diff --git a/gcc44/patches/patch-aj b/gcc44/patches/patch-aj
new file mode 100644
index 0000000..b2b5a37
--- /dev/null
+++ b/gcc44/patches/patch-aj
@@ -0,0 +1,46 @@
+$NetBSD: patch-aj,v 1.4 2013/04/29 21:34:49 joerg Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig	2009-04-09 23:23:07.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
+@@ -41,6 +41,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+ 
+     // NB: Offsets into ctype<char>::_M_table force a particular size
+     // on the mask type. Because of this, we don't use an enum.
++#if defined(_CTYPE_BL)
++    typedef unsigned short      mask;
++    static const mask upper     = _CTYPE_U;
++    static const mask lower     = _CTYPE_L;
++    static const mask alpha     = _CTYPE_A;
++    static const mask digit     = _CTYPE_D;
++    static const mask xdigit    = _CTYPE_X;
++    static const mask space     = _CTYPE_S;
++    static const mask print     = _CTYPE_R;
++    static const mask graph     = _CTYPE_G;
++    static const mask cntrl     = _CTYPE_C;
++    static const mask punct     = _CTYPE_P;
++    static const mask alnum     = _CTYPE_A | _CTYPE_D;
++#elif defined(_CTYPE_U)
++    typedef unsigned char      	mask;
++    static const mask upper    	= _CTYPE_U;
++    static const mask lower 	= _CTYPE_L;
++    static const mask alpha 	= _CTYPE_U | _CTYPE_L;
++    static const mask digit 	= _CTYPE_N;
++    static const mask xdigit 	= _CTYPE_N | _CTYPE_X;
++    static const mask space 	= _CTYPE_S;
++    static const mask print 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B;
++    static const mask graph 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
++    static const mask cntrl 	= _CTYPE_C;
++    static const mask punct 	= _CTYPE_P;
++    static const mask alnum 	= _CTYPE_U | _CTYPE_L | _CTYPE_N;
++#else
+     typedef unsigned char      	mask;
+     static const mask upper    	= _U;
+     static const mask lower 	= _L;
+@@ -53,6 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+     static const mask cntrl 	= _C;
+     static const mask punct 	= _P;
+     static const mask alnum 	= _U | _L | _N;
++#endif
+   };
+ 
+ _GLIBCXX_END_NAMESPACE
diff --git a/gcc44/patches/patch-ak b/gcc44/patches/patch-ak
new file mode 100644
index 0000000..eb821ad
--- /dev/null
+++ b/gcc44/patches/patch-ak
@@ -0,0 +1,14 @@
+$NetBSD: patch-ak,v 1.2 2011/05/14 18:00:24 wiz Exp $
+
+--- libjava/configure.host.orig	2011-02-25 16:07:42.000000000 +0100
++++ libjava/configure.host
+@@ -310,6 +310,9 @@
+   *-*-freebsd*)
+ 	slow_pthread_self=
+ 	;;
++  *-*-netbsd*)
++	slow_pthread_self=
++	;;
+   *-mingw*)
+         libgcj_flags="${libgcj_flags} -fno-omit-frame-pointer"
+   	# FIXME: win32_exception_handler( ) in win32.cc does not do the
diff --git a/gcc44/patches/patch-al b/gcc44/patches/patch-al
new file mode 100644
index 0000000..954a526
--- /dev/null
+++ b/gcc44/patches/patch-al
@@ -0,0 +1,16 @@
+$NetBSD: patch-al,v 1.2 2011/05/14 18:00:24 wiz Exp $
+
+--- libjava/configure.ac.orig	2011-02-25 16:08:27.000000000 +0100
++++ libjava/configure.ac
+@@ -1011,6 +1011,11 @@
+ 	THREADLDFLAGS=-pthread
+ 	THREADSPEC=-lpthread
+ 	;;
++     *-*-netbsd*)
++	# NetBSD should work with pthread.
++	THREADLDFLAGS=-pthread
++	THREADSPEC=-lpthread
++	;;
+      alpha*-dec-osf* | hppa*-hp-hpux*)
+ 	THREADCXXFLAGS=-pthread
+ 	# boehm-gc needs some functions from librt, so link that too.
diff --git a/gcc44/patches/patch-am b/gcc44/patches/patch-am
new file mode 100644
index 0000000..036f006
--- /dev/null
+++ b/gcc44/patches/patch-am
@@ -0,0 +1,24 @@
+$NetBSD: patch-am,v 1.1 2011/03/16 14:53:49 hans Exp $
+
+--- libjava/boehm.cc.orig       2011-03-05 18:09:36.000000000 +0000
++++ libjava/boehm.cc
+@@ -747,7 +747,8 @@ _Jv_GCAttachThread ()
+   // The registration interface is only defined on posixy systems and
+   // only actually works if pthread_getattr_np is defined.
+   // FIXME: until gc7 it is simpler to disable this on solaris.
+-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
++#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
++    && !defined(__NetBSD__)
+   GC_register_my_thread ();
+ #endif
+ }
+@@ -755,7 +756,8 @@ _Jv_GCAttachThread ()
+ void
+ _Jv_GCDetachThread ()
+ {
+-#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS)
++#if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(GC_SOLARIS_THREADS) \
++   && !defined(__NetBSD__)
+   GC_unregister_my_thread ();
+ #endif
+ }
diff --git a/gcc44/patches/patch-gcc_doc_c-tree.texi b/gcc44/patches/patch-gcc_doc_c-tree.texi
new file mode 100644
index 0000000..1263c22
--- /dev/null
+++ b/gcc44/patches/patch-gcc_doc_c-tree.texi
@@ -0,0 +1,22 @@
+$NetBSD: patch-gcc_doc_c-tree.texi,v 1.1 2014/05/06 15:28:16 richard Exp $
+
+-- Backpatch tweaks to support pkgsrc gtexinfo v5
+
+--- gcc/doc/c-tree.texi.orig	2009-02-20 15:20:38.000000000 +0000
++++ gcc/doc/c-tree.texi
+@@ -2338,13 +2338,13 @@ generate these expressions anyhow, if it
+ not matter.  The type of the operands and that of the result are
+ always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.
+ 
+-@itemx POINTER_PLUS_EXPR
++@item POINTER_PLUS_EXPR
+ This node represents pointer arithmetic.  The first operand is always
+ a pointer/reference type.  The second operand is always an unsigned
+ integer type compatible with sizetype.  This is the only binary
+ arithmetic operand that can operate on pointer types.
+ 
+-@itemx PLUS_EXPR
++@item PLUS_EXPR
+ @itemx MINUS_EXPR
+ @itemx MULT_EXPR
+ These nodes represent various binary arithmetic operations.
diff --git a/gcc44/patches/patch-gcc_doc_cppopts.texi b/gcc44/patches/patch-gcc_doc_cppopts.texi
new file mode 100644
index 0000000..d218448
--- /dev/null
+++ b/gcc44/patches/patch-gcc_doc_cppopts.texi
@@ -0,0 +1,15 @@
+$NetBSD: patch-gcc_doc_cppopts.texi,v 1.1 2014/05/06 15:28:16 richard Exp $
+
+-- Backpatch tweaks to support pkgsrc gtexinfo v5
+
+--- gcc/doc/cppopts.texi.orig	2008-06-15 09:42:13.000000000 +0000
++++ gcc/doc/cppopts.texi
+@@ -758,7 +758,7 @@ Replacement:      [    ]    @{    @}
+ Enable special code to work around file systems which only permit very
+ short file names, such as MS-DOS@.
+ 
+-@itemx --help
++@item --help
+ @itemx --target-help
+ @opindex help
+ @opindex target-help
diff --git a/gcc44/patches/patch-gcc_doc_invoke.texi b/gcc44/patches/patch-gcc_doc_invoke.texi
new file mode 100644
index 0000000..c492e85
--- /dev/null
+++ b/gcc44/patches/patch-gcc_doc_invoke.texi
@@ -0,0 +1,61 @@
+$NetBSD: patch-gcc_doc_invoke.texi,v 1.1 2014/05/06 15:28:16 richard Exp $
+
+-- Backpatch tweaks to support pkgsrc gtexinfo v5
+
+--- gcc/doc/invoke.texi.orig	2011-03-23 22:02:12.000000000 +0000
++++ gcc/doc/invoke.texi
+@@ -4645,11 +4645,11 @@ Dump after duplicating the computed goto
+ @option{-fdump-rtl-ce3} enable dumping after the three
+ if conversion passes. 
+ 
+-@itemx -fdump-rtl-cprop_hardreg
++@item -fdump-rtl-cprop_hardreg
+ @opindex fdump-rtl-cprop_hardreg
+ Dump after hard register copy propagation.
+ 
+-@itemx -fdump-rtl-csa
++@item -fdump-rtl-csa
+ @opindex fdump-rtl-csa
+ Dump after combining stack adjustments.
+ 
+@@ -4660,11 +4660,11 @@ Dump after combining stack adjustments.
+ @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
+ the two common sub-expression elimination passes.
+ 
+-@itemx -fdump-rtl-dce
++@item -fdump-rtl-dce
+ @opindex fdump-rtl-dce
+ Dump after the standalone dead code elimination passes.
+ 
+-@itemx -fdump-rtl-dbr
++@item -fdump-rtl-dbr
+ @opindex fdump-rtl-dbr
+ Dump after delayed branch scheduling.
+ 
+@@ -4709,7 +4709,7 @@ Dump after the initialization of the reg
+ @opindex fdump-rtl-initvals
+ Dump after the computation of the initial value sets.
+ 
+-@itemx -fdump-rtl-into_cfglayout
++@item -fdump-rtl-into_cfglayout
+ @opindex fdump-rtl-into_cfglayout
+ Dump after converting to cfglayout mode.
+ 
+@@ -4739,7 +4739,7 @@ Dump after removing redundant mode switc
+ @opindex fdump-rtl-rnreg
+ Dump after register renumbering.
+ 
+-@itemx -fdump-rtl-outof_cfglayout
++@item -fdump-rtl-outof_cfglayout
+ @opindex fdump-rtl-outof_cfglayout
+ Dump after converting from cfglayout mode.
+ 
+@@ -4751,7 +4751,7 @@ Dump after the peephole pass.
+ @opindex fdump-rtl-postreload
+ Dump after post-reload optimizations.
+ 
+-@itemx -fdump-rtl-pro_and_epilogue
++@item -fdump-rtl-pro_and_epilogue
+ @opindex fdump-rtl-pro_and_epilogue
+ Dump after generating the function pro and epilogues.
+ 
diff --git a/gcc44/patches/patch-gcc_doc_sourcebuild.texi b/gcc44/patches/patch-gcc_doc_sourcebuild.texi
new file mode 100644
index 0000000..d31255f
--- /dev/null
+++ b/gcc44/patches/patch-gcc_doc_sourcebuild.texi
@@ -0,0 +1,15 @@
+$NetBSD: patch-gcc_doc_sourcebuild.texi,v 1.1 2014/05/06 15:28:16 richard Exp $
+
+-- Backpatch tweaks to support pkgsrc gtexinfo v5
+
+--- gcc/doc/sourcebuild.texi.orig	2010-05-19 17:21:58.000000000 +0000
++++ gcc/doc/sourcebuild.texi
+@@ -573,7 +573,7 @@ standard rule in @file{gcc/Makefile.in}
+ @code{lang_checks}.
+ 
+ @table @code
+-@itemx all.cross
++@item all.cross
+ @itemx start.encap
+ @itemx rest.encap
+ FIXME: exactly what goes in each of these targets?
diff --git a/gcc44/patches/patch-gcc_ginclude_stddef.h b/gcc44/patches/patch-gcc_ginclude_stddef.h
new file mode 100644
index 0000000..b38a808
--- /dev/null
+++ b/gcc44/patches/patch-gcc_ginclude_stddef.h
@@ -0,0 +1,19 @@
+$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2011/05/14 18:00:24 wiz Exp $
+
+Fix build on NetBSD i386/amd64 after the ansi.h header include protection
+name change.
+
+--- gcc/ginclude/stddef.h.orig	2009-04-09 23:23:07.000000000 +0000
++++ gcc/ginclude/stddef.h
+@@ -53,6 +53,11 @@ see the files COPYING3 and COPYING.RUNTI
+    one less case to deal with in the following.  */
+ #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+ #include <machine/ansi.h>
++#if !defined(_MACHINE_ANSI_H_)
++#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
++#define _MACHINE_ANSI_H_
++#endif
++#endif
+ #endif
+ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
+ #if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
diff --git a/gcc44/patches/patch-gcc_toplev.h b/gcc44/patches/patch-gcc_toplev.h
new file mode 100644
index 0000000..099bc44
--- /dev/null
+++ b/gcc44/patches/patch-gcc_toplev.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-gcc_toplev.h,v 1.1 2013/03/02 18:05:01 joerg Exp $
+
+--- gcc/toplev.h.orig	2009-02-20 15:20:38.000000000 +0000
++++ gcc/toplev.h
+@@ -186,13 +186,13 @@ extern int floor_log2                  (
+ #  define CTZ_HWI __builtin_ctz
+ # endif
+ 
+-extern inline int
++extern __attribute__((__gnu_inline__)) inline int
+ floor_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
+ }
+ 
+-extern inline int
++extern __attribute__((__gnu_inline__)) inline int
+ exact_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
diff --git a/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h b/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
new file mode 100644
index 0000000..8345804
--- /dev/null
+++ b/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h,v 1.1 2013/04/29 21:34:49 joerg Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig	2009-04-09 23:23:07.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
+@@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
+   is(const char* __low, const char* __high, mask* __vec) const
+   {
+     while (__low < __high)
+-      *__vec++ = _M_table[*__low++];
++      *__vec++ = _M_table[(unsigned char)*__low++];
+     return __high;
+   }
+ 
diff --git a/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h b/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h
new file mode 100644
index 0000000..b2e67cd
--- /dev/null
+++ b/gcc44/patches/patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h
@@ -0,0 +1,57 @@
+$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h,v 1.1 2013/04/29 21:34:49 joerg Exp $
+
+--- libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h.orig	2013-04-28 21:00:32.000000000 +0000
++++ libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h
+@@ -33,11 +33,17 @@
+   
+ // Information as gleaned from /usr/include/ctype.h
+ 
++#ifndef _CTYPE_BL
+   extern "C" const u_int8_t _C_ctype_[];
++#endif
+ 
+   const ctype_base::mask*
+   ctype<char>::classic_table() throw()
+-  { return _C_ctype_ + 1; }
++#ifdef _CTYPE_BL
++  { return _C_ctype_tab_ + 1; }
++#else
++   { return _C_ctype_ + 1; }
++#endif
+ 
+   ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
+ 		     size_t __refs) 
+@@ -64,14 +70,14 @@
+ 
+   char
+   ctype<char>::do_toupper(char __c) const
+-  { return ::toupper((int) __c); }
++  { return ::toupper((int)(unsigned char) __c); }
+ 
+   const char*
+   ctype<char>::do_toupper(char* __low, const char* __high) const
+   {
+     while (__low < __high)
+       {
+-	*__low = ::toupper((int) *__low);
++	*__low = ::toupper((int)(unsigned char) *__low);
+ 	++__low;
+       }
+     return __high;
+@@ -79,14 +85,14 @@
+ 
+   char
+   ctype<char>::do_tolower(char __c) const
+-  { return ::tolower((int) __c); }
++  { return ::tolower((int)(unsigned char) __c); }
+ 
+   const char* 
+   ctype<char>::do_tolower(char* __low, const char* __high) const
+   {
+     while (__low < __high)
+       {
+-	*__low = ::tolower((int) *__low);
++	*__low = ::tolower((int)(unsigned char) *__low);
+ 	++__low;
+       }
+     return __high;


Home | Main Index | Thread Index | Old Index