Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
This is the gcc 4.6 compiler suite.
This package has a test target. For testing (only), this
package requires devel/dejagnu and devel/autogen.
+145
View File
@@ -0,0 +1,145 @@
# $NetBSD: Makefile,v 1.23 2013/05/31 12:41:11 wiz Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc46-${GCC_VERSION}
PKGREVISION= 5
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= sbd@NetBSD.org
HOMEPAGE= http://gcc.gnu.org/
COMMENT= GNU Compiler Collection 4.6
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.6.3
GCC_SUBPREFIX= gcc46
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
FILES_SUBST+= PKGNAME=${PKGNAME}
MESSAGE_SUBST+= GCC_PREFIX=${GCC_PREFIX}
# 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+= --enable-libssp
CONFIGURE_ARGS+= --enable-threads=posix
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --with-gnu-ld --with-ld=/usr/bin/ld
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/bin/as
MAKE_ENV+= ac_cv_func_clock_gettime=yes
.endif
.if ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --disable-libquadmath --disable-libquadmath-support
.endif
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+= ac_cv_path_SED=${TOOLS_SED}
MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED}
CPPFLAGS+= -I${BUILDLINK_DIR}/include
CFLAGS+= -I${BUILDLINK_DIR}/include
# Someone should fix this so it will match the NetBSD system compiler
#.if ${OPSYS} == "NetBSD"
#GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
#CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
#MAKE_ENV+= AR=/usr/bin/ar
#.endif # NetBSD
pre-configure:
.if ${OPSYS} == "DragonFly"
${CP} ${FILESDIR}/dragonfly.h ${WRKSRC}/gcc/config/dragonfly.h
${CP} ${FILESDIR}/dragonfly-spec.h ${WRKSRC}/gcc/config/dragonfly-spec.h
${CP} ${FILESDIR}/i386-dragonfly.h ${WRKSRC}/gcc/config/i386/dragonfly.h
${CP} ${FILESDIR}/i386-dragonfly64.h ${WRKSRC}/gcc/config/i386/dragonfly64.h
.endif
.if ${OPSYS} == "NetBSD"
${CP} ${WRKSRC}/gcc/config/freebsd-stdint.h ${WRKSRC}/gcc/config/netbsd-stdint.h
.endif
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
(${_ULIMIT_CMD} 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"
+3
View File
@@ -0,0 +1,3 @@
* TODO make java target work
* TODO Make it work on Dragonfly
+74
View File
@@ -0,0 +1,74 @@
# $NetBSD: buildlink3.mk,v 1.6 2013/04/06 11:06:52 rodent Exp $
BUILDLINK_TREE+= gcc46
.if !defined(GCC46_BUILDLINK3_MK)
GCC46_BUILDLINK3_MK:=
FIND_PREFIX:= BUILDLINK_PREFIX.gcc46=gcc46
.include "../../mk/find-prefix.mk"
_GCC46_SUBDIR= gcc46
_GCC46_PREFIX= ${BUILDLINK_PREFIX.gcc46}/${_GCC46_SUBDIR}
BUILDLINK_API_DEPENDS.gcc46+= gcc46>=${_GCC_REQD}
BUILDLINK_ABI_DEPENDS.gcc46+= gcc46>=4.6.0
BUILDLINK_PKGSRCDIR.gcc46?= ../../lang/gcc46
.if exists(${_GCC46_PREFIX}/bin/gcc)
# logic for detecting the ADA compiler (not yet supported)
#gcc46_GNAT1!=${_GCC46_PREFIX}/bin/gcc -print-prog-name=gnat1
#. if exists(${gcc46_GNAT1})
#CONFIGURE_ENV+= ADAC=${_GCC46_PREFIX}/bin/gcc
#MAKE_ENV+= ADAC=${_GCC46_PREFIX}/bin/gcc
#. endif
# add libraries
BUILDLINK_LIBDIRS.gcc46+= ${_GCC46_SUBDIR}/lib
# find the gcc architecture
gcc46_GCC_ARCHDIR!= ${DIRNAME} `${_GCC46_PREFIX}/bin/gcc --print-libgcc-file-name`
# add the architecture dep libraries
. if empty(gcc46_GCC_ARCHDIR:M*not_found*)
BUILDLINK_LIBDIRS.gcc46+= ${gcc46_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc46}\///}/
# add the ada libraries (not yet supported)
#. if exists(${gcc46_GNAT1})
#BUILDLINK_LIBDIRS.gcc46+= ${gcc46_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc46}\///}/adalib
#. endif
# add the header files
BUILDLINK_INCDIRS.gcc46+= ${_GCC46_SUBDIR}/include ${gcc46_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc46}\///}/include
. endif
.endif
BUILDLINK_FILES_CMD.gcc46= \
(cd ${BUILDLINK_PREFIX.gcc46} && \
${FIND} ${_GCC46_SUBDIR}/bin ${_GCC46_SUBDIR}/include ${_GCC46_SUBDIR}/libexec ${_GCC46_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.gcc46+= full
.else
BUILDLINK_DEPMETHOD.gcc46?= build
.endif
.include "../../mk/pthread.buildlink3.mk"
pkgbase := gcc46
.include "../../mk/pkg-build-options.mk"
.if !empty(PKG_BUILD_OPTIONS.gcc46:Mnls)
.include "../../devel/gettext-lib/buildlink3.mk"
.endif
.endif # GCC46_BUILDLINK3_MK
BUILDLINK_TREE+= -gcc46
+19
View File
@@ -0,0 +1,19 @@
$NetBSD: distinfo,v 1.13 2013/04/30 22:24:15 joerg Exp $
SHA1 (gcc-4.6.3.tar.bz2) = ce317ca5c8185b58bc9300182b534608c578637f
RMD160 (gcc-4.6.3.tar.bz2) = 9abb2f940d08fc84f2d91b6a6ce8d662ca889269
Size (gcc-4.6.3.tar.bz2) = 71999439 bytes
SHA1 (patch-aa) = e68232cd14d6be31dd2c45aefb454dde75d0bbba
SHA1 (patch-ab) = 419dbd3e80b960ac391dba123d8de68abdd35355
SHA1 (patch-ac) = 0f708412670eca90c2c8e3fa675cffb14be768cd
SHA1 (patch-ad) = b5e17219e7b7ba158b9f3e1a67e155fb158b4484
SHA1 (patch-af) = e4e194ef29924eb986536972c5f5e9f37d98eba3
SHA1 (patch-ag) = 1753d08075de8527d8f14afc3df4afeacb10d507
SHA1 (patch-ah) = 8df9292331e68a69481aaabc894f285199a7eb05
SHA1 (patch-ak) = 377d6ab5d454f0af2709680dd656f0449228aca9
SHA1 (patch-al) = 20d16fba8c1b9e578c9df6523397e29a94409990
SHA1 (patch-gcc_config_arm_elf.h) = 28c67bb698ebe9a3aa45c4cff29f028c82cc7606
SHA1 (patch-gcc_config_arm_t-netbsd) = a1682f4f8dc7e393446f19f615737ddfc98fcb7f
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h) = 7e8413cf45d49890ad7634f9276188413c8ed30a
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h) = 830038744cbbb713ecc3f960a9509bef16176db9
SHA1 (patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h) = ce481809b051cb281772a0ad4d561241731f7556
+215
View File
@@ -0,0 +1,215 @@
/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h,v 1.5 2008/07/24 21:45:10 corecode Exp $ */
/* Base configuration file for all DragonFly targets.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Common DragonFly configuration.
All DragonFly architectures should include this file, which will specify
their commonalities.
Adapted from gcc/config/freebsd-spec.h by
Joerg Sonnenberger <joerg@bec.de>
Adapted from gcc/config/freebsd.h by
David O'Brien <obrien@FreeBSD.org>
Loren J. Rittle <ljrittle@acm.org>. */
/* This defines which switch letters take arguments. On DragonFly, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (coming from SVR4).
We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
#define DFBSD_SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \
|| (CHAR) == 'z' /* ignored by ld */ \
|| (CHAR) == 'R')
/* This defines which multi-letter switches take arguments. */
#define DFBSD_WORD_SWITCH_TAKES_ARG(STR) \
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|| !strcmp ((STR), "rpath") || !strcmp ((STR), "rpath-link") \
|| !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \
|| !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker"))
#define DFBSD_TARGET_OS_CPP_BUILTINS() \
do \
{ \
if (DFBSD_MAJOR == 3) \
builtin_define ("__DragonFly__=3"); \
else if (DFBSD_MAJOR == 2) \
builtin_define ("__DragonFly__=2"); \
else if (DFBSD_MAJOR == 1) \
builtin_define ("__DragonFly__=1"); \
else \
builtin_define ("__DragonFly__"); \
builtin_define ("__DragonFly_cc_version=100001"); \
builtin_define_std ("unix"); \
builtin_define ("__KPRINTF_ATTRIBUTE__"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=bsd"); \
builtin_assert ("system=DragonFly"); \
DFBSD_TARGET_CPU_CPP_BUILTINS(); \
} \
while (0)
/* Define the default DragonFly-specific per-CPU hook code. */
#define DFBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0)
/* Provide a CPP_SPEC appropriate for DragonFly. We just deal with the GCC
option `-posix', and PIC issues. */
#define DFBSD_CPP_SPEC " \
%(cpp_cpu) \
%{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__} \
%{posix:-D_POSIX_SOURCE}"
/* Provide a STARTFILE_SPEC appropriate for DragonFly. Here we add
the magical crtbegin.o file (see crtstuff.c) which provides part
of the support for getting C++ file-scope static object constructed
before entering `main'. */
#define DFBSD_STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for DragonFly. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
the support for getting C++ file-scope static object constructed
before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#define DFBSD_ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
/* Provide a LIB_SPEC appropriate for DragonFly as configured and as
required by the user-land thread model. Select the appropriate libc,
depending on whether we're doing profiling or need threads support.
Make it a hard error if -pthread is provided on the command line and gcc
was configured with --disable-threads (this will help avoid bug
reports from users complaining about threading when they
misconfigured the gcc bootstrap but are later consulting DragonFly
manual pages that refer to the mythical -pthread option). */
/* Provide a LIB_SPEC appropriate for DragonFly. Just select the appropriate
libc, depending on whether we're doing profiling or need threads support.
(simular to the default, except no -lg, and no -p). */
#ifdef DFBSD_NO_THREADS
#define DFBSD_LIB_SPEC " \
%{pthread: %eThe -pthread option is only supported on DragonFly when gcc \
is built with the --enable-threads configure-time option.} \
%{!nostdlib{!nostartfiles{!nolibc: -lc}}} \
}"
#else
#define DFBSD_LIB_SPEC " \
%{pthread:-lpthread} \
%{!nostdlib: %{!nostartfiles: %{!nolibc: -lc}}} \
"
#endif
#define DFBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.2"
#if 0
#define LINK_LIBGCC_SPEC ""
#define LIBGCC_SPEC "%{shared: -lgcc_pic} %{!shared: -lgcc}"
#define PRE_LIB_SPEC " \
%{pg: -L"PREFIX2"/lib/gcc41/profiling \
%{!static: -rpath /usr/lib/gcc41/profiling \
-rpath-link "PREFIX2"/lib/gcc41/profiling}} \
%{g: -L"PREFIX2"/lib/gcc41/debug \
%{!static: -rpath /usr/lib/gcc41/debug \
-rpath-link "PREFIX2"/lib/gcc41/debug}} \
-L"PREFIX2"/lib/gcc41 \
%{!static: -rpath /usr/lib/gcc41 -rpath-link "PREFIX2"/lib/gcc41} \
%{pg: -L"PREFIX2"/lib/profiling \
%{!static: -rpath /usr/lib/profiling \
-rpath-link "PREFIX2"/lib/profiling}} \
%{g: -L"PREFIX2"/lib/debug \
%{!static: -rpath /usr/lib/debug -rpath-link "PREFIX2"/lib/debug}} \
%{!static: -rpath /usr/lib -rpath-link "PREFIX2"/lib} \
"
#define DFBSD_LINK_COMMAND_SPEC "\
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
%{static:} %{L*} %(link_libgcc) %o \
%{fprofile-arcs|fprofile-generate: -lgcov}\
%{!nostdlib:%{!nodefaultlibs:%(pre_lib)}}\
%{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}\
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
#ifndef PREFIX2
#define PREFIX2 "/usr"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_1
#define STANDARD_STARTFILE_PREFIX_1 PREFIX2"/lib/gcc41/"
#endif
#ifndef STANDARD_EXEC_PREFIX
#define STANDARD_EXEC_PREFIX PREFIX2"/libexec/gcc41/"
#endif
#ifndef STANDARD_STARTFILE_PREFIX
#define STANDARD_STARTFILE_PREFIX PREFIX2"/lib/"
#endif
#ifndef TOOLDIR_BASE_PREFIX
#define TOOLDIR_BASE_PREFIX PREFIX2"/libexec/gcc41"
#endif
#ifndef STANDARD_BINDIR_PREFIX
#define STANDARD_BINDIR_PREFIX PREFIX2"/libexec/gcc41"
#endif
#ifndef STANDARD_LIBEXEC_PREFIX
#define STANDARD_LIBEXEC_PREFIX PREFIX2"/libexec/gcc41"
#endif
#ifndef GPLUSPLUS_INCLUDE_DIR
#define GPLUSPLUS_INCLUDE_DIR PREFIX2"/include/c++"
#endif
#ifndef GPLUSPLUS_TOOL_INCLUDE_DIR
#define GPLUSPLUS_TOOL_INCLUDE_DIR PREFIX2"/include/c++/4.1"
#endif
#ifndef GPLUSPLUS_BACKWARD_INCLUDE_DIR
#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX2"/include/c++/4.1/backward"
#endif
#ifndef GCC_LOCAL_INCLUDE_DIR
#define GCC_LOCAL_INCLUDE_DIR PREFIX2"/libdata/gcc41"
#endif
#ifndef GCC_INCLUDE_DIR
#define GCC_INCLUDE_DIR PREFIX2"/include"
#endif
#undef INCLUDE_DEFAULTS
#define INCLUDE_DEFAULTS \
{ \
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
{ GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0 }, \
{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0 }, \
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
{ GCC_LOCAL_INCLUDE_DIR, "GCC", 0, 0 }, \
{ NULL, NULL, 0, 0 } \
}
#endif
+97
View File
@@ -0,0 +1,97 @@
/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/dragonfly.h,v 1.2 2008/05/19 10:46:39 corecode Exp $ */
/* Base configuration file for all DragonFly targets.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Common DragonFly configuration.
All DragonFly architectures should include this file, which will specify
their commonalities.
Adapted from gcc/config/freebsd.h by
Joerg Sonnenberger <joerg@bec.de>
Adapted from gcc/config/i386/freebsd-elf.h by
David O'Brien <obrien@FreeBSD.org>.
Further work by David O'Brien <obrien@FreeBSD.org> and
Loren J. Rittle <ljrittle@acm.org>. */
/* This defines which switch letters take arguments. On DragonFly, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (coming from SVR4).
We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) (DFBSD_SWITCH_TAKES_ARG(CHAR))
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) (DFBSD_WORD_SWITCH_TAKES_ARG(STR))
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() DFBSD_TARGET_OS_CPP_BUILTINS()
#undef CPP_SPEC
#define CPP_SPEC DFBSD_CPP_SPEC
#undef STARTFILE_SPEC
#define STARTFILE_SPEC DFBSD_STARTFILE_SPEC
#undef ENDFILE_SPEC
#define ENDFILE_SPEC DFBSD_ENDFILE_SPEC
#undef LIB_SPEC
#define LIB_SPEC DFBSD_LIB_SPEC
#if 0
#undef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC DFBSD_LINK_COMMAND_SPEC
#endif
/************************[ Target stuff ]***********************************/
/* All DragonFly Architectures support the ELF object file format. */
#undef OBJECT_FORMAT_ELF
#define OBJECT_FORMAT_ELF
/* Don't assume anything about the header files. */
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C 1
/* Make gcc agree with DragonFly's standard headers (<machine/stdint.h>, etc...) */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#define MATH_LIBRARY_PROFILE "-lm_p"
/* Code generation parameters. */
/* Use periods rather than dollar signs in special g++ assembler names.
This ensures the configuration knows our system correctly so we can link
with libraries compiled with the native cc. */
#undef NO_DOLLAR_IN_LABEL
/* Define this so we can compile MS code for use with WINE. */
#define HANDLE_PRAGMA_PACK_PUSH_POP
/* Used by libgcc2.c. We support file locking with fcntl / F_SETLKW.
This enables the test coverage code to use file locking when exiting a
program, which avoids race conditions if the program has forked. */
#define TARGET_POSIX_IO
+5
View File
@@ -0,0 +1,5 @@
PROGRAM hello
print*, 'Hello, World!'
END
+6
View File
@@ -0,0 +1,6 @@
#import <stdio.h>
int main( int argc, const char *argv[] ) {
printf( "hello world\n" );
return 0;
}
+148
View File
@@ -0,0 +1,148 @@
/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/i386/dragonfly.h,v 1.1 2006/09/27 12:10:34 corecode Exp $ */
/* Definitions for Intel 386 running DragonFly with ELF format
Copyright (C) 1996, 2000, 2002 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu.
Adapted from GNU/Linux version by John Polstra.
Continued development by David O'Brien <obrien@freebsd.org>
Adapted from the FreeBSD version.
Changes:
- remove support for changing the dynamic linker
This file is part of GCC.
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (i386 DragonFly/ELF)");
/* Override the default comment-starter of "/". */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
#undef NO_PROFILE_COUNTERS
#define NO_PROFILE_COUNTERS 1
/* Tell final.c that we don't need a label passed to mcount. */
#undef MCOUNT_NAME
#define MCOUNT_NAME ".mcount"
/* Make gcc agree with <machine/ansi.h>. */
#undef SIZE_TYPE
#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD)
#undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
#define SUBTARGET_EXTRA_SPECS \
{ "dfbsd_dynamic_linker", DFBSD_DYNAMIC_LINKER }
/* Provide a STARTFILE_SPEC appropriate for DragonFly. Here we add
the magical crtbegin.o file (see crtstuff.c) which provides part
of the support for getting C++ file-scope static object constructed
before entering `main'. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for DragonFly. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
the support for getting C++ file-scope static object constructed
before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
/* Provide a LINK_SPEC appropriate for DragonFly. Here we provide support
for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate
combinations of options at link-time. We like to support here for
as many of the other GNU linker options as possible. But I don't
have the time to search for those flags. I am sure how to add
support for -soname shared_object_name. H.J.
I took out %{v:%{!V:-V}}. It is too much :-(. They can use
-Wl,-V.
When the -shared link option is used a final link is not being
done. */
#undef LINK_SPEC
#define LINK_SPEC "\
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(dfbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{symbolic:-Bsymbolic}"
/* A C statement to output to the stdio stream FILE an assembler
command to advance the location counter to a multiple of 1<<LOG
bytes if it is within MAX_SKIP bytes.
This is used to align code labels according to Intel recommendations. */
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#undef ASM_OUTPUT_MAX_SKIP_ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \
if ((LOG) != 0) { \
if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
}
#endif
/* Don't default to pcc-struct-return, we want to retain compatibility with
older gcc versions AND pcc-struct-return is nonreentrant.
(even though the SVR4 ABI for the i386 says that records and unions are
returned in memory). */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
/* DragonFly sets the rounding precision of the FPU to 53 bits. Let the
compiler get the contents of <float.h> and std::numeric_limits correct. */
#undef TARGET_96_ROUND_53_LONG_DOUBLE
#define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
+54
View File
@@ -0,0 +1,54 @@
/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/config/i386/dragonfly64.h,v 1.1 2007/01/15 17:53:16 corecode Exp $ */
/* Definitions for AMD x86-64 running DragonFly with ELF format
Copyright (C) 2002 Free Software Foundation, Inc.
Contributed by David O'Brien <obrien@FreeBSD.org>
Adapted from the FreeBSD version.
This file is part of GCC.
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* $FreeBSD: src/contrib/gcc/config/i386/freebsd64.h,v 1.9 2004/07/28 04:44:23 kan Exp $ */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (x86-64 DragonFly/ELF)");
/* Tell final.c that we don't need a label passed to mcount. */
#define SUBTARGET_EXTRA_SPECS \
{ "dfbsd_dynamic_linker", DFBSD_DYNAMIC_LINKER }
#undef MCOUNT_NAME
#define MCOUNT_NAME ".mcount"
/* Provide a LINK_SPEC appropriate for the DragonFly/x86-64 ELF target.
This is a copy of LINK_SPEC from <i386/dragonfly.h> tweaked for
the x86-64 target.
XXX We don't support two arch userland yet */
#undef LINK_SPEC
#define LINK_SPEC "\
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(dfbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{symbolic:-Bsymbolic}"
+64
View File
@@ -0,0 +1,64 @@
#if 0 /* $NetBSD: values.c,v 1.1 2011/10/13 10:39:45 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>
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
+9
View File
@@ -0,0 +1,9 @@
# $NetBSD: hacks.mk,v 1.2 2013/04/03 19:29:23 jmcneill Exp $
#
# Avoid -fkeep-inline-functions with NetBSD/arm
#
.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "arm"
PKG_HACKS+= netbsd-arm-stage1-fix
CONFIGURE_ARGS+= --disable-bootstrap
.endif
+104
View File
@@ -0,0 +1,104 @@
# $NetBSD: options.mk,v 1.8 2012/04/13 11:02:47 hans Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gcc46
PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada
PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc
.if ${OPSYS} == "NetBSD"
PKG_SUGGESTED_OPTIONS+= nls
.elif ${OPSYS} == "SunOS"
PKG_SUGGESTED_OPTIONS+= gcc-inplace-math
.endif
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/mpcomplex/inplace.mk"
.include "../../math/mpfr/inplace.mk"
.else
CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
LIBS.SunOS+= -lgmp
.include "../../devel/gmp/buildlink3.mk"
.include "../../math/mpcomplex/buildlink3.mk"
.include "../../math/mpfr/buildlink3.mk"
.endif
###
### Native Language Support
###
.if !empty(PKG_OPTIONS:Mnls)
USE_TOOLS+= msgfmt
CONFIGURE_ARGS+= --enable-nls
CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.libiconv}
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.6.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
CONFIGURE_ARGS+= --with-gxx-include-dir=${GCC_PREFIX}/include/c++/
.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
+82
View File
@@ -0,0 +1,82 @@
$NetBSD: patch-aa,v 1.3 2012/04/17 07:48:13 sbd Exp $
* Add t-crtstuff to tmake_file on NetBSD.
* Add netbsd-stdint.h to tm_file on NetBSD.
* wrap the system stdint.h on NetBSD.
* Add Dragonfly support.
--- gcc/config.gcc.orig 2011-07-22 18:44:50.000000000 +0200
+++ gcc/config.gcc 2012-03-13 13:40:05.000000000 +0100
@@ -561,6 +561,33 @@
# need_64bit_hwint=yes # system compiler has this for all arch!
use_gcc_stdint=wrap
;;
+*-*-dragonfly*)
+ gas=yes
+ gnu_ld=yes
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+ case ${target} in
+ *-*-dragonfly1 | *-*-dragonfly[1].*)
+ tm_defines="${tm_defines} DFBSD_MAJOR=1" ;;
+ *-*-dragonfly2 | *-*-dragonfly[2].*)
+ tm_defines="${tm_defines} DFBSD_MAJOR=2" ;;
+ *-*-dragonfly3 | *-*-dragonfly[3].*)
+ tm_defines="${tm_defines} DFBSD_MAJOR=3" ;;
+ *-*-dragonfly4 | *-*-dragonfly[4].*)
+ tm_defines="${tm_defines} DFBSD_MAJOR=4" ;;
+ *)
+ echo 'Please update *-*-dragonfly* in gcc/config.gcc'
+ exit 1
+ ;;
+ esac
+ tmake_file="t-slibgcc-elf-ver t-dragonfly"
+ case ${enable_threads} in
+ "" | yes | posix)
+ thread_file='posix'
+ tmake_file="${tmake_file} t-dragonfly-thread"
+ ;;
+ esac
+ dfbsd_tm_file="${dfbsd_tm_file} dragonfly-spec.h dragonfly.h"
+ ;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
extra_options="$extra_options gnu-user.opt"
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
@@ -655,6 +682,7 @@
default_use_cxa_atexit=yes
;;
esac
+ use_gcc_stdint=wrap
;;
*-*-openbsd*)
tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
@@ -1219,19 +1247,26 @@
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
tmake_file="${tmake_file} i386/t-crtstuff"
;;
+x86_64-*-dragonfly*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${dfbsd_tm_file} i386/x86-64.h i386/dragonfly.h i386/dragonfly64.h"
+ ;;
+i[34567]86-*-dragonfly*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${dfbsd_tm_file} i386/dragonfly.h"
+ ;;
i[34567]86-*-netbsdelf*)
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ tmake_file="${tmake_file} i386/t-crtstuff"
;;
i[34567]86-*-netbsd*)
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h netbsd-stdint.h"
extra_options="${extra_options} netbsd.opt"
tmake_file="${tmake_file} t-netbsd"
extra_parts=""
use_collect2=yes
;;
x86_64-*-netbsd*)
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h netbsd-stdint.h"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
tmake_file="${tmake_file} i386/t-crtstuff"
;;
+26
View File
@@ -0,0 +1,26 @@
$NetBSD: patch-ab,v 1.2 2012/04/17 07:48:13 sbd Exp $
* Add Dragonfly support.
--- libgcc/config.host.orig 2011-03-14 06:06:23.000000000 +0000
+++ libgcc/config.host
@@ -159,6 +159,8 @@ case ${host} in
# machine-specific sections may refine and add to this
# configuration.
;;
+*-*-dragonfly*)
+ ;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
;;
@@ -287,6 +289,10 @@ i[34567]86-*-freebsd*)
x86_64-*-freebsd*)
tmake_file="${tmake_file} i386/t-freebsd"
;;
+i[34567]86-*-dragonfly*)
+ ;;
+x86_64-*-dragonfly*)
+ ;;
i[34567]86-*-netbsdelf*)
;;
i[34567]86-*-netbsd*)
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-ac,v 1.3 2012/04/17 08:24:54 wiz Exp $
Add gcc libdir to a programs rpath so that _this gcc's_ support libraries
are found.
--- 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/\" \
+28
View File
@@ -0,0 +1,28 @@
$NetBSD: patch-ad,v 1.3 2012/05/03 12:20:19 hans Exp $
--- configure.orig 2011-03-16 18:27:36.000000000 +0000
+++ configure
@@ -5269,7 +5269,7 @@ 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 $gmpinc"
fi
if test "x$with_mpfr_include" != x; then
@@ -5279,9 +5279,11 @@ 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/'"$lt_cv_objdir $gmplibs"
- gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
- extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
+ sdir=
+ test -d "${srcdir}/mpfr/src" && sdir=/src
+ gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr'"$sdir/$lt_cv_objdir $gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr'"$sdir "'-I$$s/mpfr'"$sdir $gmpinc"
+ extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr'"$sdir "'--with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr'"$sdir/$lt_cv_objdir"
# 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
+17
View File
@@ -0,0 +1,17 @@
$NetBSD: patch-af,v 1.2 2012/04/17 07:48:13 sbd Exp $
Avoid a reference to the wrapped make in the pkgsrc work directory from
showing up in an installed file.
See: libjava/contrib/aotcompile.py.in
--- libjava/configure.orig 2011-03-25 17:07:00.000000000 +0000
+++ libjava/configure
@@ -24653,7 +24653,7 @@ $as_echo "Python modules dir: ${python_m
# needed for aot-compile-rpm
-MAKE=`which make`
+MAKE=${PKGSRC_MAKE}
# Check whether --enable-aot-compile-rpm was given.
+29
View File
@@ -0,0 +1,29 @@
$NetBSD: patch-ag,v 1.2 2012/04/17 07:48:13 sbd 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
+25
View File
@@ -0,0 +1,25 @@
$NetBSD: patch-ah,v 1.2 2012/04/17 07:48:13 sbd Exp $
On NetBSD the 'cabs' and 'cabsf' functions are are __RENAME so that
thay have '__c99_' prefixes.
--- gcc/fortran/f95-lang.c.orig 2011-02-24 09:53:26.000000000 +0000
+++ gcc/fortran/f95-lang.c
@@ -824,10 +824,17 @@ gfc_init_builtin_functions (void)
gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble,
BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST);
+#if defined(__NetBSD__)
+ gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
+ BUILT_IN_CABS, "__c99_cabs", ATTR_CONST_NOTHROW_LEAF_LIST);
+ gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
+ BUILT_IN_CABSF, "__c99_cabsf", ATTR_CONST_NOTHROW_LEAF_LIST);
+#else
gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
BUILT_IN_CABS, "cabs", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
BUILT_IN_CABSF, "cabsf", ATTR_CONST_NOTHROW_LEAF_LIST);
+#endif
gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1],
BUILT_IN_COPYSIGNL, "copysignl",
+19
View File
@@ -0,0 +1,19 @@
$NetBSD: patch-ak,v 1.2 2012/04/17 07:48:13 sbd Exp $
Fix build on NetBSD i386/amd64 after the ansi.h header include protection
name change.
--- gcc/ginclude/stddef.h.orig 2011-01-29 22:15:52.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)
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-al,v 1.3 2012/04/17 07:48:13 sbd Exp $
"#pragma weak" shouldn't be used on NetBSD.
--- libgfortran/configure.orig 2011-06-27 10:13:01.000000000 +0000
+++ libgfortran/configure
@@ -25699,7 +25699,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con
fi
case "$host" in
- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | alpha*-dec-osf* )
+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | alpha*-dec-osf* | *-*-netbsd* )
$as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
@@ -0,0 +1,14 @@
$NetBSD: patch-gcc_config_arm_elf.h,v 1.1 2013/04/02 22:31:40 jmcneill Exp $
--- gcc/config/arm/elf.h.orig 2009-06-21 20:48:15.000000000 +0000
+++ gcc/config/arm/elf.h
@@ -161,6 +161,9 @@
#undef L_floatdidf
#undef L_floatdisf
#undef L_floatundidf
+/* XXXMRG: don't take this out, we need it! */
+# ifndef __NetBSD__
#undef L_floatundisf
+# endif
#endif
@@ -0,0 +1,19 @@
$NetBSD: patch-gcc_config_arm_t-netbsd,v 1.1 2013/04/02 22:31:40 jmcneill Exp $
--- gcc/config/arm/t-netbsd.orig 2009-04-21 19:03:23.000000000 +0000
+++ gcc/config/arm/t-netbsd
@@ -23,6 +23,14 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
LIBGCC2_DEBUG_CFLAGS = -g0
LIB2FUNCS_EXTRA = $(srcdir)/config/floatunsidf.c $(srcdir)/config/floatunsisf.c
+# This list is from t-arm-elf, but with some things removed.
+LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func \
+ _call_via_rX _interwork_call_via_rX \
+ _arm_fixunsdfsi _arm_fixunssfsi \
+ _arm_floatdidf _arm_floatdisf _arm_floatundidf _arm_floatundisf \
+ _lshrdi3 _ashrdi3 _ashldi3 \
+ _clzsi2 _clzdi2
+
# Build a shared libgcc library.
SHLIB_EXT = .so
SHLIB_NAME = @shlib_base_name@.so
@@ -0,0 +1,69 @@
$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__base.h,v 1.2 2013/04/30 22:24:16 joerg Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2011-01-30 22:39:36.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
@@ -30,8 +30,6 @@
// Full details can be found from the CVS files at:
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
-
-#include <sys/param.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
@@ -45,21 +43,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 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;
-
-#if __NetBSD_Version__ < 599004100
- static const mask upper = _U;
- static const mask lower = _L;
- static const mask alpha = _U | _L;
- static const mask digit = _N;
- static const mask xdigit = _N | _X;
- static const mask space = _S;
- static const mask print = _P | _U | _L | _N | _B;
- static const mask graph = _P | _U | _L | _N;
- static const mask cntrl = _C;
- static const mask punct = _P;
- static const mask alnum = _U | _L | _N;
-#else
static const mask upper = _CTYPE_U;
static const mask lower = _CTYPE_L;
static const mask alpha = _CTYPE_U | _CTYPE_L;
@@ -71,6 +69,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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;
+ static const mask alpha = _U | _L;
+ static const mask digit = _N;
+ static const mask xdigit = _N | _X;
+ static const mask space = _S;
+ static const mask print = _P | _U | _L | _N | _B;
+ static const mask graph = _P | _U | _L | _N;
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
#endif
};
@@ -0,0 +1,13 @@
$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__inline.h,v 1.1 2013/04/30 22:24:16 joerg Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig 2011-01-30 22:39:36.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
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;
}
@@ -0,0 +1,57 @@
$NetBSD: patch-libstdc++-v3_config_os_bsd_netbsd_ctype__noninline.h,v 1.1 2013/04/30 22:24:16 joerg Exp $
--- libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h.orig 2011-01-03 20:52:22.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h
@@ -34,11 +34,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)
@@ -65,14 +71,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;
@@ -80,14 +86,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;