diff --git a/lang/gcc/4.2/Makefile b/lang/gcc/4.2/Makefile index 91fa744260b..ea20bab9786 100644 --- a/lang/gcc/4.2/Makefile +++ b/lang/gcc/4.2/Makefile @@ -1,20 +1,20 @@ -# $OpenBSD: Makefile,v 1.4 2006/10/20 11:03:38 espie Exp $ +# $OpenBSD: Makefile,v 1.5 2006/10/20 13:43:18 espie Exp $ -ONLY_FOR_ARCHS= alpha i386 m68k sparc sparc64 powerpc vax +ONLY_FOR_ARCHS= alpha i386 m68k sparc sparc64 powerpc vax amd64 #BROKEN='adjust for types changes' V=4.2.0 -DATE=20060715 +DATE=20061014 FULL_VERSION=4.2-${DATE} FULL_PKGVERSION=4.2.${DATE} -PKGNAME= gcc-${FULL_PKGVERSION}p0 -PKGNAME-c++ = g++-${FULL_PKGVERSION}p0 -PKGNAME-estdc= libstdc++-${FULL_PKGVERSION}p0 -PKGNAME-g77= g77-${FULL_PKGVERSION}p0 -PKGNAME-java= gcj-${FULL_PKGVERSION}p0 -PKGNAME-objc= gobjc-${FULL_PKGVERSION}p0 -PKGNAME-ada= gnat-${FULL_PKGVERSION}p0 +PKGNAME= gcc-${FULL_PKGVERSION} +PKGNAME-c++ = g++-${FULL_PKGVERSION} +PKGNAME-estdc= libstdc++-${FULL_PKGVERSION} +PKGNAME-g77= g77-${FULL_PKGVERSION} +PKGNAME-java= gcj-${FULL_PKGVERSION} +PKGNAME-objc= gobjc-${FULL_PKGVERSION} +PKGNAME-ada= gnat-${FULL_PKGVERSION} SHARED_LIBS= estdc++ 7.0 \ gfortran 2.0 \ -org-w3c-dom 1.0 \ @@ -184,7 +184,7 @@ ALL_TARGET=bootstrap MAKE_FLAGS=libstdc___la_LDFLAGS='-version-info 31:0:0 -lm' -.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "sparc" +.if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "amd64" PKG_ARGS+=-DPIC=1 .else PKG_ARGS+=-DPIC=0 diff --git a/lang/gcc/4.2/distinfo b/lang/gcc/4.2/distinfo index 92b50438e40..f2d6645fae4 100644 --- a/lang/gcc/4.2/distinfo +++ b/lang/gcc/4.2/distinfo @@ -1,8 +1,8 @@ MD5 (gcc/adastrap-i386-3.3.6-4.tgz) = 216977774d85b97542cfaa8b0e79b909 -MD5 (gcc/gcc-4.2-20060715.tar.bz2) = 06dca73d3dd192d333c4f03d81d81a99 +MD5 (gcc/gcc-4.2-20061014.tar.bz2) = 1436184012555202c14f58f7c781b2e6 RMD160 (gcc/adastrap-i386-3.3.6-4.tgz) = ac93ba044f2b9d7f68ab09b4746c4cba28521d7b -RMD160 (gcc/gcc-4.2-20060715.tar.bz2) = 5160b3f61598cc5fae57982b3869eaf218a027f3 +RMD160 (gcc/gcc-4.2-20061014.tar.bz2) = 660f6d2a7ca5caf98c7dff231cc85c9ca421c862 SHA1 (gcc/adastrap-i386-3.3.6-4.tgz) = 0a79e84f47a5a6a57197e76c31eae933622d395c -SHA1 (gcc/gcc-4.2-20060715.tar.bz2) = a7478a82088af390aa586dc87eca371658970583 +SHA1 (gcc/gcc-4.2-20061014.tar.bz2) = 4f11b09ff264db6f1a523741f44dad7fe4ae6592 SIZE (gcc/adastrap-i386-3.3.6-4.tgz) = 16776383 -SIZE (gcc/gcc-4.2-20060715.tar.bz2) = 39949045 +SIZE (gcc/gcc-4.2-20061014.tar.bz2) = 40625634 diff --git a/lang/gcc/4.2/patches/patch-gcc_c-common_c b/lang/gcc/4.2/patches/patch-gcc_c-common_c index 57bc1e8ff00..ea74fb9b703 100644 --- a/lang/gcc/4.2/patches/patch-gcc_c-common_c +++ b/lang/gcc/4.2/patches/patch-gcc_c-common_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-gcc_c-common_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/c-common.c.orig Thu Jul 6 04:09:02 2006 -+++ gcc/c-common.c Sun Jul 23 14:24:16 2006 +$OpenBSD: patch-gcc_c-common_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/c-common.c.orig Sun Aug 27 01:51:14 2006 ++++ gcc/c-common.c Wed Oct 18 00:37:31 2006 @@ -543,7 +543,9 @@ static tree handle_cleanup_attribute (tr static tree handle_warn_unused_result_attribute (tree *, tree, tree, int, bool *); @@ -20,7 +20,7 @@ $OpenBSD: patch-gcc_c-common_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ { "visibility", 1, 1, false, false, false, handle_visibility_attribute }, { "tls_model", 1, 1, true, false, false, -@@ -5590,6 +5594,15 @@ handle_warn_unused_result_attribute (tre +@@ -5595,6 +5599,15 @@ handle_warn_unused_result_attribute (tre } return NULL_TREE; diff --git a/lang/gcc/4.2/patches/patch-gcc_config_exec-stack_h b/lang/gcc/4.2/patches/patch-gcc_config_exec-stack_h new file mode 100644 index 00000000000..295eb2d5138 --- /dev/null +++ b/lang/gcc/4.2/patches/patch-gcc_config_exec-stack_h @@ -0,0 +1,44 @@ +$OpenBSD: patch-gcc_config_exec-stack_h,v 1.1 2006/10/20 13:43:18 espie 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"); \ ++} diff --git a/lang/gcc/4.2/patches/patch-gcc_config_gcc b/lang/gcc/4.2/patches/patch-gcc_config_gcc new file mode 100644 index 00000000000..cabfafedec8 --- /dev/null +++ b/lang/gcc/4.2/patches/patch-gcc_config_gcc @@ -0,0 +1,64 @@ +--- gcc/config.gcc.orig Tue Oct 10 09:50:29 2006 ++++ gcc/config.gcc Fri Oct 20 13:47:16 2006 +@@ -612,7 +612,7 @@ alpha*-*-netbsd*) + ;; + 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_file="alpha/alpha.h openbsd.h openbsd-libpthread.h alpha/openbsd.h" + # default x-alpha is only appropriate for dec-osf. + target_cpu_default="MASK_GAS" + tmake_file="alpha/t-alpha alpha/t-ieee" +@@ -1064,10 +1064,15 @@ i[34567]86-*-openbsd2.*|i[34567]86-*open + ;; + 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 +@@ -1458,7 +1463,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 +@@ -1548,7 +1553,7 @@ mips*-*-linux*) # Linux MIPS, either + 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";; +@@ -2128,7 +2133,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 +@@ -2373,7 +2378,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 diff --git a/lang/gcc/4.2/patches/patch-gcc_config_host b/lang/gcc/4.2/patches/patch-gcc_config_host index b9f637f74d3..9f64a068c55 100644 --- a/lang/gcc/4.2/patches/patch-gcc_config_host +++ b/lang/gcc/4.2/patches/patch-gcc_config_host @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_config_host,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/config.host.orig Thu May 18 15:19:27 2006 -+++ gcc/config.host Sun Jul 23 11:48:55 2006 -@@ -195,6 +195,10 @@ case ${host} in +$OpenBSD: patch-gcc_config_host,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/config.host.orig Sat Sep 23 01:50:51 2006 ++++ gcc/config.host Wed Oct 18 00:37:31 2006 +@@ -192,6 +192,10 @@ case ${host} in out_host_hook_obj=host-solaris.o host_xmake_file="${host_xmake_file} x-solaris" ;; diff --git a/lang/gcc/4.2/patches/patch-gcc_config_i386_driver-i386_c b/lang/gcc/4.2/patches/patch-gcc_config_i386_driver-i386_c index 08b198e8bd9..52137f1e39b 100644 --- a/lang/gcc/4.2/patches/patch-gcc_config_i386_driver-i386_c +++ b/lang/gcc/4.2/patches/patch-gcc_config_i386_driver-i386_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_config_i386_driver-i386_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/config/i386/driver-i386.c.orig Sun Jul 23 14:55:23 2006 -+++ gcc/config/i386/driver-i386.c Sun Jul 23 14:55:40 2006 -@@ -161,14 +161,14 @@ const char *host_detect_local_cpu (int a +$OpenBSD: patch-gcc_config_i386_driver-i386_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/config/i386/driver-i386.c.orig Sat Sep 23 12:33:27 2006 ++++ gcc/config/i386/driver-i386.c Wed Oct 18 00:37:31 2006 +@@ -158,13 +158,13 @@ const char *host_detect_local_cpu (int a } done: @@ -16,5 +16,4 @@ $OpenBSD: patch-gcc_config_i386_driver-i386_c,v 1.1.1.1 2006/07/31 09:50:53 espi - return concat ("-m", argv[0], "=i386", NULL); + return concat ("-m", argv[0], "=i386", (void *)0); } - #endif - #endif + #endif /* GCC_VERSION */ diff --git a/lang/gcc/4.2/patches/patch-gcc_config_i386_openbsd64_h b/lang/gcc/4.2/patches/patch-gcc_config_i386_openbsd64_h new file mode 100644 index 00000000000..1144ce5ebe3 --- /dev/null +++ b/lang/gcc/4.2/patches/patch-gcc_config_i386_openbsd64_h @@ -0,0 +1,125 @@ +$OpenBSD: patch-gcc_config_i386_openbsd64_h,v 1.1 2006/10/20 13:43:18 espie 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 */ ++#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) diff --git a/lang/gcc/4.2/patches/patch-gcc_config_openbsd-libpthread_h b/lang/gcc/4.2/patches/patch-gcc_config_openbsd-libpthread_h new file mode 100644 index 00000000000..ef17f91ba1d --- /dev/null +++ b/lang/gcc/4.2/patches/patch-gcc_config_openbsd-libpthread_h @@ -0,0 +1,27 @@ +$OpenBSD: patch-gcc_config_openbsd-libpthread_h,v 1.1 2006/10/20 13:43:18 espie 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}" ++ diff --git a/lang/gcc/4.2/patches/patch-gcc_config_openbsd_h b/lang/gcc/4.2/patches/patch-gcc_config_openbsd_h new file mode 100644 index 00000000000..90879317165 --- /dev/null +++ b/lang/gcc/4.2/patches/patch-gcc_config_openbsd_h @@ -0,0 +1,59 @@ +$OpenBSD: patch-gcc_config_openbsd_h,v 1.1 2006/10/20 13:43:18 espie Exp $ +--- gcc/config/openbsd.h.orig Sat Jun 25 03:22:41 2005 ++++ gcc/config/openbsd.h Wed Oct 18 15:39:01 2006 +@@ -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,15 +127,8 @@ 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 + diff --git a/lang/gcc/4.2/patches/patch-gcc_cp_call_c b/lang/gcc/4.2/patches/patch-gcc_cp_call_c index 56cf818b714..b4be0ffae44 100644 --- a/lang/gcc/4.2/patches/patch-gcc_cp_call_c +++ b/lang/gcc/4.2/patches/patch-gcc_cp_call_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_cp_call_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/cp/call.c.orig Fri Jun 30 22:48:42 2006 -+++ gcc/cp/call.c Sun Jul 23 11:24:02 2006 -@@ -5257,7 +5257,7 @@ name_as_c_string (tree name, tree type, +$OpenBSD: patch-gcc_cp_call_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/cp/call.c.orig Wed Aug 30 06:33:10 2006 ++++ gcc/cp/call.c Wed Oct 18 00:37:31 2006 +@@ -5265,7 +5265,7 @@ name_as_c_string (tree name, tree type, || name == base_dtor_identifier || name == deleting_dtor_identifier) { @@ -10,7 +10,7 @@ $OpenBSD: patch-gcc_cp_call_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ /* Remember that we need to free the memory allocated. */ *free_p = true; } -@@ -5267,7 +5267,7 @@ name_as_c_string (tree name, tree type, +@@ -5275,7 +5275,7 @@ name_as_c_string (tree name, tree type, pretty_name = concat ("operator ", type_as_string (TREE_TYPE (name), TFF_PLAIN_IDENTIFIER), diff --git a/lang/gcc/4.2/patches/patch-gcc_cp_decl2_c b/lang/gcc/4.2/patches/patch-gcc_cp_decl2_c index 2d2e8e8cf46..43fce704353 100644 --- a/lang/gcc/4.2/patches/patch-gcc_cp_decl2_c +++ b/lang/gcc/4.2/patches/patch-gcc_cp_decl2_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_cp_decl2_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/cp/decl2.c.orig Sat Jul 15 16:44:48 2006 -+++ gcc/cp/decl2.c Sun Jul 23 11:24:02 2006 -@@ -2983,7 +2983,7 @@ build_java_method_aliases (void) +$OpenBSD: patch-gcc_cp_decl2_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/cp/decl2.c.orig Tue Oct 3 20:04:10 2006 ++++ gcc/cp/decl2.c Wed Oct 18 00:37:31 2006 +@@ -3007,7 +3007,7 @@ build_java_method_aliases (void) oid = DECL_ASSEMBLER_NAME (fndecl); oname = IDENTIFIER_POINTER (oid); gcc_assert (oname[0] == '_' && oname[1] == 'Z'); diff --git a/lang/gcc/4.2/patches/patch-gcc_cp_parser_c b/lang/gcc/4.2/patches/patch-gcc_cp_parser_c index 93304dab439..b59f241fea2 100644 --- a/lang/gcc/4.2/patches/patch-gcc_cp_parser_c +++ b/lang/gcc/4.2/patches/patch-gcc_cp_parser_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_cp_parser_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/cp/parser.c.orig Sat Jul 15 17:00:28 2006 -+++ gcc/cp/parser.c Sun Jul 23 11:24:02 2006 -@@ -16284,7 +16284,7 @@ cp_parser_require (cp_parser* parser, +$OpenBSD: patch-gcc_cp_parser_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/cp/parser.c.orig Fri Oct 13 10:38:43 2006 ++++ gcc/cp/parser.c Wed Oct 18 00:37:31 2006 +@@ -16322,7 +16322,7 @@ cp_parser_require (cp_parser* parser, /* Output the MESSAGE -- unless we're parsing tentatively. */ if (!cp_parser_simulate_error (parser)) { diff --git a/lang/gcc/4.2/patches/patch-gcc_dbxout_c b/lang/gcc/4.2/patches/patch-gcc_dbxout_c index 28c613b66fc..e27e807f219 100644 --- a/lang/gcc/4.2/patches/patch-gcc_dbxout_c +++ b/lang/gcc/4.2/patches/patch-gcc_dbxout_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_dbxout_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/dbxout.c.orig Fri Jul 14 17:54:23 2006 -+++ gcc/dbxout.c Sun Jul 23 11:24:02 2006 -@@ -1009,7 +1009,7 @@ dbxout_init (const char *input_file_name +$OpenBSD: patch-gcc_dbxout_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/dbxout.c.orig Wed Jul 26 19:38:37 2006 ++++ gcc/dbxout.c Wed Oct 18 00:37:31 2006 +@@ -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])) diff --git a/lang/gcc/4.2/patches/patch-gcc_omp-low_c b/lang/gcc/4.2/patches/patch-gcc_omp-low_c index 17d4643cbd9..56cfc946c22 100644 --- a/lang/gcc/4.2/patches/patch-gcc_omp-low_c +++ b/lang/gcc/4.2/patches/patch-gcc_omp-low_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_omp-low_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/omp-low.c.orig Sun Jul 23 14:31:14 2006 -+++ gcc/omp-low.c Sun Jul 23 14:31:35 2006 -@@ -3863,7 +3863,7 @@ lower_omp_critical (tree *stmt_p, omp_co +$OpenBSD: patch-gcc_omp-low_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/omp-low.c.orig Tue Aug 15 16:57:52 2006 ++++ gcc/omp-low.c Wed Oct 18 00:37:31 2006 +@@ -3867,7 +3867,7 @@ lower_omp_critical (tree *stmt_p, omp_co decl = create_tmp_var_raw (ptr_type_node, NULL); new_str = ACONCAT ((".gomp_critical_user_", diff --git a/lang/gcc/4.2/patches/patch-gcc_tree-nested_c b/lang/gcc/4.2/patches/patch-gcc_tree-nested_c index fad273eec8f..1281d7f4d67 100644 --- a/lang/gcc/4.2/patches/patch-gcc_tree-nested_c +++ b/lang/gcc/4.2/patches/patch-gcc_tree-nested_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_tree-nested_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/tree-nested.c.orig Tue Jun 13 10:55:40 2006 -+++ gcc/tree-nested.c Sun Jul 23 11:24:02 2006 -@@ -218,7 +218,7 @@ get_frame_type (struct nesting_info *inf +$OpenBSD: patch-gcc_tree-nested_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/tree-nested.c.orig Tue Sep 26 20:10:58 2006 ++++ gcc/tree-nested.c Wed Oct 18 00:37:31 2006 +@@ -222,7 +222,7 @@ get_frame_type (struct nesting_info *inf name = concat ("FRAME.", IDENTIFIER_POINTER (DECL_NAME (info->context)), diff --git a/lang/gcc/4.2/patches/patch-gcc_tree_c b/lang/gcc/4.2/patches/patch-gcc_tree_c index c346cdf3e25..749efbce583 100644 --- a/lang/gcc/4.2/patches/patch-gcc_tree_c +++ b/lang/gcc/4.2/patches/patch-gcc_tree_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-gcc_tree_c,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- gcc/tree.c.orig Thu Jul 13 00:43:27 2006 -+++ gcc/tree.c Sun Jul 23 11:24:02 2006 -@@ -6712,11 +6712,11 @@ build_common_builtin_nodes (void) +$OpenBSD: patch-gcc_tree_c,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- gcc/tree.c.orig Fri Oct 13 17:59:03 2006 ++++ gcc/tree.c Wed Oct 18 00:37:32 2006 +@@ -6796,11 +6796,11 @@ build_common_builtin_nodes (void) *q = TOLOWER (*p); *q = '\0'; diff --git a/lang/gcc/4.2/patches/patch-libgfortran_Makefile_in b/lang/gcc/4.2/patches/patch-libgfortran_Makefile_in index 7ef9028d682..e1b49ce95ee 100644 --- a/lang/gcc/4.2/patches/patch-libgfortran_Makefile_in +++ b/lang/gcc/4.2/patches/patch-libgfortran_Makefile_in @@ -1,13 +1,13 @@ -$OpenBSD: patch-libgfortran_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- libgfortran/Makefile.in.orig Sun Jul 2 23:17:05 2006 -+++ libgfortran/Makefile.in Sat Jul 22 18:04:32 2006 -@@ -362,7 +362,8 @@ toolexeclibdir = @toolexeclibdir@ +$OpenBSD: patch-libgfortran_Makefile_in,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- libgfortran/Makefile.in.orig Sat Oct 14 19:45:54 2006 ++++ libgfortran/Makefile.in Wed Oct 18 00:39:32 2006 +@@ -369,7 +369,8 @@ toolexeclibdir = @toolexeclibdir@ ACLOCAL_AMFLAGS = -I ../config gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) - toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la + 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 - libgfortranbegin_la_LDFLAGS = -static - AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ diff --git a/lang/gcc/4.2/patches/patch-libobjc_Makefile_in b/lang/gcc/4.2/patches/patch-libobjc_Makefile_in index d92d4663c49..d429270ca90 100644 --- a/lang/gcc/4.2/patches/patch-libobjc_Makefile_in +++ b/lang/gcc/4.2/patches/patch-libobjc_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-libobjc_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- libobjc/Makefile.in.orig Wed May 24 03:22:17 2006 -+++ libobjc/Makefile.in Sun Jul 23 11:24:03 2006 -@@ -273,15 +273,17 @@ doc: info dvi html +$OpenBSD: patch-libobjc_Makefile_in,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- libobjc/Makefile.in.orig Wed Oct 11 01:48:09 2006 ++++ libobjc/Makefile.in Wed Oct 18 00:37:32 2006 +@@ -273,15 +273,17 @@ doc: info dvi pdf html .PHONY: install-html install-html: diff --git a/lang/gcc/4.2/patches/patch-libssp_Makefile_in b/lang/gcc/4.2/patches/patch-libssp_Makefile_in index 215a2161c23..c6661edd7e4 100644 --- a/lang/gcc/4.2/patches/patch-libssp_Makefile_in +++ b/lang/gcc/4.2/patches/patch-libssp_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-libssp_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- libssp/Makefile.in.orig Sun Mar 5 12:49:20 2006 -+++ libssp/Makefile.in Sun Mar 5 12:50:03 2006 -@@ -230,9 +230,10 @@ libssp_la_SOURCES = \ +$OpenBSD: patch-libssp_Makefile_in,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- libssp/Makefile.in.orig Fri Sep 29 23:18:51 2006 ++++ libssp/Makefile.in Wed Oct 18 00:37:32 2006 +@@ -231,9 +231,10 @@ libssp_la_SOURCES = \ strcat-chk.c strcpy-chk.c strncat-chk.c strncpy-chk.c \ vsnprintf-chk.c vsprintf-chk.c diff --git a/lang/gcc/4.2/patches/patch-libstdc++-v3_libsupc++_Makefile_in b/lang/gcc/4.2/patches/patch-libstdc++-v3_libsupc++_Makefile_in index 2f6a0abda92..1fbbc8c99b3 100644 --- a/lang/gcc/4.2/patches/patch-libstdc++-v3_libsupc++_Makefile_in +++ b/lang/gcc/4.2/patches/patch-libstdc++-v3_libsupc++_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-libstdc++-v3_libsupc++_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- libstdc++-v3/libsupc++/Makefile.in.orig Tue Feb 7 23:23:58 2006 -+++ libstdc++-v3/libsupc++/Makefile.in Sun Jul 23 11:24:03 2006 -@@ -304,7 +304,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) +$OpenBSD: patch-libstdc++-v3_libsupc++_Makefile_in,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- libstdc++-v3/libsupc++/Makefile.in.orig Fri Jul 21 23:11:46 2006 ++++ libstdc++-v3/libsupc++/Makefile.in Wed Oct 18 00:37:32 2006 +@@ -307,7 +307,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) # Need this library to both be part of libstdc++.a, and installed # separately too. # 1) separate libsupc++.la @@ -10,7 +10,7 @@ $OpenBSD: patch-libstdc++-v3_libsupc++_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a noinst_LTLIBRARIES = libsupc++convenience.la headers = \ -@@ -485,7 +485,7 @@ clean-toolexeclibLTLIBRARIES: +@@ -488,7 +488,7 @@ clean-toolexeclibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done diff --git a/lang/gcc/4.2/patches/patch-libstdc++-v3_src_Makefile_in b/lang/gcc/4.2/patches/patch-libstdc++-v3_src_Makefile_in index 1bdec90e8de..c2e68144037 100644 --- a/lang/gcc/4.2/patches/patch-libstdc++-v3_src_Makefile_in +++ b/lang/gcc/4.2/patches/patch-libstdc++-v3_src_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-libstdc++-v3_src_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- libstdc++-v3/src/Makefile.in.orig Tue Jun 13 01:24:22 2006 -+++ libstdc++-v3/src/Makefile.in Sun Jul 23 11:28:32 2006 -@@ -296,7 +296,7 @@ WARN_CXXFLAGS = \ +$OpenBSD: patch-libstdc++-v3_src_Makefile_in,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- libstdc++-v3/src/Makefile.in.orig Fri Jul 28 06:57:34 2006 ++++ libstdc++-v3/src/Makefile.in Wed Oct 18 00:37:32 2006 +@@ -299,7 +299,7 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) # Cross compiler support. @@ -10,7 +10,7 @@ $OpenBSD: patch-libstdc++-v3_src_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist @ENABLE_SYMVERS_FALSE@version_arg = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver -@@ -383,9 +383,11 @@ libstdc___la_LIBADD = \ +@@ -385,9 +385,11 @@ libstdc___la_LIBADD = \ $(top_builddir)/libmath/libmath.la \ $(top_builddir)/libsupc++/libsupc++convenience.la @@ -23,7 +23,7 @@ $OpenBSD: patch-libstdc++-v3_src_Makefile_in,v 1.1.1.1 2006/07/31 09:50:53 espie # Use special rules for the deprecated source files so that they find -@@ -497,7 +499,7 @@ clean-toolexeclibLTLIBRARIES: +@@ -499,7 +501,7 @@ clean-toolexeclibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done diff --git a/lang/gcc/4.2/patches/patch-ltcf-c_sh b/lang/gcc/4.2/patches/patch-ltcf-c_sh index 5927ffd3daf..1316bdbfddd 100644 --- a/lang/gcc/4.2/patches/patch-ltcf-c_sh +++ b/lang/gcc/4.2/patches/patch-ltcf-c_sh @@ -1,6 +1,17 @@ -$OpenBSD: patch-ltcf-c_sh,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- ltcf-c.sh.orig Thu May 5 17:04:38 2005 -+++ ltcf-c.sh Mon May 16 17:43:16 2005 +$OpenBSD: patch-ltcf-c_sh,v 1.2 2006/10/20 13:43:18 espie 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 ;; diff --git a/lang/gcc/4.2/patches/patch-ltcf-cxx_sh b/lang/gcc/4.2/patches/patch-ltcf-cxx_sh index fe0ea995660..a966a451b24 100644 --- a/lang/gcc/4.2/patches/patch-ltcf-cxx_sh +++ b/lang/gcc/4.2/patches/patch-ltcf-cxx_sh @@ -1,6 +1,17 @@ -$OpenBSD: patch-ltcf-cxx_sh,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- ltcf-cxx.sh.orig Thu May 5 17:04:39 2005 -+++ ltcf-cxx.sh Mon May 16 17:43:16 2005 +$OpenBSD: patch-ltcf-cxx_sh,v 1.2 2006/10/20 13:43:18 espie Exp $ +--- ltcf-cxx.sh.orig Sat Jul 16 04:30:53 2005 ++++ ltcf-cxx.sh Fri Oct 20 11:33:10 2006 +@@ -78,8 +78,8 @@ if { ac_try='${CC-c++} -E conftest.$ac_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? @@ -21,3 +32,26 @@ $OpenBSD: patch-ltcf-cxx_sh,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ osf3*) case $cc_basename in KCC) +@@ -980,8 +993,9 @@ 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 diff --git a/lang/gcc/4.2/patches/patch-ltconfig b/lang/gcc/4.2/patches/patch-ltconfig index 005cfb75800..270832113ca 100644 --- a/lang/gcc/4.2/patches/patch-ltconfig +++ b/lang/gcc/4.2/patches/patch-ltconfig @@ -1,7 +1,15 @@ -$OpenBSD: patch-ltconfig,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ ---- ltconfig.orig Tue Jul 4 22:30:34 2006 -+++ ltconfig Sat Jul 22 19:45:19 2006 -@@ -626,7 +626,12 @@ old_postuninstall_cmds= +$OpenBSD: patch-ltconfig,v 1.2 2006/10/20 13:43:18 espie 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" @@ -15,7 +23,7 @@ $OpenBSD: patch-ltconfig,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ fi # Source the script associated with the $tagname tag configuration. -@@ -1306,8 +1311,11 @@ openbsd*) +@@ -1306,8 +1312,11 @@ openbsd*) need_version=no fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' diff --git a/lang/gcc/4.2/pkg/PFRAG.PIC b/lang/gcc/4.2/pkg/PFRAG.PIC new file mode 100644 index 00000000000..1ce3e947485 --- /dev/null +++ b/lang/gcc/4.2/pkg/PFRAG.PIC @@ -0,0 +1,9 @@ +@comment $OpenBSD: PFRAG.PIC,v 1.1 2006/10/20 13:43:18 espie Exp $ +lib/gcc/${CONFIG}/${V}/fpic/ +lib/gcc/${CONFIG}/${V}/fpic/libgcc.a +lib/gcc/${CONFIG}/${V}/fpic/libgcov.a +lib/fpic/libiberty.a +lib/fpic/libssp.a +lib/fpic/libssp.la +lib/fpic/libssp_nonshared.a +lib/fpic/libssp_nonshared.la diff --git a/lang/gcc/4.2/pkg/PFRAG.PIC-c++ b/lang/gcc/4.2/pkg/PFRAG.PIC-c++ new file mode 100644 index 00000000000..85e8c5f364e --- /dev/null +++ b/lang/gcc/4.2/pkg/PFRAG.PIC-c++ @@ -0,0 +1,27 @@ +@comment $OpenBSD: PFRAG.PIC-c++,v 1.1 2006/10/20 13:43:18 espie Exp $ +include/c++/${V}/${CONFIG}/fpic/ +include/c++/${V}/${CONFIG}/fpic/bits/ +include/c++/${V}/${CONFIG}/fpic/bits/atomic_word.h +include/c++/${V}/${CONFIG}/fpic/bits/basic_file.h +include/c++/${V}/${CONFIG}/fpic/bits/c++allocator.h +include/c++/${V}/${CONFIG}/fpic/bits/c++config.h +include/c++/${V}/${CONFIG}/fpic/bits/c++io.h +include/c++/${V}/${CONFIG}/fpic/bits/c++locale.h +include/c++/${V}/${CONFIG}/fpic/bits/cpu_defines.h +include/c++/${V}/${CONFIG}/fpic/bits/ctype_base.h +include/c++/${V}/${CONFIG}/fpic/bits/ctype_inline.h +include/c++/${V}/${CONFIG}/fpic/bits/ctype_noninline.h +include/c++/${V}/${CONFIG}/fpic/bits/cxxabi_tweaks.h +include/c++/${V}/${CONFIG}/fpic/bits/gthr-default.h +include/c++/${V}/${CONFIG}/fpic/bits/gthr-posix.h +include/c++/${V}/${CONFIG}/fpic/bits/gthr-single.h +include/c++/${V}/${CONFIG}/fpic/bits/gthr-tpf.h +include/c++/${V}/${CONFIG}/fpic/bits/gthr.h +include/c++/${V}/${CONFIG}/fpic/bits/messages_members.h +include/c++/${V}/${CONFIG}/fpic/bits/os_defines.h +include/c++/${V}/${CONFIG}/fpic/bits/time_members.h +lib/fpic/ +lib/fpic/libestdc++.a +lib/fpic/libestdc++.la +lib/fpic/libesupc++.a +lib/fpic/libesupc++.la diff --git a/lang/gcc/4.2/pkg/PLIST b/lang/gcc/4.2/pkg/PLIST index 95bce1b7bc4..5a6606da458 100644 --- a/lang/gcc/4.2/pkg/PLIST +++ b/lang/gcc/4.2/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.2 2006/08/01 08:58:11 espie Exp $ +@comment $OpenBSD: PLIST,v 1.3 2006/10/20 13:43:18 espie Exp $ %%SHARED%% bin/ecpp bin/egcc @@ -14,7 +14,6 @@ bin/${CONFIG}-gcc-${V} lib/gcc/ lib/gcc/${CONFIG}/ lib/gcc/${CONFIG}/${V}/ -lib/gcc/${CONFIG}/${V}/finclude/ lib/gcc/${CONFIG}/${V}/include/ lib/gcc/${CONFIG}/${V}/include/README lib/gcc/${CONFIG}/${V}/include/com_err.h @@ -60,6 +59,7 @@ libexec/gcc/${CONFIG}/${V}/install-tools/fixinc.sh libexec/gcc/${CONFIG}/${V}/install-tools/fixincl libexec/gcc/${CONFIG}/${V}/install-tools/mkheaders %%I386%% +%%PIC%% @man man/man1/ecpp.1 @man man/man1/egcc.1 @man man/man1/egcov.1 diff --git a/lang/gcc/4.2/pkg/PLIST-c++ b/lang/gcc/4.2/pkg/PLIST-c++ index f8112b124f2..a07a25596ca 100644 --- a/lang/gcc/4.2/pkg/PLIST-c++ +++ b/lang/gcc/4.2/pkg/PLIST-c++ @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-c++,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ +@comment $OpenBSD: PLIST-c++,v 1.2 2006/10/20 13:43:18 espie Exp $ bin/ec++ bin/eg++ bin/${CONFIG}-ec++ @@ -45,7 +45,6 @@ include/c++/${V}/backward/tree.h include/c++/${V}/backward/vector.h include/c++/${V}/bits/ include/c++/${V}/bits/allocator.h -include/c++/${V}/bits/atomicity.h include/c++/${V}/bits/basic_ios.h include/c++/${V}/bits/basic_ios.tcc include/c++/${V}/bits/basic_string.h @@ -55,7 +54,6 @@ include/c++/${V}/bits/char_traits.h include/c++/${V}/bits/cmath.tcc include/c++/${V}/bits/codecvt.h include/c++/${V}/bits/concept_check.h -include/c++/${V}/bits/concurrence.h include/c++/${V}/bits/cpp_type_traits.h include/c++/${V}/bits/deque.tcc include/c++/${V}/bits/fstream.tcc @@ -162,8 +160,10 @@ include/c++/${V}/exception_defines.h include/c++/${V}/ext/ include/c++/${V}/ext/algorithm include/c++/${V}/ext/array_allocator.h +include/c++/${V}/ext/atomicity.h include/c++/${V}/ext/bitmap_allocator.h include/c++/${V}/ext/codecvt_specializations.h +include/c++/${V}/ext/concurrence.h include/c++/${V}/ext/debug_allocator.h include/c++/${V}/ext/functional include/c++/${V}/ext/hash_fun.h @@ -453,18 +453,6 @@ include/c++/${V}/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp include/c++/${V}/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp include/c++/${V}/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp include/c++/${V}/ext/pb_ds/detail/type_utils.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/ -include/c++/${V}/ext/pb_ds/detail/typelist.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_append.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_apply.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_assoc_container_find.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_at_index.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_contains.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_filter.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_flatten.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_transform.hpp -include/c++/${V}/ext/pb_ds/detail/typelist/typelist_typelist_append.hpp -include/c++/${V}/ext/pb_ds/detail/typelist_assoc_container.hpp include/c++/${V}/ext/pb_ds/detail/types_traits.hpp include/c++/${V}/ext/pb_ds/detail/unordered_iterator/ include/c++/${V}/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp @@ -488,6 +476,8 @@ include/c++/${V}/ext/slist include/c++/${V}/ext/sso_string_base.h include/c++/${V}/ext/stdio_filebuf.h include/c++/${V}/ext/stdio_sync_filebuf.h +include/c++/${V}/ext/throw_allocator.h +include/c++/${V}/ext/type_traits.h include/c++/${V}/ext/typelist.h include/c++/${V}/ext/vstring.h include/c++/${V}/ext/vstring.tcc @@ -565,6 +555,7 @@ include/c++/${V}/tr1/float.h include/c++/${V}/tr1/functional include/c++/${V}/tr1/functional_iterate.h include/c++/${V}/tr1/hashtable +include/c++/${V}/tr1/hashtable_policy.h include/c++/${V}/tr1/inttypes.h include/c++/${V}/tr1/limits.h include/c++/${V}/tr1/math.h @@ -599,4 +590,5 @@ lib/libestdc++.la lib/libesupc++.a lib/libesupc++.la libexec/gcc/${CONFIG}/${V}/cc1plus +%%PIC%% @man man/man1/eg++.1 diff --git a/lang/gcc/4.2/pkg/PLIST-f95 b/lang/gcc/4.2/pkg/PLIST-f95 index 64ce596f583..09b2a6d1c4e 100644 --- a/lang/gcc/4.2/pkg/PLIST-f95 +++ b/lang/gcc/4.2/pkg/PLIST-f95 @@ -1,10 +1,11 @@ -@comment $OpenBSD: PLIST-f95,v 1.1.1.1 2006/07/31 09:50:53 espie Exp $ +@comment $OpenBSD: PLIST-f95,v 1.2 2006/10/20 13:43:18 espie Exp $ bin/egfortran bin/${CONFIG}-egfortran @info info/gfortran.info lib/libgfortran.a lib/libgfortran.la -lib/libgfortranbegin.a -lib/libgfortranbegin.la +lib/gcc/${CONFIG}/${V}/finclude/ +lib/gcc/${CONFIG}/${V}/libgfortranbegin.a +lib/gcc/${CONFIG}/${V}/libgfortranbegin.la libexec/gcc/${CONFIG}/${V}/f951 @man man/man1/egfortran.1