import separate port of gfortran 4.2.1, in sync with the base compiler.
meant to be used on archs that have gcc4 in base, this doesn't require a full gcc build from ports, and provides libgfortran as a subpackage. idea from espie some months ago.
This commit is contained in:
parent
6b8a442224
commit
6f0b523996
126
lang/gfortran/Makefile
Normal file
126
lang/gfortran/Makefile
Normal file
@ -0,0 +1,126 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = ${GCC4_ARCHS}
|
||||
SYSV = 4.2.1
|
||||
|
||||
COMMENT-main = GNU fortran 77 and fortran 95 compiler
|
||||
COMMENT-lib = GNU fortran library
|
||||
|
||||
V = 4.2.1
|
||||
PKGNAME = gfortran-$V
|
||||
PKGNAME-main = gfortran-$V
|
||||
PKGNAME-lib = libgfortran-$V
|
||||
SHARED_LIBS = gfortran 2.0
|
||||
|
||||
CATEGORIES = lang math
|
||||
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_DISTFILES_CDROM =Yes
|
||||
|
||||
HOMEPAGE = http://gcc.gnu.org/wiki/GFortran
|
||||
|
||||
CONFIG = ${MACHINE_ARCH}-unknown-openbsd${OSREV}
|
||||
SUBST_VARS += CONFIG V
|
||||
|
||||
MASTER_SITE_GCC += ftp://gcc.gnu.org/pub/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.uvsq.fr/pub/gcc/
|
||||
MASTER_SITE_GCC += ftp://gd.tuwien.ac.at/gnu/gcc/
|
||||
MASTER_SITE_GCC += ftp://gd.tuwien.ac.at/gnu/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.fu-berlin.de/unix/languages/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.gwdg.de/pub/linux/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.sunet.se/pub/gnu/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.ntua.gr/pub/gnu/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.nluug.nl/pub/languages/gcc/
|
||||
MASTER_SITE_GCC += ftp://ftp.dti.ad.jp/pub/lang/gcc/
|
||||
MASTER_SITE_GCC += ftp://sunsite.icm.edu.pl/pub/programming/egcs/
|
||||
|
||||
MASTER_SITES = ${MASTER_SITE_GCC:=releases/gcc-$V/}
|
||||
|
||||
DISTNAME = gcc-$V
|
||||
DISTFILES = ${DISTNAME}.tar.bz2
|
||||
DIST_SUBDIR = gcc
|
||||
|
||||
USE_LIBTOOL = Yes
|
||||
USE_GMAKE = Yes
|
||||
|
||||
MULTI_PACKAGES = -main -lib
|
||||
|
||||
MODULES = converters/libiconv
|
||||
|
||||
WANTLIB-main = c iberty gmp
|
||||
LIB_DEPENDS-main = mpfr::devel/mpfr \
|
||||
${MODLIBICONV_LIB_DEPENDS}
|
||||
LIB_DEPENDS-lib =
|
||||
RUN_DEPENDS-main = ::${BASE_PKGPATH},-lib
|
||||
|
||||
REGRESS_DEPENDS = ::devel/dejagnu \
|
||||
::devel/autogen
|
||||
|
||||
BUILD_DEPENDS += :bison-*:devel/bison
|
||||
|
||||
post-extract:
|
||||
echo "# This file automatically generated" >> ${WRKSRC}/libversions
|
||||
.for l v in ${SHARED_LIBS}
|
||||
echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> ${WRKSRC}/libversions
|
||||
.endfor
|
||||
|
||||
CONFIGURE_STYLE = gnu
|
||||
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/gcc
|
||||
|
||||
LANGS = fortran
|
||||
CONFIGURE_ENV += am_cv_func_iconv=no
|
||||
CONFIGURE_ENV += ac_cv_prog_CONFIGURED_M4=/usr/bin/m4
|
||||
CONFIGURE_ENV += ac_cv_prog_GFORTRAN_FOR_TARGET=no
|
||||
|
||||
MAKE_FLAGS = LIBIBERTY_INCLUDES=${LIBIBERTY_INCLUDES} \
|
||||
BUILD_LIBIBERTY=-liberty \
|
||||
LIBIBERTY=-liberty \
|
||||
LIBDEPS= \
|
||||
INSTALL_LIBGCC= LIBGCC= USE_COLLECT2= \
|
||||
COMPILERS=f951 \
|
||||
LANGUAGES=fortran
|
||||
|
||||
# Note: the configure target passes CFLAGS to the configure script anyways.
|
||||
CFLAGS = -O2
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--verbose \
|
||||
--disable-nls \
|
||||
--disable-checking \
|
||||
--with-system-zlib \
|
||||
--disable-libmudflap \
|
||||
--disable-libgomp \
|
||||
--disable-tls \
|
||||
--with-as=/usr/bin/as \
|
||||
--with-ld=/usr/bin/ld \
|
||||
--with-gnu-ld \
|
||||
--with-gnu-as \
|
||||
--enable-threads=posix \
|
||||
--enable-wchar_t \
|
||||
--enable-languages=${LANGS} \
|
||||
--with-gmp=${LOCALBASE} \
|
||||
--with-mpfr=${LOCALBASE} \
|
||||
--disable-libssp \
|
||||
--disable-bootstrap \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
--disable-cpp \
|
||||
${CONFIGURE_SHARED}
|
||||
|
||||
SEPARATE_BUILD = simple
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
PKG_ARGS += -DPIC=1
|
||||
.else
|
||||
PKG_ARGS += -DPIC=0
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
ln -sf /usr/lib/gcc-lib/${CONFIG}/${SYSV}/libgcc.a ${PREFIX}/lib/gcc/${CONFIG}/$V/libgcc.a
|
||||
ln -sf /usr/lib/gcc-lib/${CONFIG}/${SYSV}/cc1 ${PREFIX}/libexec/gcc/${CONFIG}/$V/cc1
|
||||
mandoc ${WRKBUILD}/gcc/doc/gfortran.1 >${PREFIX}/man/cat1/gfortran.0
|
||||
|
||||
.include <bsd.port.mk>
|
5
lang/gfortran/distinfo
Normal file
5
lang/gfortran/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (gcc/gcc-4.2.1.tar.bz2) = y6QQ5v9w99f0vnoCZ3B/0A==
|
||||
RMD160 (gcc/gcc-4.2.1.tar.bz2) = 75uwhsDqxiP9zBHUW3vGZgsAiu8=
|
||||
SHA1 (gcc/gcc-4.2.1.tar.bz2) = uKVbE8Tjj6541duaRW4tT/4AMRg=
|
||||
SHA256 (gcc/gcc-4.2.1.tar.bz2) = ygoSaVs7zPqGKFCeCMue19jtSN7/CimeTLjeh9LB/O0=
|
||||
SIZE (gcc/gcc-4.2.1.tar.bz2) = 44062112
|
100
lang/gfortran/patches/keep
Normal file
100
lang/gfortran/patches/keep
Normal file
@ -0,0 +1,100 @@
|
||||
$OpenBSD: keep,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/c-format.c.orig Mon Mar 27 10:35:04 2006
|
||||
+++ gcc/c-format.c Mon Mar 27 10:56:06 2006
|
||||
@@ -62,6 +62,7 @@ enum format_type { printf_format_type, a
|
||||
gcc_cdiag_format_type,
|
||||
gcc_cxxdiag_format_type, gcc_gfc_format_type,
|
||||
scanf_format_type, strftime_format_type,
|
||||
+ kprintf_format_type, syslog_format_type,
|
||||
strfmon_format_type, format_type_error = -1};
|
||||
|
||||
typedef struct function_format_info
|
||||
@@ -294,6 +295,15 @@ static const format_length_info printf_l
|
||||
{ NULL, 0, 0, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
+static const format_length_info kprintf_length_specs[] =
|
||||
+{
|
||||
+ { "h", FMT_LEN_h, STD_C89, NULL, 0, 0 },
|
||||
+ { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
|
||||
+ { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
|
||||
+ { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
|
||||
+ { NULL, 0, 0, NULL, 0, 0 }
|
||||
+};
|
||||
+
|
||||
/* Length specifiers valid for asm_fprintf. */
|
||||
static const format_length_info asm_fprintf_length_specs[] =
|
||||
{
|
||||
@@ -509,6 +519,24 @@ static const format_char_info print_char
|
||||
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
+static const format_char_info kprint_char_table[] =
|
||||
+{
|
||||
+ /* C89 conversion specifiers. */
|
||||
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL },
|
||||
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL },
|
||||
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL },
|
||||
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
|
||||
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
|
||||
+/* Kernel bitmap formatting */
|
||||
+ { "b", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
|
||||
+/* Kernel recursive format */
|
||||
+ { ":", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
|
||||
+/* Kernel debugger auto-radix printing */
|
||||
+ { "nrz", 0, STD_C89, { T89_I, T89_I, T89_I, T89_L, T9L_LL, TEX_LL, BADLEN, BADLEN, BADLEN }, "-wp0# +", "", NULL },
|
||||
+ { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
static const format_char_info asm_fprintf_char_table[] =
|
||||
{
|
||||
/* C89 conversion specifiers. */
|
||||
@@ -641,6 +669,28 @@ static const format_char_info gcc_gfc_ch
|
||||
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
+static const format_char_info syslog_char_table[] =
|
||||
+{
|
||||
+ /* C89 conversion specifiers. */
|
||||
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL },
|
||||
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL },
|
||||
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL },
|
||||
+ { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
|
||||
+ { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
|
||||
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
|
||||
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c" , NULL },
|
||||
+ { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W", NULL },
|
||||
+ /* C99 conversion specifiers. */
|
||||
+ { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
|
||||
+ { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
|
||||
+ /* X/Open conversion specifiers. */
|
||||
+ { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
|
||||
+ { "m", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
|
||||
+ { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
static const format_char_info scan_char_table[] =
|
||||
{
|
||||
/* C89 conversion specifiers. */
|
||||
@@ -698,6 +748,18 @@ static const format_char_info monetary_c
|
||||
static const format_kind_info format_types_orig[] =
|
||||
{
|
||||
{ "printf", printf_length_specs, print_char_table, " +#0-'I", NULL,
|
||||
+ printf_flag_specs, printf_flag_pairs,
|
||||
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
|
||||
+ 'w', 0, 'p', 0, 'L',
|
||||
+ &integer_type_node, &integer_type_node
|
||||
+ },
|
||||
+ { "kprintf", kprintf_length_specs, kprint_char_table, " +#0-'I", NULL,
|
||||
+ printf_flag_specs, printf_flag_pairs,
|
||||
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
|
||||
+ 'w', 0, 'p', 0, 'L',
|
||||
+ &integer_type_node, &integer_type_node
|
||||
+ },
|
||||
+ { "syslog", printf_length_specs, syslog_char_table, " +#0-'I", NULL,
|
||||
printf_flag_specs, printf_flag_pairs,
|
||||
FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
|
||||
'w', 0, 'p', 0, 'L',
|
21
lang/gfortran/patches/patch-Makefile_in
Normal file
21
lang/gfortran/patches/patch-Makefile_in
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- Makefile.in.orig Fri Dec 29 18:47:06 2006
|
||||
+++ Makefile.in Sun Jun 20 21:02:26 2010
|
||||
@@ -444,6 +444,8 @@ BASE_FLAGS_TO_PASS = \
|
||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
||||
"LEX=$(LEX)" \
|
||||
+ "LIBIBERTY=$(LIBIBERTY)" \
|
||||
+ "BUILD_LIBIBERTY=$(BUILD_LIBIBERTY)" \
|
||||
"M4=$(M4)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"RUNTEST=$(RUNTEST)" \
|
||||
@@ -11132,7 +11134,7 @@ check-fixincludes:
|
||||
.PHONY: install-fixincludes maybe-install-fixincludes
|
||||
maybe-install-fixincludes:
|
||||
@if fixincludes
|
||||
-maybe-install-fixincludes: install-fixincludes
|
||||
+maybe-install-fixincludes:
|
||||
|
||||
install-fixincludes: installdirs
|
||||
@: $(MAKE); $(unstage)
|
56
lang/gfortran/patches/patch-configure
Normal file
56
lang/gfortran/patches/patch-configure
Normal file
@ -0,0 +1,56 @@
|
||||
$OpenBSD: patch-configure,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- configure.orig Thu Jun 21 01:07:21 2007
|
||||
+++ configure Sun Jun 20 18:18:43 2010
|
||||
@@ -904,14 +904,14 @@ extra_host_args=
|
||||
# these library is used by various programs built for the build
|
||||
# environment
|
||||
#
|
||||
-build_libs="build-libiberty"
|
||||
+build_libs=
|
||||
|
||||
# these tools are built for the build environment
|
||||
build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
|
||||
|
||||
# these libraries are used by various programs built for the host environment
|
||||
#
|
||||
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
|
||||
+host_libs="intl mmalloc opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
|
||||
|
||||
# these tools are built for the host environment
|
||||
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
||||
@@ -929,7 +929,7 @@ libgcj="target-libffi \
|
||||
# these libraries are built for the target environment, and are built after
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
#
|
||||
-target_libraries="target-libiberty \
|
||||
+target_libraries=" \
|
||||
target-libgloss \
|
||||
target-newlib \
|
||||
target-libstdc++-v3 \
|
||||
@@ -1243,6 +1243,8 @@ case "${target}" in
|
||||
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
|
||||
noconfigdirs="$noconfigdirs target-libgloss"
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ ;;
|
||||
*-*-netbsd*)
|
||||
# Skip some stuff on all NetBSD configurations.
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
|
||||
@@ -2417,7 +2419,7 @@ CFLAGS="$saved_CFLAGS"
|
||||
|
||||
|
||||
# By default, C is the only stage 1 language.
|
||||
-stage1_languages=c
|
||||
+stage1_languages=
|
||||
|
||||
|
||||
# Figure out what language subdirectories are present.
|
||||
@@ -2480,7 +2482,7 @@ if test -d ${srcdir}/gcc; then
|
||||
esac
|
||||
done
|
||||
|
||||
- new_enable_languages=c
|
||||
+ new_enable_languages=
|
||||
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
|
||||
potential_languages=c
|
||||
|
23
lang/gfortran/patches/patch-fixincludes_Makefile_in
Normal file
23
lang/gfortran/patches/patch-fixincludes_Makefile_in
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-fixincludes_Makefile_in,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- fixincludes/Makefile.in.orig Wed Oct 11 01:48:09 2006
|
||||
+++ fixincludes/Makefile.in Sun Jun 20 18:49:30 2010
|
||||
@@ -83,7 +83,7 @@ default : all
|
||||
##
|
||||
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
-LIBIBERTY=../libiberty/libiberty.a
|
||||
+#LIBIBERTY=../libiberty/libiberty.a
|
||||
|
||||
ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
|
||||
fixlib.o fixopts.o
|
||||
@@ -169,8 +169,8 @@ $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal
|
||||
cp $(srcdir)/../gcc/aclocal.m4 .
|
||||
|
||||
check : all
|
||||
- autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
|
||||
- $(SHELL) ./check.sh $(srcdir)/tests/base
|
||||
+ -autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
|
||||
+ -$(SHELL) ./check.sh $(srcdir)/tests/base
|
||||
@rm -f ./check.sh
|
||||
|
||||
install : all
|
54
lang/gfortran/patches/patch-gcc_Makefile_in
Normal file
54
lang/gfortran/patches/patch-gcc_Makefile_in
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-gcc_Makefile_in,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/Makefile.in.orig Thu May 31 17:37:38 2007
|
||||
+++ gcc/Makefile.in Sun Jun 20 21:22:14 2010
|
||||
@@ -134,7 +134,7 @@ SUBDIRS =@subdirs@ build
|
||||
|
||||
# Selection of languages to be made.
|
||||
CONFIG_LANGUAGES = @all_selected_languages@
|
||||
-LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
|
||||
+LANGUAGES = $(CONFIG_LANGUAGES)
|
||||
|
||||
# Selection of languages to be made during stage1 build.
|
||||
BOOT_LANGUAGES = c @all_boot_languages@
|
||||
@@ -836,15 +836,15 @@ ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \
|
||||
ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
|
||||
|
||||
# Build and host support libraries.
|
||||
-LIBIBERTY = ../libiberty/libiberty.a
|
||||
-BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
|
||||
+#LIBIBERTY = ../libiberty/libiberty.a
|
||||
+#BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
|
||||
|
||||
# Dependencies on the intl and portability libraries.
|
||||
LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBDECNUMBER)
|
||||
|
||||
# Likewise, for use in the tools that must run on this machine
|
||||
# even if we are cross-building GCC.
|
||||
-BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
+#BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
|
||||
# How to link with both our special library facilities
|
||||
# and the system's installed libraries.
|
||||
@@ -3656,9 +3656,7 @@ maintainer-clean:
|
||||
# Copy the compiler files into directories where they will be run.
|
||||
# Install the driver last so that the window when things are
|
||||
# broken is small.
|
||||
-install: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
|
||||
- install-cpp install-man install-info install-@POSUB@ \
|
||||
- install-driver
|
||||
+install: install-common install-info
|
||||
|
||||
# Handle cpp installation.
|
||||
install-cpp: installdirs cpp$(exeext)
|
||||
@@ -3751,11 +3749,6 @@ install-driver: installdirs xgcc$(exeext)
|
||||
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
|
||||
# to do the install.
|
||||
install-info:: doc installdirs \
|
||||
- $(DESTDIR)$(infodir)/cpp.info \
|
||||
- $(DESTDIR)$(infodir)/gcc.info \
|
||||
- $(DESTDIR)$(infodir)/cppinternals.info \
|
||||
- $(DESTDIR)$(infodir)/gccinstall.info \
|
||||
- $(DESTDIR)$(infodir)/gccint.info \
|
||||
lang.install-info
|
||||
|
||||
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
|
245
lang/gfortran/patches/patch-gcc_c-aux-info_c
Normal file
245
lang/gfortran/patches/patch-gcc_c-aux-info_c
Normal file
@ -0,0 +1,245 @@
|
||||
$OpenBSD: patch-gcc_c-aux-info_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/c-aux-info.c.orig Fri May 19 00:16:23 2006
|
||||
+++ gcc/c-aux-info.c Mon Jun 14 19:23:03 2010
|
||||
@@ -91,14 +91,14 @@ affix_data_type (const char *param)
|
||||
add a blank after the data-type of course. */
|
||||
|
||||
if (p == type_or_decl)
|
||||
- return concat (data_type, " ", type_or_decl, NULL);
|
||||
+ return concat (data_type, " ", type_or_decl, (void *)0);
|
||||
|
||||
saved = *p;
|
||||
*p = '\0';
|
||||
- qualifiers_then_data_type = concat (type_or_decl, data_type, NULL);
|
||||
+ qualifiers_then_data_type = concat (type_or_decl, data_type, (void *)0);
|
||||
*p = saved;
|
||||
return reconcat (qualifiers_then_data_type,
|
||||
- qualifiers_then_data_type, " ", p, NULL);
|
||||
+ qualifiers_then_data_type, " ", p, (void *)0);
|
||||
}
|
||||
|
||||
/* Given a tree node which represents some "function type", generate the
|
||||
@@ -123,13 +123,13 @@ gen_formal_list_for_type (tree fntype, formals_style s
|
||||
const char *this_type;
|
||||
|
||||
if (*formal_list)
|
||||
- formal_list = concat (formal_list, ", ", NULL);
|
||||
+ formal_list = concat (formal_list, ", ", (void *)0);
|
||||
|
||||
this_type = gen_type ("", TREE_VALUE (formal_type), ansi);
|
||||
formal_list
|
||||
= ((strlen (this_type))
|
||||
- ? concat (formal_list, affix_data_type (this_type), NULL)
|
||||
- : concat (formal_list, data_type, NULL));
|
||||
+ ? concat (formal_list, affix_data_type (this_type), (void *)0)
|
||||
+ : concat (formal_list, data_type, (void *)0));
|
||||
|
||||
formal_type = TREE_CHAIN (formal_type);
|
||||
}
|
||||
@@ -178,10 +178,10 @@ gen_formal_list_for_type (tree fntype, formals_style s
|
||||
petered out to a NULL (i.e. without being terminated by a
|
||||
void_type_node) then we need to tack on an ellipsis. */
|
||||
if (!formal_type)
|
||||
- formal_list = concat (formal_list, ", ...", NULL);
|
||||
+ formal_list = concat (formal_list, ", ...", (void *)0);
|
||||
}
|
||||
|
||||
- return concat (" (", formal_list, ")", NULL);
|
||||
+ return concat (" (", formal_list, ")", (void *)0);
|
||||
}
|
||||
|
||||
/* For the generation of an ANSI prototype for a function definition, we have
|
||||
@@ -237,23 +237,23 @@ gen_formal_list_for_func_def (tree fndecl, formals_sty
|
||||
const char *this_formal;
|
||||
|
||||
if (*formal_list && ((style == ansi) || (style == k_and_r_names)))
|
||||
- formal_list = concat (formal_list, ", ", NULL);
|
||||
+ formal_list = concat (formal_list, ", ", (void *)0);
|
||||
this_formal = gen_decl (formal_decl, 0, style);
|
||||
if (style == k_and_r_decls)
|
||||
- formal_list = concat (formal_list, this_formal, "; ", NULL);
|
||||
+ formal_list = concat (formal_list, this_formal, "; ", (void *)0);
|
||||
else
|
||||
- formal_list = concat (formal_list, this_formal, NULL);
|
||||
+ formal_list = concat (formal_list, this_formal, (void *)0);
|
||||
formal_decl = TREE_CHAIN (formal_decl);
|
||||
}
|
||||
if (style == ansi)
|
||||
{
|
||||
if (!DECL_ARGUMENTS (fndecl))
|
||||
- formal_list = concat (formal_list, "void", NULL);
|
||||
+ formal_list = concat (formal_list, "void", (void *)0);
|
||||
if (deserves_ellipsis (TREE_TYPE (fndecl)))
|
||||
- formal_list = concat (formal_list, ", ...", NULL);
|
||||
+ formal_list = concat (formal_list, ", ...", (void *)0);
|
||||
}
|
||||
if ((style == ansi) || (style == k_and_r_names))
|
||||
- formal_list = concat (" (", formal_list, ")", NULL);
|
||||
+ formal_list = concat (" (", formal_list, ")", (void *)0);
|
||||
return formal_list;
|
||||
}
|
||||
|
||||
@@ -312,14 +312,14 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
{
|
||||
case POINTER_TYPE:
|
||||
if (TYPE_READONLY (t))
|
||||
- ret_val = concat ("const ", ret_val, NULL);
|
||||
+ ret_val = concat ("const ", ret_val, (void *)0);
|
||||
if (TYPE_VOLATILE (t))
|
||||
- ret_val = concat ("volatile ", ret_val, NULL);
|
||||
+ ret_val = concat ("volatile ", ret_val, (void *)0);
|
||||
|
||||
- ret_val = concat ("*", ret_val, NULL);
|
||||
+ ret_val = concat ("*", ret_val, (void *)0);
|
||||
|
||||
if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
|
||||
- ret_val = concat ("(", ret_val, ")", NULL);
|
||||
+ ret_val = concat ("(", ret_val, ")", (void *)0);
|
||||
|
||||
ret_val = gen_type (ret_val, TREE_TYPE (t), style);
|
||||
|
||||
@@ -327,17 +327,17 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
|
||||
case ARRAY_TYPE:
|
||||
if (!COMPLETE_TYPE_P (t) || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST)
|
||||
- ret_val = gen_type (concat (ret_val, "[]", NULL),
|
||||
+ ret_val = gen_type (concat (ret_val, "[]", (void *)0),
|
||||
TREE_TYPE (t), style);
|
||||
else if (int_size_in_bytes (t) == 0)
|
||||
- ret_val = gen_type (concat (ret_val, "[0]", NULL),
|
||||
+ ret_val = gen_type (concat (ret_val, "[0]", (void *)0),
|
||||
TREE_TYPE (t), style);
|
||||
else
|
||||
{
|
||||
int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t)));
|
||||
char buff[10];
|
||||
sprintf (buff, "[%d]", size);
|
||||
- ret_val = gen_type (concat (ret_val, buff, NULL),
|
||||
+ ret_val = gen_type (concat (ret_val, buff, (void *)0),
|
||||
TREE_TYPE (t), style);
|
||||
}
|
||||
break;
|
||||
@@ -345,7 +345,7 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
case FUNCTION_TYPE:
|
||||
ret_val = gen_type (concat (ret_val,
|
||||
gen_formal_list_for_type (t, style),
|
||||
- NULL),
|
||||
+ (void *)0),
|
||||
TREE_TYPE (t), style);
|
||||
break;
|
||||
|
||||
@@ -374,13 +374,13 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
while (chain_p)
|
||||
{
|
||||
data_type = concat (data_type, gen_decl (chain_p, 0, ansi),
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
chain_p = TREE_CHAIN (chain_p);
|
||||
- data_type = concat (data_type, "; ", NULL);
|
||||
+ data_type = concat (data_type, "; ", (void *)0);
|
||||
}
|
||||
- data_type = concat ("{ ", data_type, "}", NULL);
|
||||
+ data_type = concat ("{ ", data_type, "}", (void *)0);
|
||||
}
|
||||
- data_type = concat ("struct ", data_type, NULL);
|
||||
+ data_type = concat ("struct ", data_type, (void *)0);
|
||||
break;
|
||||
|
||||
case UNION_TYPE:
|
||||
@@ -393,13 +393,13 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
while (chain_p)
|
||||
{
|
||||
data_type = concat (data_type, gen_decl (chain_p, 0, ansi),
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
chain_p = TREE_CHAIN (chain_p);
|
||||
- data_type = concat (data_type, "; ", NULL);
|
||||
+ data_type = concat (data_type, "; ", (void *)0);
|
||||
}
|
||||
- data_type = concat ("{ ", data_type, "}", NULL);
|
||||
+ data_type = concat ("{ ", data_type, "}", (void *)0);
|
||||
}
|
||||
- data_type = concat ("union ", data_type, NULL);
|
||||
+ data_type = concat ("union ", data_type, (void *)0);
|
||||
break;
|
||||
|
||||
case ENUMERAL_TYPE:
|
||||
@@ -412,14 +412,14 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
while (chain_p)
|
||||
{
|
||||
data_type = concat (data_type,
|
||||
- IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), NULL);
|
||||
+ IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), (void *)0);
|
||||
chain_p = TREE_CHAIN (chain_p);
|
||||
if (chain_p)
|
||||
- data_type = concat (data_type, ", ", NULL);
|
||||
+ data_type = concat (data_type, ", ", (void *)0);
|
||||
}
|
||||
- data_type = concat ("{ ", data_type, " }", NULL);
|
||||
+ data_type = concat ("{ ", data_type, " }", (void *)0);
|
||||
}
|
||||
- data_type = concat ("enum ", data_type, NULL);
|
||||
+ data_type = concat ("enum ", data_type, (void *)0);
|
||||
break;
|
||||
|
||||
case TYPE_DECL:
|
||||
@@ -431,7 +431,7 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
/* Normally, `unsigned' is part of the deal. Not so if it comes
|
||||
with a type qualifier. */
|
||||
if (TYPE_UNSIGNED (t) && TYPE_QUALS (t))
|
||||
- data_type = concat ("unsigned ", data_type, NULL);
|
||||
+ data_type = concat ("unsigned ", data_type, (void *)0);
|
||||
break;
|
||||
|
||||
case REAL_TYPE:
|
||||
@@ -451,11 +451,11 @@ gen_type (const char *ret_val, tree t, formals_style s
|
||||
}
|
||||
}
|
||||
if (TYPE_READONLY (t))
|
||||
- ret_val = concat ("const ", ret_val, NULL);
|
||||
+ ret_val = concat ("const ", ret_val, (void *)0);
|
||||
if (TYPE_VOLATILE (t))
|
||||
- ret_val = concat ("volatile ", ret_val, NULL);
|
||||
+ ret_val = concat ("volatile ", ret_val, (void *)0);
|
||||
if (TYPE_RESTRICT (t))
|
||||
- ret_val = concat ("restrict ", ret_val, NULL);
|
||||
+ ret_val = concat ("restrict ", ret_val, (void *)0);
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
@@ -494,9 +494,9 @@ gen_decl (tree decl, int is_func_definition, formals_s
|
||||
generate the qualifiers here. */
|
||||
|
||||
if (TREE_THIS_VOLATILE (decl))
|
||||
- ret_val = concat ("volatile ", ret_val, NULL);
|
||||
+ ret_val = concat ("volatile ", ret_val, (void *)0);
|
||||
if (TREE_READONLY (decl))
|
||||
- ret_val = concat ("const ", ret_val, NULL);
|
||||
+ ret_val = concat ("const ", ret_val, (void *)0);
|
||||
|
||||
data_type = "";
|
||||
|
||||
@@ -515,7 +515,7 @@ gen_decl (tree decl, int is_func_definition, formals_s
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL && is_func_definition)
|
||||
{
|
||||
ret_val = concat (ret_val, gen_formal_list_for_func_def (decl, ansi),
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
|
||||
/* Since we have already added in the formals list stuff, here we don't
|
||||
add the whole "type" of the function we are considering (which
|
||||
@@ -532,11 +532,11 @@ gen_decl (tree decl, int is_func_definition, formals_s
|
||||
ret_val = affix_data_type (ret_val);
|
||||
|
||||
if (TREE_CODE (decl) != FUNCTION_DECL && C_DECL_REGISTER (decl))
|
||||
- ret_val = concat ("register ", ret_val, NULL);
|
||||
+ ret_val = concat ("register ", ret_val, (void *)0);
|
||||
if (TREE_PUBLIC (decl))
|
||||
- ret_val = concat ("extern ", ret_val, NULL);
|
||||
+ ret_val = concat ("extern ", ret_val, (void *)0);
|
||||
if (TREE_CODE (decl) == FUNCTION_DECL && !TREE_PUBLIC (decl))
|
||||
- ret_val = concat ("static ", ret_val, NULL);
|
||||
+ ret_val = concat ("static ", ret_val, (void *)0);
|
||||
|
||||
return ret_val;
|
||||
}
|
38
lang/gfortran/patches/patch-gcc_c-common_c
Normal file
38
lang/gfortran/patches/patch-gcc_c-common_c
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-gcc_c-common_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/c-common.c.orig Mon Mar 12 19:50:38 2007
|
||||
+++ gcc/c-common.c Mon Jun 14 19:23:03 2010
|
||||
@@ -545,7 +545,9 @@ static tree handle_cleanup_attribute (tree *, tree, tr
|
||||
static tree handle_warn_unused_result_attribute (tree *, tree, tree, int,
|
||||
bool *);
|
||||
static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *);
|
||||
+static tree handle_bounded_attribute (tree *, tree, tree, int, bool *);
|
||||
|
||||
+
|
||||
static void check_function_nonnull (tree, tree);
|
||||
static void check_nonnull_arg (void *, tree, unsigned HOST_WIDE_INT);
|
||||
static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT);
|
||||
@@ -624,6 +626,8 @@ const struct attribute_spec c_common_attribute_table[]
|
||||
handle_deprecated_attribute },
|
||||
{ "vector_size", 1, 1, false, true, false,
|
||||
handle_vector_size_attribute },
|
||||
+ { "bounded", 3, 4, false, true, false,
|
||||
+ handle_bounded_attribute },
|
||||
{ "visibility", 1, 1, false, false, false,
|
||||
handle_visibility_attribute },
|
||||
{ "tls_model", 1, 1, true, false, false,
|
||||
@@ -5635,6 +5639,15 @@ handle_warn_unused_result_attribute (tree *node, tree
|
||||
}
|
||||
|
||||
return NULL_TREE;
|
||||
+}
|
||||
+
|
||||
+static tree
|
||||
+handle_bounded_attribute (tree *ARG_UNUSED (node), tree ARG_UNUSED (name),
|
||||
+ tree ARG_UNUSED (args),
|
||||
+ int ARG_UNUSED (flags), bool *no_add_attrs)
|
||||
+{
|
||||
+ *no_add_attrs = true;
|
||||
+ return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Handle a "sentinel" attribute. */
|
93
lang/gfortran/patches/patch-gcc_c-format_c
Normal file
93
lang/gfortran/patches/patch-gcc_c-format_c
Normal file
@ -0,0 +1,93 @@
|
||||
$OpenBSD: patch-gcc_c-format_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/c-format.c.orig Fri May 19 00:16:23 2006
|
||||
+++ gcc/c-format.c Mon Jun 14 19:23:03 2010
|
||||
@@ -58,6 +58,7 @@ set_Wformat (int setting)
|
||||
format_type_error. Target-specific format types do not have
|
||||
matching enum values. */
|
||||
enum format_type { printf_format_type, asm_fprintf_format_type,
|
||||
+ kprintf_format_type, syslog_format_type,
|
||||
gcc_diag_format_type, gcc_tdiag_format_type,
|
||||
gcc_cdiag_format_type,
|
||||
gcc_cxxdiag_format_type, gcc_gfc_format_type,
|
||||
@@ -312,6 +313,15 @@ static const format_length_info gcc_diag_length_specs[
|
||||
{ NULL, 0, 0, NULL, 0, 0 }
|
||||
};
|
||||
|
||||
+static const format_length_info kprintf_length_specs[] =
|
||||
+{
|
||||
+ { "h", FMT_LEN_h, STD_C89, NULL, 0, 0 },
|
||||
+ { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
|
||||
+ { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
|
||||
+ { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
|
||||
+ { NULL, 0, 0, NULL, 0, 0 }
|
||||
+};
|
||||
+
|
||||
/* The custom diagnostics all accept the same length specifiers. */
|
||||
#define gcc_tdiag_length_specs gcc_diag_length_specs
|
||||
#define gcc_cdiag_length_specs gcc_diag_length_specs
|
||||
@@ -533,6 +543,46 @@ static const format_char_info asm_fprintf_char_table[]
|
||||
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
+static const format_char_info kprint_char_table[] =
|
||||
+{
|
||||
+ /* C89 conversion specifiers. */
|
||||
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL },
|
||||
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL },
|
||||
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL },
|
||||
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
|
||||
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
|
||||
+/* Kernel bitmap formatting */
|
||||
+ { "b", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
|
||||
+/* Kernel recursive format */
|
||||
+ { ":", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
|
||||
+/* Kernel debugger auto-radix printing */
|
||||
+ { "nrz", 0, STD_C89, { T89_I, T89_I, T89_I, T89_L, T9L_LL, TEX_LL, BADLEN, BADLEN, BADLEN }, "-wp0# +", "", NULL },
|
||||
+ { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
+static const format_char_info syslog_char_table[] =
|
||||
+{
|
||||
+ /* C89 conversion specifiers. */
|
||||
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL },
|
||||
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL },
|
||||
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL },
|
||||
+ { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
|
||||
+ { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
|
||||
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
|
||||
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
|
||||
+ { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W", NULL },
|
||||
+ /* C99 conversion specifiers. */
|
||||
+ { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
|
||||
+ { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
|
||||
+ /* X/Open conversion specifiers. */
|
||||
+ { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
|
||||
+ { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
|
||||
+ { "m", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
|
||||
+ { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
static const format_char_info gcc_diag_char_table[] =
|
||||
{
|
||||
/* C89 conversion specifiers. */
|
||||
@@ -713,6 +763,18 @@ static const format_kind_info format_types_orig[] =
|
||||
FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK,
|
||||
'w', 0, 'p', 0, 'L',
|
||||
NULL, NULL
|
||||
+ },
|
||||
+ { "kprintf", kprintf_length_specs, kprint_char_table, " +#0-'I", NULL,
|
||||
+ printf_flag_specs, printf_flag_pairs,
|
||||
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
|
||||
+ 'w', 0, 'p', 0, 'L',
|
||||
+ &integer_type_node, &integer_type_node
|
||||
+ },
|
||||
+ { "syslog", printf_length_specs, syslog_char_table, " +#0-'I", NULL,
|
||||
+ printf_flag_specs, printf_flag_pairs,
|
||||
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
|
||||
+ 'w', 0, 'p', 0, 'L',
|
||||
+ &integer_type_node, &integer_type_node
|
||||
},
|
||||
{ "gcc_diag", gcc_diag_length_specs, gcc_diag_char_table, "q+", NULL,
|
||||
gcc_diag_flag_specs, gcc_diag_flag_pairs,
|
30
lang/gfortran/patches/patch-gcc_c-incpath_c
Normal file
30
lang/gfortran/patches/patch-gcc_c-incpath_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-gcc_c-incpath_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/c-incpath.c.orig Fri May 19 00:16:23 2006
|
||||
+++ gcc/c-incpath.c Sun Mar 18 23:58:42 2007
|
||||
@@ -145,9 +145,9 @@ add_standard_paths (const char *sysroot, const char *i
|
||||
continue;
|
||||
if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
|
||||
{
|
||||
- char *str = concat (iprefix, p->fname + len, NULL);
|
||||
+ char *str = concat (iprefix, p->fname + len, (void *)0);
|
||||
if (p->multilib && imultilib)
|
||||
- str = concat (str, dir_separator_str, imultilib, NULL);
|
||||
+ str = concat (str, dir_separator_str, imultilib, (void *)0);
|
||||
add_path (str, SYSTEM, p->cxx_aware, false);
|
||||
}
|
||||
}
|
||||
@@ -162,12 +162,12 @@ add_standard_paths (const char *sysroot, const char *i
|
||||
|
||||
/* Should this directory start with the sysroot? */
|
||||
if (sysroot && p->add_sysroot)
|
||||
- str = concat (sysroot, p->fname, NULL);
|
||||
+ str = concat (sysroot, p->fname, (void *)0);
|
||||
else
|
||||
str = update_path (p->fname, p->component);
|
||||
|
||||
if (p->multilib && imultilib)
|
||||
- str = concat (str, dir_separator_str, imultilib, NULL);
|
||||
+ str = concat (str, dir_separator_str, imultilib, (void *)0);
|
||||
|
||||
add_path (str, SYSTEM, p->cxx_aware, false);
|
||||
}
|
76
lang/gfortran/patches/patch-gcc_collect2_c
Normal file
76
lang/gfortran/patches/patch-gcc_collect2_c
Normal file
@ -0,0 +1,76 @@
|
||||
$OpenBSD: patch-gcc_collect2_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/collect2.c.orig Fri May 19 00:16:23 2006
|
||||
+++ gcc/collect2.c Mon Jun 14 19:23:03 2010
|
||||
@@ -753,19 +753,19 @@ main (int argc, char **argv)
|
||||
qualify the program name with the target machine. */
|
||||
|
||||
const char *const full_ld_suffix =
|
||||
- concat(target_machine, "-", ld_suffix, NULL);
|
||||
+ concat(target_machine, "-", ld_suffix, (char *)0);
|
||||
const char *const full_nm_suffix =
|
||||
- concat (target_machine, "-", nm_suffix, NULL);
|
||||
+ concat (target_machine, "-", nm_suffix, (char *)0);
|
||||
const char *const full_gnm_suffix =
|
||||
- concat (target_machine, "-", gnm_suffix, NULL);
|
||||
+ concat (target_machine, "-", gnm_suffix, (char *)0);
|
||||
#ifdef LDD_SUFFIX
|
||||
const char *const full_ldd_suffix =
|
||||
- concat (target_machine, "-", ldd_suffix, NULL);
|
||||
+ concat (target_machine, "-", ldd_suffix, (char *)0);
|
||||
#endif
|
||||
const char *const full_strip_suffix =
|
||||
- concat (target_machine, "-", strip_suffix, NULL);
|
||||
+ concat (target_machine, "-", strip_suffix, (char *)0);
|
||||
const char *const full_gstrip_suffix =
|
||||
- concat (target_machine, "-", gstrip_suffix, NULL);
|
||||
+ concat (target_machine, "-", gstrip_suffix, (char *)0);
|
||||
#else
|
||||
const char *const full_ld_suffix = ld_suffix;
|
||||
const char *const full_nm_suffix = nm_suffix;
|
||||
@@ -958,7 +958,7 @@ main (int argc, char **argv)
|
||||
if (c_file_name == 0)
|
||||
{
|
||||
#ifdef CROSS_COMPILE
|
||||
- c_file_name = concat (target_machine, "-gcc", NULL);
|
||||
+ c_file_name = concat (target_machine, "-gcc", (char *)0);
|
||||
#else
|
||||
c_file_name = "gcc";
|
||||
#endif
|
||||
@@ -1236,7 +1236,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (exports.first)
|
||||
{
|
||||
- char *buf = concat ("-bE:", export_file, NULL);
|
||||
+ char *buf = concat ("-bE:", export_file, (char *)0);
|
||||
|
||||
*ld1++ = buf;
|
||||
*ld2++ = buf;
|
||||
@@ -1401,7 +1401,7 @@ main (int argc, char **argv)
|
||||
/* Tell the linker that we have initializer and finalizer functions. */
|
||||
#ifdef LD_INIT_SWITCH
|
||||
#ifdef COLLECT_EXPORT_LIST
|
||||
- *ld2++ = concat (LD_INIT_SWITCH, ":", initname, ":", fininame, NULL);
|
||||
+ *ld2++ = concat (LD_INIT_SWITCH, ":", initname, ":", fininame, (char *)0);
|
||||
#else
|
||||
*ld2++ = LD_INIT_SWITCH;
|
||||
*ld2++ = initname;
|
||||
@@ -1416,7 +1416,7 @@ main (int argc, char **argv)
|
||||
/* If we did not add export flag to link arguments before, add it to
|
||||
second link phase now. No new exports should have been added. */
|
||||
if (! exports.first)
|
||||
- *ld2++ = concat ("-bE:", export_file, NULL);
|
||||
+ *ld2++ = concat ("-bE:", export_file, (char *)0);
|
||||
|
||||
#ifndef LD_INIT_SWITCH
|
||||
add_to_list (&exports, initname);
|
||||
@@ -1811,8 +1811,8 @@ write_c_file_stat (FILE *stream, const char *name ATTR
|
||||
notice ("\nwrite_c_file - output name is %s, prefix is %s\n",
|
||||
output_file, prefix);
|
||||
|
||||
- initname = concat ("_GLOBAL__FI_", prefix, NULL);
|
||||
- fininame = concat ("_GLOBAL__FD_", prefix, NULL);
|
||||
+ initname = concat ("_GLOBAL__FI_", prefix, (char *)0);
|
||||
+ fininame = concat ("_GLOBAL__FD_", prefix, (char *)0);
|
||||
|
||||
free (prefix);
|
||||
|
77
lang/gfortran/patches/patch-gcc_config_alpha_openbsd_h
Normal file
77
lang/gfortran/patches/patch-gcc_config_alpha_openbsd_h
Normal file
@ -0,0 +1,77 @@
|
||||
$OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/alpha/openbsd.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/alpha/openbsd.h Mon Jun 14 19:23:03 2010
|
||||
@@ -18,23 +18,13 @@ along with GCC; see the file COPYING. If not, write t
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
-/* We settle for little endian for now. */
|
||||
-#define TARGET_ENDIAN_DEFAULT 0
|
||||
-
|
||||
/* Controlling the compilation driver. */
|
||||
|
||||
-/* alpha needs __start. */
|
||||
-#undef LINK_SPEC
|
||||
-#define LINK_SPEC \
|
||||
- "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp %{assert*}"
|
||||
-
|
||||
/* run-time target specifications */
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
- builtin_define ("__OpenBSD__"); \
|
||||
- builtin_define ("__ANSI_COMPAT"); \
|
||||
- builtin_define ("__unix__"); \
|
||||
- builtin_assert ("system=unix"); \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_LP64(); \
|
||||
} while (0)
|
||||
|
||||
/* Layout of source language data types. */
|
||||
@@ -53,47 +43,4 @@ Boston, MA 02110-1301, USA. */
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
|
||||
-#undef PREFERRED_DEBUGGING_TYPE
|
||||
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
-
|
||||
#define LOCAL_LABEL_PREFIX "."
|
||||
-
|
||||
-/* We don't have an init section yet. */
|
||||
-#undef HAS_INIT_SECTION
|
||||
-
|
||||
-/* collect2 support (assembler format: macros for initialization). */
|
||||
-
|
||||
-/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
|
||||
- library with the proper functions to handle this -> collect2 will
|
||||
- default to using nm. */
|
||||
-#undef OBJECT_FORMAT_COFF
|
||||
-#undef EXTENDED_COFF
|
||||
-
|
||||
-/* Assembler format: exception region output. */
|
||||
-
|
||||
-/* All configurations that don't use elf must be explicit about not using
|
||||
- dwarf unwind information. */
|
||||
-#ifdef INCOMING_RETURN_ADDR_RTX
|
||||
-#undef DWARF2_UNWIND_INFO
|
||||
-#define DWARF2_UNWIND_INFO 0
|
||||
-#endif
|
||||
-
|
||||
-/* Assembler format: label output. */
|
||||
-
|
||||
-/* alpha ecoff supports only weak aliases. */
|
||||
-#undef ASM_WEAKEN_LABEL
|
||||
-#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS (FILE,NAME,0)
|
||||
-
|
||||
-#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
|
||||
- do { \
|
||||
- fputs ("\t.weakext\t", FILE); \
|
||||
- assemble_name (FILE, NAME); \
|
||||
- if (VALUE) \
|
||||
- { \
|
||||
- fputs (" , ", FILE); \
|
||||
- assemble_name (FILE, VALUE); \
|
||||
- } \
|
||||
- fputc ('\n', FILE); \
|
||||
- } while (0)
|
||||
-
|
||||
-
|
44
lang/gfortran/patches/patch-gcc_config_exec-stack_h
Normal file
44
lang/gfortran/patches/patch-gcc_config_exec-stack_h
Normal file
@ -0,0 +1,44 @@
|
||||
$OpenBSD: patch-gcc_config_exec-stack_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/exec-stack.h.orig Wed Oct 18 13:49:09 2006
|
||||
+++ gcc/config/exec-stack.h Wed Oct 18 13:49:04 2006
|
||||
@@ -0,0 +1,40 @@
|
||||
+/* Enable stack execute around trampoline address.
|
||||
+ Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#undef FINALIZE_TRAMPOLINE
|
||||
+#define FINALIZE_TRAMPOLINE(TRAMP) \
|
||||
+ emit_library_call(gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), \
|
||||
+ 0, VOIDmode, 1, memory_address (SImode, (TRAMP)), Pmode)
|
||||
+
|
||||
+#undef TRANSFER_FROM_TRAMPOLINE
|
||||
+#define TRANSFER_FROM_TRAMPOLINE \
|
||||
+extern void __enable_execute_stack (void *); \
|
||||
+void \
|
||||
+__enable_execute_stack (addr) \
|
||||
+ void *addr; \
|
||||
+{ \
|
||||
+ long size = getpagesize (); \
|
||||
+ long mask = ~(size-1); \
|
||||
+ char *page = (char *) (((long) addr) & mask); \
|
||||
+ char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
|
||||
+ \
|
||||
+ if (mprotect (page, end - page, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) \
|
||||
+ perror ("mprotect of trampoline code"); \
|
||||
+}
|
99
lang/gfortran/patches/patch-gcc_config_gcc
Normal file
99
lang/gfortran/patches/patch-gcc_config_gcc
Normal file
@ -0,0 +1,99 @@
|
||||
--- gcc/config.gcc.orig Sat Feb 3 06:25:20 2007
|
||||
+++ gcc/config.gcc Mon Jun 14 19:23:03 2010
|
||||
@@ -552,6 +552,11 @@ case ${target} in
|
||||
*-*-openbsd2.*|*-*-openbsd3.[012])
|
||||
tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
|
||||
esac
|
||||
+ case ${target} in
|
||||
+ *-*-openbsd[1-3].*|*-*-openbsd4.[012]) ;;
|
||||
+ *)
|
||||
+ default_use_cxa_atexit=yes ;;
|
||||
+ esac
|
||||
;;
|
||||
*-*-rtems*)
|
||||
case ${enable_threads} in
|
||||
@@ -617,11 +622,11 @@ alpha*-*-netbsd*)
|
||||
tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
|
||||
;;
|
||||
alpha*-*-openbsd*)
|
||||
- tm_defines="${tm_defines} OBSD_NO_DYNAMIC_LIBRARIES OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
|
||||
- tm_file="alpha/alpha.h openbsd.h alpha/openbsd.h"
|
||||
+ tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
|
||||
+ tm_file="alpha/alpha.h alpha/elf.h alpha/openbsd.h openbsd.h openbsd-libpthread.h"
|
||||
# default x-alpha is only appropriate for dec-osf.
|
||||
target_cpu_default="MASK_GAS"
|
||||
- tmake_file="alpha/t-alpha alpha/t-ieee"
|
||||
+ tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
|
||||
;;
|
||||
alpha*-dec-osf[45]*)
|
||||
if test x$stabs = xyes
|
||||
@@ -1080,10 +1085,15 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
|
||||
;;
|
||||
i[34567]86-*-openbsd*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
|
||||
- tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
|
||||
+ tm_file="${tm_file} openbsd.h openbsd-libpthread.h i386/openbsdelf.h"
|
||||
gas=yes
|
||||
gnu_ld=yes
|
||||
;;
|
||||
+x86_64-*-openbsd*)
|
||||
+ tm_file="i386/biarch64.h i386/i386.h i386/unix.h i386/att.h dbxelf.h elfos.h openbsd.h openbsd-libpthread.h i386/x86-64.h i386/openbsd64.h"
|
||||
+ tm_file="${tm_file} exec-stack.h"
|
||||
+ tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
|
||||
+ ;;
|
||||
i[34567]86-*-coff*)
|
||||
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
|
||||
use_fixproto=yes
|
||||
@@ -1474,7 +1484,7 @@ m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
|
||||
m68k*-*-openbsd*)
|
||||
# needed to unconfuse gdb
|
||||
tm_defines="${tm_defines} OBSD_OLD_GAS TARGET_DEFAULT=(MASK_68020|MASK_68881|MASK_BITFIELD)"
|
||||
- tm_file="m68k/m68k.h openbsd.h m68k/openbsd.h"
|
||||
+ tm_file="m68k/m68k.h openbsd.h openbsd-libpthread.h m68k/openbsd.h"
|
||||
tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
|
||||
# we need collect2 until our bug is fixed...
|
||||
use_collect2=yes
|
||||
@@ -1564,7 +1574,7 @@ mips*-*-linux*) # Linux MIPS, either endian.
|
||||
mips*-*-openbsd*)
|
||||
tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
|
||||
target_cpu_default="MASK_ABICALLS"
|
||||
- tm_file="mips/mips.h openbsd.h mips/openbsd.h mips/sdb.h"
|
||||
+ tm_file="mips/mips.h openbsd.h openbsd-libpthread.h mips/openbsd.h mips/sdb.h"
|
||||
case ${target} in
|
||||
mips*el-*-openbsd*)
|
||||
tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
|
||||
@@ -1682,11 +1692,11 @@ pdp11-*-bsd)
|
||||
pdp11-*-*)
|
||||
use_fixproto=yes
|
||||
;;
|
||||
-# port not yet contributed
|
||||
-#powerpc-*-openbsd*)
|
||||
-# tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
|
||||
-# extra_headers=
|
||||
-# ;;
|
||||
+powerpc-*-openbsd*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-libpthread.h freebsd-spec.h rs6000/sysv4.h rs6000/openbsd.h"
|
||||
+ tmake_file="${tmake_file} rs6000/t-openbsd"
|
||||
+ extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
+ ;;
|
||||
powerpc64-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
|
||||
test x$with_cpu != x || cpu_is_64bit=yes
|
||||
@@ -2150,7 +2160,7 @@ sparc-*-netbsdelf*)
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
;;
|
||||
sparc64-*-openbsd*)
|
||||
- tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
|
||||
+ tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h openbsd-libpthread.h sparc/openbsd64.h"
|
||||
extra_options="${extra_options} sparc/little-endian.opt"
|
||||
gas=yes gnu_ld=yes
|
||||
with_cpu=ultrasparc
|
||||
@@ -2395,7 +2405,7 @@ vax-*-netbsd*)
|
||||
use_collect2=yes
|
||||
;;
|
||||
vax-*-openbsd*)
|
||||
- tm_file="vax/vax.h vax/openbsd1.h openbsd.h vax/openbsd.h"
|
||||
+ tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-libpthread.h vax/openbsd.h"
|
||||
use_collect2=yes
|
||||
;;
|
||||
vax-*-ultrix*) # VAXen running ultrix
|
14
lang/gfortran/patches/patch-gcc_config_host
Normal file
14
lang/gfortran/patches/patch-gcc_config_host
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-gcc_config_host,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config.host.orig Tue Dec 5 17:06:39 2006
|
||||
+++ gcc/config.host Mon Jun 14 19:23:03 2010
|
||||
@@ -201,6 +201,10 @@ case ${host} in
|
||||
out_host_hook_obj=host-solaris.o
|
||||
host_xmake_file="${host_xmake_file} x-solaris"
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ out_host_hook_obj=host-openbsd.o
|
||||
+ host_xmake_file="${host_xmake_file} x-openbsd"
|
||||
+ ;;
|
||||
*-*-linux*)
|
||||
out_host_hook_obj=host-linux.o
|
||||
host_xmake_file="${host_xmake_file} x-linux"
|
111
lang/gfortran/patches/patch-gcc_config_host-openbsd_c
Normal file
111
lang/gfortran/patches/patch-gcc_config_host-openbsd_c
Normal file
@ -0,0 +1,111 @@
|
||||
$OpenBSD: patch-gcc_config_host-openbsd_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/host-openbsd.c.orig Wed Apr 23 07:42:45 2008
|
||||
+++ gcc/config/host-openbsd.c Wed Apr 23 17:57:19 2008
|
||||
@@ -0,0 +1,107 @@
|
||||
+/* OpenBSD host-specific hook definitions.
|
||||
+ Copyright (C) 2005 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. */
|
||||
+
|
||||
+#include <limits.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include "system.h"
|
||||
+#include "coretypes.h"
|
||||
+#include "hosthooks.h"
|
||||
+#include "hosthooks-def.h"
|
||||
+
|
||||
+#undef HOST_HOOKS_GT_PCH_GET_ADDRESS
|
||||
+#define HOST_HOOKS_GT_PCH_GET_ADDRESS openbsd_gt_pch_get_address
|
||||
+
|
||||
+#undef HOST_HOOKS_GT_PCH_USE_ADDRESS
|
||||
+#define HOST_HOOKS_GT_PCH_USE_ADDRESS openbsd_gt_pch_use_address
|
||||
+
|
||||
+/* Return the address of the PCH address space, if the PCH will fit in it. */
|
||||
+
|
||||
+void *
|
||||
+openbsd_gt_pch_get_address (size_t size, int fd ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ void *base, *addr;
|
||||
+ size_t pgsz;
|
||||
+
|
||||
+ if (size > INT_MAX)
|
||||
+ return NULL;
|
||||
+
|
||||
+ pgsz = sysconf(_SC_PAGESIZE);
|
||||
+ if (pgsz == (size_t)-1)
|
||||
+ return NULL;
|
||||
+
|
||||
+ base = sbrk(0);
|
||||
+
|
||||
+ /* round up to nearest page */
|
||||
+ base = (void *)(((long)base + (pgsz - 1)) & ~(pgsz - 1));
|
||||
+ if (brk(base) != 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* attempt to allocate size */
|
||||
+ addr = sbrk(size);
|
||||
+ if (addr == (void *)-1)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* deallocate the memory */
|
||||
+ if (brk(base) != 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* confirm addr is as expected */
|
||||
+ if (addr != base)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return base;
|
||||
+}
|
||||
+
|
||||
+/* Return 0 if we can reserve the PCH address space. */
|
||||
+
|
||||
+int
|
||||
+openbsd_gt_pch_use_address (void *base, size_t size, int fd ATTRIBUTE_UNUSED, size_t off ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ void *addr;
|
||||
+
|
||||
+ if (size == 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ /* sanity check base address */
|
||||
+ addr = sbrk(0);
|
||||
+ if (addr == (void *)-1 || base < addr)
|
||||
+ return -1;
|
||||
+
|
||||
+ /* set base for sbrk */
|
||||
+ if (brk(base) != 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ /* attempt to get the memory */
|
||||
+ addr = sbrk(size);
|
||||
+ if (addr == (void *)-1)
|
||||
+ return -1;
|
||||
+
|
||||
+ /* sanity check the result */
|
||||
+ if (addr != base) {
|
||||
+ brk(base);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
|
20
lang/gfortran/patches/patch-gcc_config_i386_driver-i386_c
Normal file
20
lang/gfortran/patches/patch-gcc_config_i386_driver-i386_c
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-gcc_config_i386_driver-i386_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/i386/driver-i386.c.orig Fri Dec 29 07:09:06 2006
|
||||
+++ gcc/config/i386/driver-i386.c Mon Jun 14 19:23:04 2010
|
||||
@@ -269,7 +269,7 @@ const char *host_detect_local_cpu (int argc, const cha
|
||||
}
|
||||
|
||||
done:
|
||||
- return concat ("-m", argv[0], "=", cpu, NULL);
|
||||
+ return concat ("-m", argv[0], "=", cpu, (void *)0);
|
||||
}
|
||||
#else
|
||||
/* If we aren't compiling with GCC we just provide a minimal
|
||||
@@ -295,6 +295,6 @@ const char *host_detect_local_cpu (int argc, const cha
|
||||
else
|
||||
cpu = "generic";
|
||||
|
||||
- return concat ("-m", argv[0], "=", cpu, NULL);
|
||||
+ return concat ("-m", argv[0], "=", cpu, (void *)0);
|
||||
}
|
||||
#endif /* GCC_VERSION */
|
125
lang/gfortran/patches/patch-gcc_config_i386_openbsd64_h
Normal file
125
lang/gfortran/patches/patch-gcc_config_i386_openbsd64_h
Normal file
@ -0,0 +1,125 @@
|
||||
$OpenBSD: patch-gcc_config_i386_openbsd64_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/i386/openbsd64.h.orig Wed Oct 18 13:48:08 2006
|
||||
+++ gcc/config/i386/openbsd64.h Wed Oct 18 13:48:02 2006
|
||||
@@ -0,0 +1,121 @@
|
||||
+/* Configuration for an OpenBSD x86-64 target.
|
||||
+
|
||||
+ Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#undef TARGET_VERSION
|
||||
+#define TARGET_VERSION fprintf (stderr, " (OpenBSD/x86-64 ELF)")
|
||||
+
|
||||
+/* This gets defined in tm.h->linux.h->svr4.h, and keeps us from using
|
||||
+ libraries compiled with the native cc, so undef it. */
|
||||
+#undef NO_DOLLAR_IN_LABEL
|
||||
+
|
||||
+/* Override the default comment-starter of "/". */
|
||||
+#undef ASM_COMMENT_START
|
||||
+#define ASM_COMMENT_START "#"
|
||||
+
|
||||
+/* Run-time target specifications */
|
||||
+
|
||||
+#define TARGET_OS_CPP_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
|
||||
+ if (TARGET_64BIT) \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_LP64(); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* As an elf system, we need crtbegin/crtend stuff. */
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "\
|
||||
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
|
||||
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
|
||||
+#undef ENDFILE_SPEC
|
||||
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
|
||||
+
|
||||
+/* Layout of source language data types. */
|
||||
+
|
||||
+/* This must agree with <machine/_types.h> */
|
||||
+#undef SIZE_TYPE
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
+
|
||||
+#undef PTRDIFF_TYPE
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
+
|
||||
+#undef WCHAR_TYPE
|
||||
+#define WCHAR_TYPE "int"
|
||||
+
|
||||
+#undef WCHAR_TYPE_SIZE
|
||||
+#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+/* Assembler format: overall framework. */
|
||||
+
|
||||
+#undef ASM_APP_ON
|
||||
+#define ASM_APP_ON "#APP\n"
|
||||
+
|
||||
+#undef ASM_APP_OFF
|
||||
+#define ASM_APP_OFF "#NO_APP\n"
|
||||
+
|
||||
+#undef SET_ASM_OP
|
||||
+#define SET_ASM_OP "\t.set\t"
|
||||
+
|
||||
+/* The following macros were originally stolen from i386v4.h.
|
||||
+ These have to be defined to get PIC code correct. */
|
||||
+
|
||||
+/* Assembler format: dispatch tables. */
|
||||
+
|
||||
+/* Assembler format: sections. */
|
||||
+
|
||||
+/* Stack & calling: aggregate returns. */
|
||||
+
|
||||
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
|
||||
+ we want to retain compatibility with older gcc versions. */
|
||||
+#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
+
|
||||
+/* Assembler format: alignment output. */
|
||||
+
|
||||
+/* Stack & calling: profiling. */
|
||||
+
|
||||
+/* OpenBSD's profiler recovers all information from the stack pointer.
|
||||
+ The icky part is not here, but in machine/profile.h. */
|
||||
+#undef FUNCTION_PROFILER
|
||||
+#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
+ fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
|
||||
+
|
||||
+/* Assembler format: exception region output. */
|
||||
+
|
||||
+/* Assembler format: alignment output. */
|
||||
+
|
||||
+/* Note that we pick up ASM_OUTPUT_MAX_SKIP_ALIGN from i386/gas.h */
|
||||
+
|
||||
+/* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC \
|
||||
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
|
||||
+ %{shared:-shared} %{R*} \
|
||||
+ %{static:-Bstatic} \
|
||||
+ %{!static:-Bdynamic} \
|
||||
+ %{assert*} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
|
||||
+
|
||||
+#define OBSD_HAS_CORRECT_SPECS
|
||||
+
|
||||
+#undef JUMP_TABLES_IN_TEXT_SECTION
|
||||
+#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
|
25
lang/gfortran/patches/patch-gcc_config_i386_openbsd_h
Normal file
25
lang/gfortran/patches/patch-gcc_config_i386_openbsd_h
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-gcc_config_i386_openbsd_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/i386/openbsd.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/i386/openbsd.h Mon Jun 14 19:23:04 2010
|
||||
@@ -41,16 +41,19 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This must agree with <machine/ansi.h> */
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE "unsigned int"
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE "int"
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef WINT_TYPE
|
||||
+#define WINT_TYPE "int"
|
||||
|
||||
/* Assembler format: overall framework. */
|
||||
|
26
lang/gfortran/patches/patch-gcc_config_i386_openbsdelf_h
Normal file
26
lang/gfortran/patches/patch-gcc_config_i386_openbsdelf_h
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-gcc_config_i386_openbsdelf_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/i386/openbsdelf.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/i386/openbsdelf.h Mon Jun 14 19:23:04 2010
|
||||
@@ -56,10 +56,10 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This must agree with <machine/ansi.h> */
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE "unsigned int"
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE "int"
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
@@ -110,9 +110,6 @@ Boston, MA 02110-1301, USA. */
|
||||
fputs (flag_pic ? "\tcall __mcount@PLT\n": "\tcall __mcount\n", FILE);
|
||||
|
||||
/* Assembler format: exception region output. */
|
||||
-
|
||||
-/* our configuration still doesn't handle dwarf2 correctly */
|
||||
-#define DWARF2_UNWIND_INFO 0
|
||||
|
||||
/* Assembler format: alignment output. */
|
||||
|
25
lang/gfortran/patches/patch-gcc_config_m68k_openbsd_h
Normal file
25
lang/gfortran/patches/patch-gcc_config_m68k_openbsd_h
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-gcc_config_m68k_openbsd_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/m68k/openbsd.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/m68k/openbsd.h Mon Jun 14 19:23:04 2010
|
||||
@@ -44,16 +44,19 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This must agree with <machine/ansi.h> */
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE "unsigned int"
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE "int"
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef WINT_TYPE
|
||||
+#define WINT_TYPE "int"
|
||||
|
||||
/* Storage layout. */
|
||||
|
25
lang/gfortran/patches/patch-gcc_config_mips_openbsd_h
Normal file
25
lang/gfortran/patches/patch-gcc_config_mips_openbsd_h
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-gcc_config_mips_openbsd_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/mips/openbsd.h.orig Sat Aug 6 15:26:35 2005
|
||||
+++ gcc/config/mips/openbsd.h Mon Jun 14 19:23:04 2010
|
||||
@@ -58,16 +58,19 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This must agree with <machine/ansi.h>. */
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE "unsigned int"
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE "int"
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef WINT_TYPE
|
||||
+#define WINT_TYPE "int"
|
||||
|
||||
/* Controlling the compilation driver. */
|
||||
|
27
lang/gfortran/patches/patch-gcc_config_openbsd-libpthread_h
Normal file
27
lang/gfortran/patches/patch-gcc_config_openbsd-libpthread_h
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-gcc_config_openbsd-libpthread_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/openbsd-libpthread.h.orig Wed Oct 18 13:46:36 2006
|
||||
+++ gcc/config/openbsd-libpthread.h Wed Oct 18 13:46:50 2006
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* LIB_SPEC appropriate for OpenBSD. Include -lpthread if -pthread is
|
||||
+ specified on the command line. */
|
||||
+/* Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread} -lc}"
|
||||
+
|
82
lang/gfortran/patches/patch-gcc_config_openbsd_h
Normal file
82
lang/gfortran/patches/patch-gcc_config_openbsd_h
Normal file
@ -0,0 +1,82 @@
|
||||
$OpenBSD: patch-gcc_config_openbsd_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/openbsd.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/openbsd.h Mon Jun 14 19:23:04 2010
|
||||
@@ -73,6 +73,37 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Controlling the compilation driver. */
|
||||
/* TARGET_OS_CPP_BUILTINS() common to all OpenBSD targets. */
|
||||
+#define OPENBSD_OS_CPP_BUILTINS_COMMON() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ builtin_define ("__OpenBSD__"); \
|
||||
+ builtin_define ("__unix__"); \
|
||||
+ builtin_define ("__ANSI_COMPAT"); \
|
||||
+ builtin_assert ("system=unix"); \
|
||||
+ builtin_assert ("system=bsd"); \
|
||||
+ builtin_assert ("system=OpenBSD"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* TARGET_OS_CPP_BUILTINS() common to all OpenBSD ELF targets. */
|
||||
+#define OPENBSD_OS_CPP_BUILTINS_ELF() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_COMMON(); \
|
||||
+ builtin_define ("__ELF__"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* TARGET_OS_CPP_BUILTINS() common to all LP64 OpenBSD targets. */
|
||||
+#define OPENBSD_OS_CPP_BUILTINS_LP64() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ builtin_define ("_LP64"); \
|
||||
+ builtin_define ("__LP64__"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* XXX old stuff TARGET_OS_CPP_BUILTINS() common to all OpenBSD targets. */
|
||||
#define OPENBSD_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
@@ -96,16 +127,9 @@ Boston, MA 02110-1301, USA. */
|
||||
#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
|
||||
#endif
|
||||
|
||||
-/* LIB_SPEC appropriate for OpenBSD. */
|
||||
-#ifdef HAS_LIBC_R
|
||||
-/* -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */
|
||||
-# define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}"
|
||||
-#else
|
||||
-/* Include -lpthread if -pthread is specified on the command line. */
|
||||
-# define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
|
||||
-#endif
|
||||
+#undef LIB_SPEC
|
||||
+#define LIB_SPEC OBSD_LIB_SPEC
|
||||
|
||||
-
|
||||
#ifndef OBSD_HAS_CORRECT_SPECS
|
||||
|
||||
#ifndef OBSD_NO_DYNAMIC_LIBRARIES
|
||||
@@ -140,6 +164,10 @@ Boston, MA 02110-1301, USA. */
|
||||
"%{g:%{!nostdlib:-L/usr/lib/debug}} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}}} %{shared:-Bshareable -x} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
+#endif
|
||||
+
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC OBSD_LIB_SPEC
|
||||
#endif
|
||||
@@ -282,10 +310,6 @@ do { \
|
||||
/* Storage layout. */
|
||||
|
||||
|
||||
-/* Otherwise, since we support weak, gthr.h erroneously tries to use
|
||||
- #pragma weak. */
|
||||
-#define GTHREAD_USE_WEAK 0
|
||||
-
|
||||
/* bug work around: we don't want to support #pragma weak, but the current
|
||||
code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to
|
||||
work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly,
|
28
lang/gfortran/patches/patch-gcc_config_rs6000_openbsd1_h
Normal file
28
lang/gfortran/patches/patch-gcc_config_rs6000_openbsd1_h
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-gcc_config_rs6000_openbsd1_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/rs6000/openbsd1.h.orig Tue Jun 12 14:05:16 2007
|
||||
+++ gcc/config/rs6000/openbsd1.h Tue Jun 12 14:05:16 2007
|
||||
@@ -0,0 +1,24 @@
|
||||
+/* Configuration file for an rs6000 OpenBSD target.
|
||||
+ Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#define OBSD_HAS_CORRECT_SPECS
|
||||
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
|
||||
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
|
||||
+#define OBSD_HAS_DECLARE_OBJECT
|
136
lang/gfortran/patches/patch-gcc_config_rs6000_openbsd_h
Normal file
136
lang/gfortran/patches/patch-gcc_config_rs6000_openbsd_h
Normal file
@ -0,0 +1,136 @@
|
||||
$OpenBSD: patch-gcc_config_rs6000_openbsd_h,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/rs6000/openbsd.h.orig Sat Jun 9 17:11:08 2007
|
||||
+++ gcc/config/rs6000/openbsd.h Sat Jun 9 18:24:52 2007
|
||||
@@ -0,0 +1,132 @@
|
||||
+/* Configuration file for an rs6000 OpenBSD target.
|
||||
+ Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+/* XXX need to check ASM_WEAKEN_LABEL/ASM_GLOBALIZE_LABEL. */
|
||||
+
|
||||
+/* Run-time target specifications. */
|
||||
+#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
|
||||
+#define TARGET_OS_CPP_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
|
||||
+ builtin_define ("__PPC"); \
|
||||
+ builtin_define ("__PPC__"); \
|
||||
+ builtin_define ("__powerpc"); \
|
||||
+ builtin_define ("__powerpc__"); \
|
||||
+ builtin_assert ("cpu=powerpc"); \
|
||||
+ builtin_assert ("machine=powerpc"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+/* Override the default from rs6000.h to avoid conflicts with macros
|
||||
+ defined in OpenBSD header files. */
|
||||
+
|
||||
+#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
|
||||
+#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (BYTES_BIG_ENDIAN) \
|
||||
+ { \
|
||||
+ builtin_define ("__BIG_ENDIAN__"); \
|
||||
+ builtin_assert ("machine=bigendian"); \
|
||||
+ } \
|
||||
+ else \
|
||||
+ { \
|
||||
+ builtin_define ("__LITTLE_ENDIAN__"); \
|
||||
+ builtin_assert ("machine=littleendian"); \
|
||||
+ } \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+#undef CPP_OS_DEFAULT_SPEC
|
||||
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_openbsd)"
|
||||
+
|
||||
+#undef LINKER_NAME
|
||||
+#define LINKER_NAME "ld"
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC "%{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+#undef LIB_DEFAULT_SPEC
|
||||
+#define LIB_DEFAULT_SPEC "%(lib_openbsd)"
|
||||
+
|
||||
+#undef STARTFILE_DEFAULT_SPEC
|
||||
+#define STARTFILE_DEFAULT_SPEC "%(startfile_openbsd)"
|
||||
+
|
||||
+#undef ENDFILE_DEFAULT_SPEC
|
||||
+#define ENDFILE_DEFAULT_SPEC "%(endfile_openbsd)"
|
||||
+
|
||||
+#undef LINK_START_DEFAULT_SPEC
|
||||
+#define LINK_START_DEFAULT_SPEC "%(link_start_openbsd)"
|
||||
+
|
||||
+#undef LINK_OS_DEFAULT_SPEC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_openbsd)"
|
||||
+
|
||||
+#undef TARGET_VERSION
|
||||
+#define TARGET_VERSION fprintf (stderr, " (PowerPC OpenBSD)");
|
||||
+
|
||||
+/* Default ABI to use */
|
||||
+#undef RS6000_ABI_NAME
|
||||
+#define RS6000_ABI_NAME "openbsd"
|
||||
+
|
||||
+/* Define this macro as a C expression for the initializer of an
|
||||
+ array of string to tell the driver program which options are
|
||||
+ defaults for this target and thus do not need to be handled
|
||||
+ specially when using `MULTILIB_OPTIONS'.
|
||||
+
|
||||
+ Do not define this macro if `MULTILIB_OPTIONS' is not defined in
|
||||
+ the target makefile fragment or if none of the options listed in
|
||||
+ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
|
||||
+
|
||||
+#undef MULTILIB_DEFAULTS
|
||||
+#define MULTILIB_DEFAULTS { "mbig", "mcall-openbsd" }
|
||||
+
|
||||
+/* collect2 support (Macros for initialization). */
|
||||
+
|
||||
+
|
||||
+/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
|
||||
+ library with the proper functions to handle this -> collect2 will
|
||||
+ default to using nm. */
|
||||
+#undef OBJECT_FORMAT_COFF
|
||||
+
|
||||
+/* Some code gets optimized incorrectly by move_movables() in loop.c */
|
||||
+#define BROKEN_MOVE_MOVABLES_P
|
||||
+
|
||||
+/* This must agree with <machine/_types.h> */
|
||||
+#undef SIZE_TYPE
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
+
|
||||
+#undef PTRDIFF_TYPE
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
+
|
||||
+#undef WCHAR_TYPE
|
||||
+#define WCHAR_TYPE "int"
|
||||
+
|
||||
+#undef WCHAR_TYPE_SIZE
|
||||
+#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef TRAMPOLINE_SIZE
|
||||
+#define TRAMPOLINE_SIZE 40
|
||||
+
|
59
lang/gfortran/patches/patch-gcc_config_rs6000_t-openbsd
Normal file
59
lang/gfortran/patches/patch-gcc_config_rs6000_t-openbsd
Normal file
@ -0,0 +1,59 @@
|
||||
$OpenBSD: patch-gcc_config_rs6000_t-openbsd,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/config/rs6000/t-openbsd.orig Tue Jun 12 12:23:22 2007
|
||||
+++ gcc/config/rs6000/t-openbsd Tue Jun 12 12:18:16 2007
|
||||
@@ -0,0 +1,55 @@
|
||||
+# include t-rs6000 too
|
||||
+# this is taken from t-ppccomm
|
||||
+# but crt* removed.
|
||||
+
|
||||
+
|
||||
+LIB2FUNCS_EXTRA = tramp.S
|
||||
+
|
||||
+# This one can't end up in shared libgcc
|
||||
+LIB2FUNCS_STATIC_EXTRA = eabi.S
|
||||
+
|
||||
+# We want fine grained libraries, so use the new code to build the
|
||||
+# floating point emulation libraries.
|
||||
+FPBIT = fp-bit.c
|
||||
+DPBIT = dp-bit.c
|
||||
+
|
||||
+
|
||||
+dp-bit.c: $(srcdir)/config/fp-bit.c
|
||||
+ cat $(srcdir)/config/fp-bit.c > dp-bit.c
|
||||
+
|
||||
+fp-bit.c: $(srcdir)/config/fp-bit.c
|
||||
+ echo '#define FLOAT' > fp-bit.c
|
||||
+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
|
||||
+
|
||||
+eabi.S: $(srcdir)/config/rs6000/eabi.asm
|
||||
+ cat $(srcdir)/config/rs6000/eabi.asm > eabi.S
|
||||
+
|
||||
+tramp.S: $(srcdir)/config/rs6000/tramp.asm
|
||||
+ cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
|
||||
+
|
||||
+# Switch synonyms
|
||||
+MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \
|
||||
+ msoft-float=mcpu?403 \
|
||||
+ msoft-float=mcpu?ec603e \
|
||||
+ msoft-float=mcpu?801 \
|
||||
+ msoft-float=mcpu?821 \
|
||||
+ msoft-float=mcpu?823 \
|
||||
+ msoft-float=mcpu?860
|
||||
+MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
|
||||
+MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd
|
||||
+
|
||||
+LIBGCC = stmp-multilib
|
||||
+INSTALL_LIBGCC = install-multilib
|
||||
+EXTRA_MULTILIB_PARTS = crtsavres$(objext)
|
||||
+
|
||||
+crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm
|
||||
+ cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S
|
||||
+
|
||||
+$(T)crtsavres$(objext): crtsavres.S
|
||||
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext)
|
||||
+
|
||||
+# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
|
||||
+CRTSTUFF_T_CFLAGS = -msdata=none
|
||||
+# Make sure crt*.o are built with -fPIC even if configured with
|
||||
+# --enable-shared --disable-multilib
|
||||
+CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none
|
13
lang/gfortran/patches/patch-gcc_config_t-openbsd
Normal file
13
lang/gfortran/patches/patch-gcc_config_t-openbsd
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-gcc_config_t-openbsd,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/t-openbsd.orig Tue Sep 23 20:56:00 2003
|
||||
+++ gcc/config/t-openbsd Sat Apr 11 14:22:32 2009
|
||||
@@ -1,2 +1,8 @@
|
||||
# We don't need GCC's own include files.
|
||||
-USER_H =
|
||||
+USER_H = $(EXTRA_HEADERS)
|
||||
+# Use unwind-dw2-fde-glibc
|
||||
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-openbsd.c \
|
||||
+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
|
||||
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c \
|
||||
+ unwind-dw2-fde-glibc.c
|
||||
+
|
23
lang/gfortran/patches/patch-gcc_config_vax_openbsd_h
Normal file
23
lang/gfortran/patches/patch-gcc_config_vax_openbsd_h
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-gcc_config_vax_openbsd_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/vax/openbsd.h.orig Sat Jun 25 03:22:41 2005
|
||||
+++ gcc/config/vax/openbsd.h Mon Jun 14 19:23:04 2010
|
||||
@@ -34,13 +34,17 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* This must agree with <machine/ansi.h> */
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE "unsigned int"
|
||||
+#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE "int"
|
||||
+#define PTRDIFF_TYPE "long int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+#undef WINT_TYPE
|
||||
+#define WINT_TYPE "int"
|
||||
+
|
8
lang/gfortran/patches/patch-gcc_config_x-openbsd
Normal file
8
lang/gfortran/patches/patch-gcc_config_x-openbsd
Normal file
@ -0,0 +1,8 @@
|
||||
$OpenBSD: patch-gcc_config_x-openbsd,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/config/x-openbsd.orig Mon Jan 31 14:50:47 2005
|
||||
+++ gcc/config/x-openbsd Mon Jan 31 14:51:13 2005
|
||||
@@ -0,0 +1,4 @@
|
||||
+host-openbsd.o : $(srcdir)/config/host-openbsd.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
+ coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H)
|
||||
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
|
||||
+ $(srcdir)/config/host-openbsd.c
|
21
lang/gfortran/patches/patch-gcc_configure
Normal file
21
lang/gfortran/patches/patch-gcc_configure
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-gcc_configure,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/configure.orig Sun Jun 20 22:35:23 2010
|
||||
+++ gcc/configure Sun Jun 20 22:36:11 2010
|
||||
@@ -17209,7 +17209,7 @@ s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
|
||||
s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
|
||||
s,@LDEXP_LIB@,$LDEXP_LIB,;t t
|
||||
s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
|
||||
-s,@LIBICONV@,$LIBICONV,;t t
|
||||
+s,@LIBICONV@,$LTLIBICONV,;t t
|
||||
s,@LTLIBICONV@,$LTLIBICONV,;t t
|
||||
s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
|
||||
s,@manext@,$manext,;t t
|
||||
@@ -17218,7 +17218,7 @@ s,@gthread_flags@,$gthread_flags,;t t
|
||||
s,@extra_modes_file@,$extra_modes_file,;t t
|
||||
s,@extra_opt_files@,$extra_opt_files,;t t
|
||||
s,@USE_NLS@,$USE_NLS,;t t
|
||||
-s,@LIBINTL@,$LIBINTL,;t t
|
||||
+s,@LIBINTL@,$LTLIBINTL,;t t
|
||||
s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
|
||||
s,@INCINTL@,$INCINTL,;t t
|
||||
s,@XGETTEXT@,$XGETTEXT,;t t
|
12
lang/gfortran/patches/patch-gcc_coverage_c
Normal file
12
lang/gfortran/patches/patch-gcc_coverage_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_coverage_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/coverage.c.orig Wed Jun 21 23:27:19 2006
|
||||
+++ gcc/coverage.c Mon Jun 14 19:23:04 2010
|
||||
@@ -807,7 +807,7 @@ build_gcov_info (void)
|
||||
fields = field;
|
||||
filename = getpwd ();
|
||||
filename = (filename && da_file_name[0] != '/'
|
||||
- ? concat (filename, "/", da_file_name, NULL)
|
||||
+ ? concat (filename, "/", da_file_name, (void *)0)
|
||||
: da_file_name);
|
||||
filename_len = strlen (filename);
|
||||
filename_string = build_string (filename_len + 1, filename);
|
21
lang/gfortran/patches/patch-gcc_cp_call_c
Normal file
21
lang/gfortran/patches/patch-gcc_cp_call_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-gcc_cp_call_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/cp/call.c.orig Sat Jul 7 04:02:37 2007
|
||||
+++ gcc/cp/call.c Mon Jun 14 19:23:04 2010
|
||||
@@ -5291,7 +5291,7 @@ name_as_c_string (tree name, tree type, bool *free_p)
|
||||
|| name == base_dtor_identifier
|
||||
|| name == deleting_dtor_identifier)
|
||||
{
|
||||
- pretty_name = concat ("~", pretty_name, NULL);
|
||||
+ pretty_name = concat ("~", pretty_name, (void *)0);
|
||||
/* Remember that we need to free the memory allocated. */
|
||||
*free_p = true;
|
||||
}
|
||||
@@ -5301,7 +5301,7 @@ name_as_c_string (tree name, tree type, bool *free_p)
|
||||
pretty_name = concat ("operator ",
|
||||
type_as_string (TREE_TYPE (name),
|
||||
TFF_PLAIN_IDENTIFIER),
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
/* Remember that we need to free the memory allocated. */
|
||||
*free_p = true;
|
||||
}
|
12
lang/gfortran/patches/patch-gcc_cp_decl2_c
Normal file
12
lang/gfortran/patches/patch-gcc_cp_decl2_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_cp_decl2_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/cp/decl2.c.orig Tue Jun 19 02:40:30 2007
|
||||
+++ gcc/cp/decl2.c Mon Jun 14 19:23:04 2010
|
||||
@@ -3011,7 +3011,7 @@ build_java_method_aliases (void)
|
||||
oid = DECL_ASSEMBLER_NAME (fndecl);
|
||||
oname = IDENTIFIER_POINTER (oid);
|
||||
gcc_assert (oname[0] == '_' && oname[1] == 'Z');
|
||||
- nname = ACONCAT (("_ZGA", oname+2, NULL));
|
||||
+ nname = ACONCAT (("_ZGA", oname+2, (char *)0));
|
||||
nid = get_identifier (nname);
|
||||
|
||||
alias = make_alias_for (fndecl, nid);
|
12
lang/gfortran/patches/patch-gcc_cp_g++spec_c
Normal file
12
lang/gfortran/patches/patch-gcc_cp_g++spec_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_cp_g++spec_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/cp/g++spec.c.orig Fri Aug 25 02:24:10 2006
|
||||
+++ gcc/cp/g++spec.c Mon Jun 14 19:23:04 2010
|
||||
@@ -40,7 +40,7 @@ Boston, MA 02110-1301, USA. */
|
||||
#endif
|
||||
|
||||
#ifndef LIBSTDCXX
|
||||
-#define LIBSTDCXX "-lstdc++"
|
||||
+#define LIBSTDCXX "-lestdc++"
|
||||
#endif
|
||||
#ifndef LIBSTDCXX_PROFILE
|
||||
#define LIBSTDCXX_PROFILE LIBSTDCXX
|
12
lang/gfortran/patches/patch-gcc_cp_parser_c
Normal file
12
lang/gfortran/patches/patch-gcc_cp_parser_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_cp_parser_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/cp/parser.c.orig Sat Jul 7 04:02:37 2007
|
||||
+++ gcc/cp/parser.c Mon Jun 14 19:23:04 2010
|
||||
@@ -16499,7 +16499,7 @@ cp_parser_require (cp_parser* parser,
|
||||
/* Output the MESSAGE -- unless we're parsing tentatively. */
|
||||
if (!cp_parser_simulate_error (parser))
|
||||
{
|
||||
- char *message = concat ("expected ", token_desc, NULL);
|
||||
+ char *message = concat ("expected ", token_desc, (void *)0);
|
||||
cp_parser_error (parser, message);
|
||||
free (message);
|
||||
}
|
12
lang/gfortran/patches/patch-gcc_dbxout_c
Normal file
12
lang/gfortran/patches/patch-gcc_dbxout_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_dbxout_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/dbxout.c.orig Wed Jul 26 19:38:37 2006
|
||||
+++ gcc/dbxout.c Mon Jun 14 19:23:04 2010
|
||||
@@ -1008,7 +1008,7 @@ dbxout_init (const char *input_file_name)
|
||||
if (cwd[0] == '\0')
|
||||
cwd = "/";
|
||||
else if (!IS_DIR_SEPARATOR (cwd[strlen (cwd) - 1]))
|
||||
- cwd = concat (cwd, "/", NULL);
|
||||
+ cwd = concat (cwd, "/", (void *)0);
|
||||
}
|
||||
#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
|
||||
DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);
|
12
lang/gfortran/patches/patch-gcc_diagnostic_c
Normal file
12
lang/gfortran/patches/patch-gcc_diagnostic_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_diagnostic_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/diagnostic.c.orig Wed Mar 22 20:36:22 2006
|
||||
+++ gcc/diagnostic.c Mon Jun 14 19:23:04 2010
|
||||
@@ -398,7 +398,7 @@ diagnostic_report_diagnostic (diagnostic_context *cont
|
||||
if (context->show_option_requested && diagnostic->option_index)
|
||||
diagnostic->message.format_spec
|
||||
= ACONCAT ((diagnostic->message.format_spec,
|
||||
- " [", cl_options[diagnostic->option_index].opt_text, "]", NULL));
|
||||
+ " [", cl_options[diagnostic->option_index].opt_text, "]", (char *)0));
|
||||
|
||||
diagnostic->message.locus = &diagnostic->location;
|
||||
pp_format (context->printer, &diagnostic->message);
|
200
lang/gfortran/patches/patch-gcc_gcc_c
Normal file
200
lang/gfortran/patches/patch-gcc_gcc_c
Normal file
@ -0,0 +1,200 @@
|
||||
$OpenBSD: patch-gcc_gcc_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/gcc.c.orig Mon Mar 5 21:37:05 2007
|
||||
+++ gcc/gcc.c Mon Jun 14 19:23:04 2010
|
||||
@@ -1313,7 +1313,7 @@ translate_options (int *argcp, const char *const **arg
|
||||
/* Store the translation as one argv elt or as two. */
|
||||
if (arg != 0 && strchr (arginfo, 'j') != 0)
|
||||
newv[newindex++] = concat (option_map[j].equivalent, arg,
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
else if (arg != 0)
|
||||
{
|
||||
newv[newindex++] = option_map[j].equivalent;
|
||||
@@ -1642,7 +1642,7 @@ init_gcc_specs (struct obstack *obstack, const char *s
|
||||
"%{shared:", shared_name, "}"
|
||||
#endif
|
||||
#endif
|
||||
- "}}", NULL);
|
||||
+ "}}", (void *)0);
|
||||
|
||||
obstack_grow (obstack, buf, strlen (buf));
|
||||
free (buf);
|
||||
@@ -1840,7 +1840,7 @@ set_spec (const char *name, const char *spec)
|
||||
|
||||
old_spec = *(sl->ptr_spec);
|
||||
*(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1]))
|
||||
- ? concat (old_spec, spec + 1, NULL)
|
||||
+ ? concat (old_spec, spec + 1, (void *)0)
|
||||
: xstrdup (spec));
|
||||
|
||||
#ifdef DEBUG_SPECS
|
||||
@@ -2410,12 +2410,12 @@ for_each_path (const struct path_prefix *paths,
|
||||
just_multi_suffix = just_machine_suffix;
|
||||
if (do_multi && multilib_dir && strcmp (multilib_dir, ".") != 0)
|
||||
{
|
||||
- multi_dir = concat (multilib_dir, dir_separator_str, NULL);
|
||||
- multi_suffix = concat (multi_suffix, multi_dir, NULL);
|
||||
- just_multi_suffix = concat (just_multi_suffix, multi_dir, NULL);
|
||||
+ multi_dir = concat (multilib_dir, dir_separator_str, (void *)0);
|
||||
+ multi_suffix = concat (multi_suffix, multi_dir, (void *)0);
|
||||
+ just_multi_suffix = concat (just_multi_suffix, multi_dir, (void *)0);
|
||||
}
|
||||
if (do_multi && multilib_os_dir && strcmp (multilib_os_dir, ".") != 0)
|
||||
- multi_os_dir = concat (multilib_os_dir, dir_separator_str, NULL);
|
||||
+ multi_os_dir = concat (multilib_os_dir, dir_separator_str, (void *)0);
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -2761,8 +2761,8 @@ add_sysrooted_prefix (struct path_prefix *pprefix, con
|
||||
if (target_system_root)
|
||||
{
|
||||
if (target_sysroot_suffix)
|
||||
- prefix = concat (target_sysroot_suffix, prefix, NULL);
|
||||
- prefix = concat (target_system_root, prefix, NULL);
|
||||
+ prefix = concat (target_sysroot_suffix, prefix, (void *)0);
|
||||
+ prefix = concat (target_system_root, prefix, (void *)0);
|
||||
|
||||
/* We have to override this because GCC's notion of sysroot
|
||||
moves along with GCC. */
|
||||
@@ -3344,7 +3344,7 @@ process_command (int argc, const char **argv)
|
||||
break;
|
||||
new_argv0 = xmemdup (progname, baselen,
|
||||
baselen + concat_length (new_version, new_machine,
|
||||
- "-gcc-", NULL) + 1);
|
||||
+ "-gcc-", (void *)0) + 1);
|
||||
strcpy (new_argv0 + baselen, new_machine);
|
||||
strcat (new_argv0, "-gcc-");
|
||||
strcat (new_argv0, new_version);
|
||||
@@ -3371,7 +3371,7 @@ process_command (int argc, const char **argv)
|
||||
standard_bindir_prefix,
|
||||
standard_libexec_prefix);
|
||||
if (gcc_exec_prefix)
|
||||
- putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
|
||||
+ putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, (void *)0));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3379,7 +3379,7 @@ process_command (int argc, const char **argv)
|
||||
GCC_EXEC_PREFIX is typically a directory name with a trailing
|
||||
/ (which is ignored by make_relative_prefix), so append a
|
||||
program name. */
|
||||
- char *tmp_prefix = concat (gcc_exec_prefix, "gcc", NULL);
|
||||
+ char *tmp_prefix = concat (gcc_exec_prefix, "gcc", (void *)0);
|
||||
gcc_libexec_prefix = make_relative_prefix (tmp_prefix,
|
||||
standard_exec_prefix,
|
||||
standard_libexec_prefix);
|
||||
@@ -3426,7 +3426,7 @@ process_command (int argc, const char **argv)
|
||||
{
|
||||
strncpy (nstore, startp, endp - startp);
|
||||
if (endp == startp)
|
||||
- strcpy (nstore, concat (".", dir_separator_str, NULL));
|
||||
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
|
||||
else if (!IS_DIR_SEPARATOR (endp[-1]))
|
||||
{
|
||||
nstore[endp - startp] = DIR_SEPARATOR;
|
||||
@@ -3460,7 +3460,7 @@ process_command (int argc, const char **argv)
|
||||
{
|
||||
strncpy (nstore, startp, endp - startp);
|
||||
if (endp == startp)
|
||||
- strcpy (nstore, concat (".", dir_separator_str, NULL));
|
||||
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
|
||||
else if (!IS_DIR_SEPARATOR (endp[-1]))
|
||||
{
|
||||
nstore[endp - startp] = DIR_SEPARATOR;
|
||||
@@ -3493,7 +3493,7 @@ process_command (int argc, const char **argv)
|
||||
{
|
||||
strncpy (nstore, startp, endp - startp);
|
||||
if (endp == startp)
|
||||
- strcpy (nstore, concat (".", dir_separator_str, NULL));
|
||||
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
|
||||
else if (!IS_DIR_SEPARATOR (endp[-1]))
|
||||
{
|
||||
nstore[endp - startp] = DIR_SEPARATOR;
|
||||
@@ -3961,7 +3961,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR
|
||||
PREFIX_PRIORITY_LAST, 1, 0);
|
||||
|
||||
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
|
||||
- dir_separator_str, NULL);
|
||||
+ dir_separator_str, (void *)0);
|
||||
|
||||
/* If tooldir is relative, base it on exec_prefixes. A relative
|
||||
tooldir lets us move the installed tree as a unit.
|
||||
@@ -3976,28 +3976,28 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR
|
||||
{
|
||||
char *gcc_exec_tooldir_prefix
|
||||
= concat (gcc_exec_prefix, spec_machine, dir_separator_str,
|
||||
- spec_version, dir_separator_str, tooldir_prefix, NULL);
|
||||
+ spec_version, dir_separator_str, tooldir_prefix, (void *)0);
|
||||
|
||||
add_prefix (&exec_prefixes,
|
||||
concat (gcc_exec_tooldir_prefix, "bin",
|
||||
- dir_separator_str, NULL),
|
||||
+ dir_separator_str, (void *)0),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 0);
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_tooldir_prefix, "lib",
|
||||
- dir_separator_str, NULL),
|
||||
+ dir_separator_str, (void *)0),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
tooldir_prefix = concat (standard_exec_prefix, spec_machine,
|
||||
dir_separator_str, spec_version,
|
||||
- dir_separator_str, tooldir_prefix, NULL);
|
||||
+ dir_separator_str, tooldir_prefix, (void *)0);
|
||||
}
|
||||
|
||||
add_prefix (&exec_prefixes,
|
||||
- concat (tooldir_prefix, "bin", dir_separator_str, NULL),
|
||||
+ concat (tooldir_prefix, "bin", dir_separator_str, (void *)0),
|
||||
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 0);
|
||||
add_prefix (&startfile_prefixes,
|
||||
- concat (tooldir_prefix, "lib", dir_separator_str, NULL),
|
||||
+ concat (tooldir_prefix, "lib", dir_separator_str, (void *)0),
|
||||
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
|
||||
|
||||
#if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
|
||||
@@ -4121,7 +4121,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR
|
||||
{ /* POSIX allows separation of -l and the lib arg;
|
||||
canonicalize by concatenating -l with its arg */
|
||||
infiles[n_infiles].language = "*";
|
||||
- infiles[n_infiles++].name = concat ("-l", argv[++i], NULL);
|
||||
+ infiles[n_infiles++].name = concat ("-l", argv[++i], (void *)0);
|
||||
}
|
||||
else if (strncmp (argv[i], "-l", 2) == 0)
|
||||
{
|
||||
@@ -6202,8 +6202,8 @@ main (int argc, char **argv)
|
||||
/* Read specs from a file if there is one. */
|
||||
|
||||
machine_suffix = concat (spec_machine, dir_separator_str,
|
||||
- spec_version, dir_separator_str, NULL);
|
||||
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
|
||||
+ spec_version, dir_separator_str, (void *)0);
|
||||
+ just_machine_suffix = concat (spec_machine, dir_separator_str, (void *)0);
|
||||
|
||||
specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
|
||||
/* Read the specs file unless it is a default one. */
|
||||
@@ -6317,12 +6317,12 @@ main (int argc, char **argv)
|
||||
if (gcc_exec_prefix)
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_prefix, machine_suffix,
|
||||
- standard_startfile_prefix, NULL),
|
||||
+ standard_startfile_prefix, (void *)0),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (standard_exec_prefix,
|
||||
machine_suffix,
|
||||
- standard_startfile_prefix, NULL),
|
||||
+ standard_startfile_prefix, (void *)0),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
@@ -6348,7 +6348,7 @@ main (int argc, char **argv)
|
||||
/* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */
|
||||
if (gcc_exec_prefix)
|
||||
gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str,
|
||||
- spec_version, dir_separator_str, NULL);
|
||||
+ spec_version, dir_separator_str, (void *)0);
|
||||
|
||||
/* Now we have the specs.
|
||||
Set the `valid' bits for switches that match anything in any spec. */
|
21
lang/gfortran/patches/patch-gcc_gensupport_c
Normal file
21
lang/gfortran/patches/patch-gcc_gensupport_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-gcc_gensupport_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/gensupport.c.orig Wed Mar 15 11:14:51 2006
|
||||
+++ gcc/gensupport.c Mon Jun 14 19:23:04 2010
|
||||
@@ -220,7 +220,7 @@ process_include (rtx desc, int lineno)
|
||||
{
|
||||
static const char sep[2] = { DIR_SEPARATOR, '\0' };
|
||||
|
||||
- pathname = concat (stackp->fname, sep, filename, NULL);
|
||||
+ pathname = concat (stackp->fname, sep, filename, (void *)0);
|
||||
input_file = fopen (pathname, "r");
|
||||
if (input_file != NULL)
|
||||
goto success;
|
||||
@@ -229,7 +229,7 @@ process_include (rtx desc, int lineno)
|
||||
}
|
||||
|
||||
if (base_dir)
|
||||
- pathname = concat (base_dir, filename, NULL);
|
||||
+ pathname = concat (base_dir, filename, (void *)0);
|
||||
else
|
||||
pathname = xstrdup (filename);
|
||||
input_file = fopen (pathname, "r");
|
12
lang/gfortran/patches/patch-gcc_objc_objc-act_c
Normal file
12
lang/gfortran/patches/patch-gcc_objc_objc-act_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_objc_objc-act_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/objc/objc-act.c.orig Tue Jun 6 12:22:54 2006
|
||||
+++ gcc/objc/objc-act.c Sun Jul 23 11:24:02 2006
|
||||
@@ -494,7 +494,7 @@ objc_init (void)
|
||||
/* If gen_declaration desired, open the output file. */
|
||||
if (flag_gen_declaration)
|
||||
{
|
||||
- register char * const dumpname = concat (dump_base_name, ".decl", NULL);
|
||||
+ register char * const dumpname = concat (dump_base_name, ".decl", (void *)0);
|
||||
gen_declaration_file = fopen (dumpname, "w");
|
||||
if (gen_declaration_file == 0)
|
||||
fatal_error ("can't open %s: %m", dumpname);
|
12
lang/gfortran/patches/patch-gcc_omp-low_c
Normal file
12
lang/gfortran/patches/patch-gcc_omp-low_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_omp-low_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/omp-low.c.orig Mon Jul 2 21:27:28 2007
|
||||
+++ gcc/omp-low.c Mon Jun 14 19:23:04 2010
|
||||
@@ -3934,7 +3934,7 @@ lower_omp_critical (tree *stmt_p, omp_context *ctx)
|
||||
decl = create_tmp_var_raw (ptr_type_node, NULL);
|
||||
|
||||
new_str = ACONCAT ((".gomp_critical_user_",
|
||||
- IDENTIFIER_POINTER (name), NULL));
|
||||
+ IDENTIFIER_POINTER (name), (void *)0));
|
||||
DECL_NAME (decl) = get_identifier (new_str);
|
||||
TREE_PUBLIC (decl) = 1;
|
||||
TREE_STATIC (decl) = 1;
|
23
lang/gfortran/patches/patch-gcc_passes_c
Normal file
23
lang/gfortran/patches/patch-gcc_passes_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-gcc_passes_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/passes.c.orig Tue Jan 30 14:34:10 2007
|
||||
+++ gcc/passes.c Sun Mar 18 23:58:45 2007
|
||||
@@ -317,7 +317,7 @@ register_one_dump_file (struct tree_opt_pass *pass, bo
|
||||
sprintf (num, "%d", ((int) pass->static_pass_number < 0
|
||||
? 1 : pass->static_pass_number));
|
||||
|
||||
- dot_name = concat (".", pass->name, num, NULL);
|
||||
+ dot_name = concat (".", pass->name, num, (void *)0);
|
||||
if (ipa)
|
||||
prefix = "ipa-", flags = TDF_IPA;
|
||||
else if (properties & PROP_trees)
|
||||
@@ -325,8 +325,8 @@ register_one_dump_file (struct tree_opt_pass *pass, bo
|
||||
else
|
||||
prefix = "rtl-", flags = TDF_RTL;
|
||||
|
||||
- flag_name = concat (prefix, pass->name, num, NULL);
|
||||
- glob_name = concat (prefix, pass->name, NULL);
|
||||
+ flag_name = concat (prefix, pass->name, num, (void *)0);
|
||||
+ glob_name = concat (prefix, pass->name, (void *)0);
|
||||
pass->static_pass_number = dump_register (dot_name, flag_name, glob_name,
|
||||
flags, pass->letter);
|
||||
}
|
35
lang/gfortran/patches/patch-gcc_prefix_c
Normal file
35
lang/gfortran/patches/patch-gcc_prefix_c
Normal file
@ -0,0 +1,35 @@
|
||||
$OpenBSD: patch-gcc_prefix_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/prefix.c.orig Sat Dec 17 21:45:46 2005
|
||||
+++ gcc/prefix.c Mon Jun 14 19:23:04 2010
|
||||
@@ -99,7 +99,7 @@ get_key_value (char *key)
|
||||
#endif
|
||||
|
||||
if (prefix == 0)
|
||||
- prefix = getenv (temp = concat (key, "_ROOT", NULL));
|
||||
+ prefix = getenv (temp = concat (key, "_ROOT", (void *)0));
|
||||
|
||||
if (prefix == 0)
|
||||
prefix = std_prefix;
|
||||
@@ -223,7 +223,7 @@ translate_name (char *name)
|
||||
together. */
|
||||
|
||||
old_name = name;
|
||||
- name = concat (prefix, &name[keylen + 1], NULL);
|
||||
+ name = concat (prefix, &name[keylen + 1], (void *)0);
|
||||
free (old_name);
|
||||
}
|
||||
|
||||
@@ -261,11 +261,11 @@ update_path (const char *path, const char *key)
|
||||
|
||||
if (key[0] != '$')
|
||||
{
|
||||
- key = concat ("@", key, NULL);
|
||||
+ key = concat ("@", key, (void *)0);
|
||||
free_key = true;
|
||||
}
|
||||
|
||||
- result = concat (key, &path[len], NULL);
|
||||
+ result = concat (key, &path[len], (void *)0);
|
||||
if (free_key)
|
||||
free ((char *) key);
|
||||
result = translate_name (result);
|
12
lang/gfortran/patches/patch-gcc_read-rtl_c
Normal file
12
lang/gfortran/patches/patch-gcc_read-rtl_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_read-rtl_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/read-rtl.c.orig Sat Feb 18 23:06:53 2006
|
||||
+++ gcc/read-rtl.c Mon Jun 14 19:23:04 2010
|
||||
@@ -784,7 +784,7 @@ join_c_conditions (const char *cond1, const char *cond
|
||||
if (cond2 == 0 || cond2[0] == 0)
|
||||
return cond1;
|
||||
|
||||
- result = concat ("(", cond1, ") && (", cond2, ")", NULL);
|
||||
+ result = concat ("(", cond1, ") && (", cond2, ")", (void *)0);
|
||||
obstack_ptr_grow (&joined_conditions_obstack, result);
|
||||
obstack_ptr_grow (&joined_conditions_obstack, cond1);
|
||||
obstack_ptr_grow (&joined_conditions_obstack, cond2);
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-gcc_testsuite_gcc_dg_format_format_h,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/testsuite/gcc.dg/format/format.h.orig Sat Jul 22 23:16:52 2006
|
||||
+++ gcc/testsuite/gcc.dg/format/format.h Sat Jul 22 23:17:34 2006
|
||||
@@ -4,11 +4,13 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
+#ifndef _WINT_T_DEFINED_
|
||||
#ifndef _WINT_T
|
||||
#ifndef __WINT_TYPE__
|
||||
#define __WINT_TYPE__ unsigned int
|
||||
#endif
|
||||
typedef __WINT_TYPE__ wint_t;
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
/* Kludges to get types corresponding to size_t and ptrdiff_t. */
|
12
lang/gfortran/patches/patch-gcc_tree-complex_c
Normal file
12
lang/gfortran/patches/patch-gcc_tree-complex_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_tree-complex_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree-complex.c.orig Mon Jun 19 16:33:46 2006
|
||||
+++ gcc/tree-complex.c Mon Jun 14 19:23:04 2010
|
||||
@@ -397,7 +397,7 @@ create_one_component_var (tree type, tree orig, const
|
||||
const char *name = IDENTIFIER_POINTER (DECL_NAME (orig));
|
||||
tree inner_type;
|
||||
|
||||
- DECL_NAME (r) = get_identifier (ACONCAT ((name, suffix, NULL)));
|
||||
+ DECL_NAME (r) = get_identifier (ACONCAT ((name, suffix, (char *)0)));
|
||||
|
||||
inner_type = TREE_TYPE (TREE_TYPE (orig));
|
||||
SET_DECL_DEBUG_EXPR (r, build1 (code, type, orig));
|
12
lang/gfortran/patches/patch-gcc_tree-dump_c
Normal file
12
lang/gfortran/patches/patch-gcc_tree-dump_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_tree-dump_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree-dump.c.orig Thu Mar 16 20:47:19 2006
|
||||
+++ gcc/tree-dump.c Mon Jun 14 19:23:04 2010
|
||||
@@ -867,7 +867,7 @@ get_dump_file_name (enum tree_dump_index phase)
|
||||
dump_id[0] = '\0';
|
||||
}
|
||||
|
||||
- return concat (dump_base_name, dump_id, dfi->suffix, NULL);
|
||||
+ return concat (dump_base_name, dump_id, dfi->suffix, (void *)0);
|
||||
}
|
||||
|
||||
/* Begin a tree dump for PHASE. Stores any user supplied flag in
|
12
lang/gfortran/patches/patch-gcc_tree-mudflap_c
Normal file
12
lang/gfortran/patches/patch-gcc_tree-mudflap_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_tree-mudflap_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree-mudflap.c.orig Mon Oct 9 15:58:10 2006
|
||||
+++ gcc/tree-mudflap.c Mon Jun 14 19:23:04 2010
|
||||
@@ -236,7 +236,7 @@ mf_file_function_line_tree (location_t location)
|
||||
else
|
||||
op = name = cp = "";
|
||||
|
||||
- string = concat (file, colon, line, op, name, cp, NULL);
|
||||
+ string = concat (file, colon, line, op, name, cp, (void *)0);
|
||||
result = mf_build_string (string);
|
||||
free (string);
|
||||
|
12
lang/gfortran/patches/patch-gcc_tree-nested_c
Normal file
12
lang/gfortran/patches/patch-gcc_tree-nested_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_tree-nested_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree-nested.c.orig Thu Dec 21 14:18:52 2006
|
||||
+++ gcc/tree-nested.c Mon Jun 14 19:23:04 2010
|
||||
@@ -222,7 +222,7 @@ get_frame_type (struct nesting_info *info)
|
||||
|
||||
name = concat ("FRAME.",
|
||||
IDENTIFIER_POINTER (DECL_NAME (info->context)),
|
||||
- NULL);
|
||||
+ (void *)0);
|
||||
TYPE_NAME (type) = get_identifier (name);
|
||||
free (name);
|
||||
|
12
lang/gfortran/patches/patch-gcc_tree-vect-transform_c
Normal file
12
lang/gfortran/patches/patch-gcc_tree-vect-transform_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_tree-vect-transform_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree-vect-transform.c.orig Tue Sep 12 12:11:04 2006
|
||||
+++ gcc/tree-vect-transform.c Mon Jun 14 19:23:04 2010
|
||||
@@ -105,7 +105,7 @@ vect_get_new_vect_var (tree type, enum vect_var_kind v
|
||||
}
|
||||
|
||||
if (name)
|
||||
- new_vect_var = create_tmp_var (type, concat (prefix, name, NULL));
|
||||
+ new_vect_var = create_tmp_var (type, concat (prefix, name, (void *)0));
|
||||
else
|
||||
new_vect_var = create_tmp_var (type, prefix);
|
||||
|
17
lang/gfortran/patches/patch-gcc_tree_c
Normal file
17
lang/gfortran/patches/patch-gcc_tree_c
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-gcc_tree_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/tree.c.orig Tue May 1 21:23:47 2007
|
||||
+++ gcc/tree.c Mon Jun 14 19:23:04 2010
|
||||
@@ -6803,11 +6803,11 @@ build_common_builtin_nodes (void)
|
||||
*q = TOLOWER (*p);
|
||||
*q = '\0';
|
||||
|
||||
- built_in_names[mcode] = concat ("__mul", mode_name_buf, "3", NULL);
|
||||
+ built_in_names[mcode] = concat ("__mul", mode_name_buf, "3", (void *)0);
|
||||
local_define_builtin (built_in_names[mcode], ftype, mcode,
|
||||
built_in_names[mcode], ECF_CONST | ECF_NOTHROW);
|
||||
|
||||
- built_in_names[dcode] = concat ("__div", mode_name_buf, "3", NULL);
|
||||
+ built_in_names[dcode] = concat ("__div", mode_name_buf, "3", (void *)0);
|
||||
local_define_builtin (built_in_names[dcode], ftype, dcode,
|
||||
built_in_names[dcode], ECF_CONST | ECF_NOTHROW);
|
||||
}
|
14
lang/gfortran/patches/patch-gcc_unwind-dw2-fde-openbsd_c
Normal file
14
lang/gfortran/patches/patch-gcc_unwind-dw2-fde-openbsd_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-gcc_unwind-dw2-fde-openbsd_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/unwind-dw2-fde-openbsd.c.orig Sat Apr 11 14:24:23 2009
|
||||
+++ gcc/unwind-dw2-fde-openbsd.c Sat Apr 11 14:24:02 2009
|
||||
@@ -0,0 +1,10 @@
|
||||
+/* XXX This file provides a few defines such that we can compile the
|
||||
+ source from unwind-dw2-fde-glibc.c on OpenBSD. Hopefully we can
|
||||
+ integrate these defines in that file and rename it to something
|
||||
+ like unwind-de2-fde-phdr.c in the up-stream sources. */
|
||||
+
|
||||
+#define ElfW(type) Elf_##type
|
||||
+
|
||||
+#define __GLIBC__ 3 /* Fool unwind-dw2-fde-glibc.c. */
|
||||
+#include "unwind-dw2-fde-glibc.c"
|
||||
+
|
51
lang/gfortran/patches/patch-gcc_unwind-dw2_c
Normal file
51
lang/gfortran/patches/patch-gcc_unwind-dw2_c
Normal file
@ -0,0 +1,51 @@
|
||||
$OpenBSD: patch-gcc_unwind-dw2_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- gcc/unwind-dw2.c.orig Thu Jan 25 02:13:44 2007
|
||||
+++ gcc/unwind-dw2.c Wed Mar 18 11:03:10 2009
|
||||
@@ -150,6 +150,25 @@ _Unwind_IsExtendedContext (struct _Unwind_Context *con
|
||||
{
|
||||
return context->flags & EXTENDED_CONTEXT_BIT;
|
||||
}
|
||||
+
|
||||
+#ifdef __sparc64__
|
||||
+
|
||||
+/* Figure out StackGhost cookie. */
|
||||
+_Unwind_Word uw_get_wcookie(void);
|
||||
+
|
||||
+asm(".text\n"
|
||||
+ "uw_get_wcookie:\n"
|
||||
+ " add %o7, %g0, %g4\n"
|
||||
+ " save %sp, -176, %sp\n"
|
||||
+ " save %sp, -176, %sp\n"
|
||||
+ " flushw\n"
|
||||
+ " restore\n"
|
||||
+ " ldx [%sp + 2047 + 120], %g5\n"
|
||||
+ " xor %g4, %g5, %i0\n"
|
||||
+ " ret\n"
|
||||
+ " restore\n");
|
||||
+#endif
|
||||
+
|
||||
|
||||
/* Get the value of register INDEX as saved in CONTEXT. */
|
||||
|
||||
@@ -172,6 +191,13 @@ _Unwind_GetGR (struct _Unwind_Context *context, int in
|
||||
if (_Unwind_IsExtendedContext (context) && context->by_value[index])
|
||||
return (_Unwind_Word) (_Unwind_Internal_Ptr) ptr;
|
||||
|
||||
+#ifdef __sparc64__
|
||||
+ /* _Unwind_Word and _Unwind_Ptr are the same size on sparc64 */
|
||||
+ _Unwind_Word reg = * (_Unwind_Word *) ptr;
|
||||
+ if (index == 15 || index == 31)
|
||||
+ reg ^= uw_get_wcookie ();
|
||||
+ return reg;
|
||||
+#else
|
||||
/* This will segfault if the register hasn't been saved. */
|
||||
if (size == sizeof(_Unwind_Ptr))
|
||||
return * (_Unwind_Ptr *) ptr;
|
||||
@@ -180,6 +206,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int in
|
||||
gcc_assert (size == sizeof(_Unwind_Word));
|
||||
return * (_Unwind_Word *) ptr;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static inline void *
|
12
lang/gfortran/patches/patch-gcc_varasm_c
Normal file
12
lang/gfortran/patches/patch-gcc_varasm_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-gcc_varasm_c,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- gcc/varasm.c.orig Sat Mar 10 01:59:15 2007
|
||||
+++ gcc/varasm.c Mon Jun 14 19:23:04 2010
|
||||
@@ -397,7 +397,7 @@ initialize_cold_section_name (void)
|
||||
|
||||
stripped_name = targetm.strip_name_encoding (name);
|
||||
|
||||
- buffer = ACONCAT ((stripped_name, "_unlikely", NULL));
|
||||
+ buffer = ACONCAT ((stripped_name, "_unlikely", (char *)0));
|
||||
cfun->unlikely_text_section_name = ggc_strdup (buffer);
|
||||
}
|
||||
else
|
16
lang/gfortran/patches/patch-libcpp_Makefile_in
Normal file
16
lang/gfortran/patches/patch-libcpp_Makefile_in
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-libcpp_Makefile_in,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- libcpp/Makefile.in.orig Sun Jun 20 18:54:58 2010
|
||||
+++ libcpp/Makefile.in Sun Jun 20 18:55:19 2010
|
||||
@@ -88,10 +88,10 @@ libcpp.a: $(libcpp_a_OBJS)
|
||||
$(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
|
||||
$(RANLIB) libcpp.a
|
||||
|
||||
-makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a
|
||||
+makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ${LIBIBERTY}
|
||||
@rm -f makedepend$(EXEEXT)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o makedepend$(EXEEXT) \
|
||||
- $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a \
|
||||
+ $(makedepend_OBJS) libcpp.a ${LIBIBERTY} \
|
||||
$(LIBINTL) $(LIBICONV)
|
||||
|
||||
# Rules to rebuild the configuration
|
13
lang/gfortran/patches/patch-libgfortran_Makefile_in
Normal file
13
lang/gfortran/patches/patch-libgfortran_Makefile_in
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-libgfortran_Makefile_in,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- libgfortran/Makefile.in.orig Wed Mar 7 23:37:37 2007
|
||||
+++ libgfortran/Makefile.in Sun Mar 18 23:58:46 2007
|
||||
@@ -382,7 +382,8 @@ toolexeclibdir = @toolexeclibdir@
|
||||
ACLOCAL_AMFLAGS = -I ../config
|
||||
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
toolexeclib_LTLIBRARIES = libgfortran.la
|
||||
-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
|
||||
+include $(top_srcdir)/../libversions
|
||||
+libgfortran_la_LDFLAGS = $(LIBgfortran_LTVERSION) -lm $(extra_ldflags_libgfortran)
|
||||
myexeclib_LTLIBRARIES = libgfortranbegin.la
|
||||
myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
|
||||
libgfortranbegin_la_SOURCES = fmain.c
|
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-libiberty_testsuite_test-expandargv_c,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- libiberty/testsuite/test-expandargv.c.orig Sat Mar 7 17:08:28 2009
|
||||
+++ libiberty/testsuite/test-expandargv.c Sat Mar 7 17:09:01 2009
|
||||
@@ -173,6 +173,7 @@ writeout_test (int test, const char * test_data)
|
||||
fatal_error (__LINE__, "Failed to malloc parse.", errno);
|
||||
|
||||
memcpy (parse, test_data, sizeof (char) * len);
|
||||
+ parse[len] = '\0';
|
||||
/* Run all possible replaces */
|
||||
run_replaces (parse);
|
||||
|
14
lang/gfortran/patches/patch-libtool_m4
Normal file
14
lang/gfortran/patches/patch-libtool_m4
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-libtool_m4,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- libtool.m4.orig Tue May 10 03:31:58 2005
|
||||
+++ libtool.m4 Mon May 16 17:43:15 2005
|
||||
@@ -757,6 +757,10 @@ newsos6)
|
||||
lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
||||
;;
|
||||
|
||||
+openbsd*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ ;;
|
||||
+
|
||||
osf3* | osf4* | osf5*)
|
||||
# this will be overridden with pass_all, but let us keep it just in case
|
||||
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
30
lang/gfortran/patches/patch-ltcf-c_sh
Normal file
30
lang/gfortran/patches/patch-ltcf-c_sh
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-ltcf-c_sh,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- ltcf-c.sh.orig Fri Nov 18 23:53:08 2005
|
||||
+++ ltcf-c.sh Thu Oct 19 13:07:14 2006
|
||||
@@ -219,8 +219,8 @@ EOF
|
||||
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
+ archive_cmds='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
+ archive_expsym_cmds='$CC $pic_flag -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
@@ -514,10 +514,13 @@ else
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
- hardcode_libdir_flag_spec='-R$libdir'
|
||||
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
+ remove_lgcc=yes
|
||||
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
;;
|
||||
|
||||
os2*)
|
57
lang/gfortran/patches/patch-ltcf-cxx_sh
Normal file
57
lang/gfortran/patches/patch-ltcf-cxx_sh
Normal file
@ -0,0 +1,57 @@
|
||||
$OpenBSD: patch-ltcf-cxx_sh,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- ltcf-cxx.sh.orig Sat Jul 16 04:30:53 2005
|
||||
+++ ltcf-cxx.sh Sun Mar 18 23:58:46 2007
|
||||
@@ -78,8 +78,8 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval e
|
||||
# to be the same.
|
||||
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
- archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
- archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
+ archive_cmds='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
+ archive_expsym_cmds='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
|
||||
export_dynamic_flag_spec='${wl}--export-dynamic'
|
||||
@@ -453,6 +453,19 @@ case $host_os in
|
||||
netbsd* | knetbsd*-gnu)
|
||||
# NetBSD uses g++ - do we need to do anything?
|
||||
;;
|
||||
+ openbsd*)
|
||||
+ if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
|
||||
+ # MM: OpenBSD 2.7 uses G++, but not GNU ld
|
||||
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib'
|
||||
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
+ hardcode_direct=yes
|
||||
+ hardcode_shlibpath_var=no
|
||||
+ remove_lgcc=yes
|
||||
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
+ fi
|
||||
+ ;;
|
||||
osf3*)
|
||||
case $cc_basename in
|
||||
KCC)
|
||||
@@ -980,8 +993,9 @@ class Foo (private)
|
||||
};
|
||||
EOF
|
||||
|
||||
+echo $ac_compile_shared >&5
|
||||
|
||||
-if (eval $ac_compile) 2>&5; then
|
||||
+if (eval $ac_compile_shared) 2>&5; then
|
||||
# Parse the compiler output and extract the necessary
|
||||
# objects, libraries and library flags.
|
||||
|
||||
@@ -1011,9 +1025,9 @@ if (eval $ac_compile) 2>&5; then
|
||||
# provided the user. The postdeps already come after the
|
||||
# user supplied libs so there is no need to process them.
|
||||
if test -z "$compiler_lib_search_path"; then
|
||||
- compiler_lib_search_path="${prev}${p}"
|
||||
+ compiler_lib_search_path="${prev}${p}/fpic ${p}"
|
||||
else
|
||||
- compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
|
||||
+ compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}/fpic ${prev}${p}"
|
||||
fi
|
||||
;;
|
||||
# The "-l" case would never come before the object being
|
19
lang/gfortran/patches/patch-ltcf-gcj_sh
Normal file
19
lang/gfortran/patches/patch-ltcf-gcj_sh
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-ltcf-gcj_sh,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
--- ltcf-gcj.sh.orig Thu May 5 17:04:39 2005
|
||||
+++ ltcf-gcj.sh Mon May 16 17:43:16 2005
|
||||
@@ -489,10 +489,13 @@ else
|
||||
;;
|
||||
|
||||
openbsd*)
|
||||
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
- hardcode_libdir_flag_spec='-R$libdir'
|
||||
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
|
||||
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_shlibpath_var=no
|
||||
+ remove_lgcc=yes
|
||||
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
|
||||
;;
|
||||
|
||||
os2*)
|
38
lang/gfortran/patches/patch-ltconfig
Normal file
38
lang/gfortran/patches/patch-ltconfig
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-ltconfig,v 1.1.1.1 2010/10/10 17:39:07 steven Exp $
|
||||
--- ltconfig.orig Tue Jul 4 22:20:01 2006
|
||||
+++ ltconfig Thu Oct 19 16:58:12 2006
|
||||
@@ -184,6 +184,7 @@ PACKAGE=libtool
|
||||
VERSION=1.4a-GCC3.0
|
||||
TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
+ac_compile_shared='${CC-cc} -fPIC -DPIC -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
rm="rm -f"
|
||||
|
||||
@@ -626,7 +627,12 @@ old_postuninstall_cmds=
|
||||
|
||||
if test -n "$RANLIB"; then
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
||||
- old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB \$oldlib"
|
||||
+ case $host_os in
|
||||
+ openbsd*)
|
||||
+ old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB -t \$oldlib";;
|
||||
+ *)
|
||||
+ old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB \$oldlib";;
|
||||
+ esac
|
||||
fi
|
||||
|
||||
# Source the script associated with the $tagname tag configuration.
|
||||
@@ -1306,8 +1312,11 @@ openbsd*)
|
||||
need_version=no
|
||||
fi
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
|
||||
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
|
||||
+ #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=yes
|
||||
+ deplib_check_method=pass_all
|
||||
+ sys_lib_dlsearch_path_spec='/usr/lib /usr/local/lib /usr/X11R6/lib'
|
||||
;;
|
||||
|
||||
os2*)
|
12
lang/gfortran/pkg/DESCR-lib
Normal file
12
lang/gfortran/pkg/DESCR-lib
Normal file
@ -0,0 +1,12 @@
|
||||
The GNU Compiler Collection (GCC) includes front ends for C, C++,
|
||||
Objective-C, Fortran, Java, and Ada, as well as libraries for these
|
||||
languages (libstdc++, libgcj,...).
|
||||
|
||||
GCC development is a part of the GNU Project and uses an open
|
||||
development environment. Its supports many other platforms in order to
|
||||
foster a world-class optimizing compiler, to attract a larger team of
|
||||
developers, to ensure that GCC and the GNU system work on multiple
|
||||
architectures and diverse environments, and to more thoroughly test and
|
||||
extend the features of GCC.
|
||||
|
||||
This package contains the gfortran library.
|
12
lang/gfortran/pkg/DESCR-main
Normal file
12
lang/gfortran/pkg/DESCR-main
Normal file
@ -0,0 +1,12 @@
|
||||
The GNU Compiler Collection (GCC) includes front ends for C, C++,
|
||||
Objective-C, Fortran, Java, and Ada, as well as libraries for these
|
||||
languages (libstdc++, libgcj,...).
|
||||
|
||||
GCC development is a part of the GNU Project and uses an open
|
||||
development environment. Its supports many other platforms in order to
|
||||
foster a world-class optimizing compiler, to attract a larger team of
|
||||
developers, to ensure that GCC and the GNU system work on multiple
|
||||
architectures and diverse environments, and to more thoroughly test and
|
||||
extend the features of GCC.
|
||||
|
||||
This package contains the gfortran compiler.
|
8
lang/gfortran/pkg/PFRAG.PIC-lib
Normal file
8
lang/gfortran/pkg/PFRAG.PIC-lib
Normal file
@ -0,0 +1,8 @@
|
||||
@comment $OpenBSD: PFRAG.PIC-lib,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
lib/fpic/
|
||||
lib/fpic/libgfortran.a
|
||||
lib/fpic/libgfortran.la
|
||||
@lib lib/fpic/libgfortran.so.${LIBgfortran_VERSION}
|
||||
lib/gcc/${CONFIG}/${V}/fpic/
|
||||
lib/gcc/${CONFIG}/${V}/fpic/libgfortranbegin.a
|
||||
lib/gcc/${CONFIG}/${V}/fpic/libgfortranbegin.la
|
2
lang/gfortran/pkg/PFRAG.shared-lib
Normal file
2
lang/gfortran/pkg/PFRAG.shared-lib
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared-lib,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
@lib lib/libgfortran.so.${LIBgfortran_VERSION}
|
10
lang/gfortran/pkg/PLIST-lib
Normal file
10
lang/gfortran/pkg/PLIST-lib
Normal file
@ -0,0 +1,10 @@
|
||||
@comment $OpenBSD: PLIST-lib,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
lib/gcc/
|
||||
lib/gcc/${CONFIG}/
|
||||
lib/gcc/${CONFIG}/${V}/
|
||||
lib/gcc/${CONFIG}/${V}/libgfortranbegin.a
|
||||
lib/gcc/${CONFIG}/${V}/libgfortranbegin.la
|
||||
lib/libgfortran.a
|
||||
lib/libgfortran.la
|
||||
%%SHARED%%
|
||||
%%PIC%%
|
14
lang/gfortran/pkg/PLIST-main
Normal file
14
lang/gfortran/pkg/PLIST-main
Normal file
@ -0,0 +1,14 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2010/10/10 17:39:06 steven Exp $
|
||||
@bin bin/${CONFIG}-gfortran
|
||||
@comment bin/gccbug
|
||||
@bin bin/gfortran
|
||||
@info info/gfortran.info
|
||||
@comment lib/gcc/${CONFIG}/${V}/finclude/
|
||||
lib/gcc/${CONFIG}/${V}/libgcc.a
|
||||
libexec/gcc/
|
||||
libexec/gcc/${CONFIG}/
|
||||
libexec/gcc/${CONFIG}/${V}/
|
||||
libexec/gcc/${CONFIG}/${V}/cc1
|
||||
@comment @bin libexec/gcc/${CONFIG}/${V}/collect2
|
||||
@bin libexec/gcc/${CONFIG}/${V}/f951
|
||||
@man man/cat1/gfortran.0
|
Loading…
Reference in New Issue
Block a user