openbsd-ports/lang/gcc/4.8/patches/patch-gcc_config_gcc
pascal 174fb904d7 Import gcc 4.8.
For a full Changelog, see: http://gcc.gnu.org/gcc-4.8/changes.html

Tested by me on amd64, i386 and powerpc and by brad@ on sparc64.

Adds support for -java on powerpc.  -faggressive-loop-optimizations is
disabled by default in the port, and the default debugging format changed
to DWARF2 (instead of 4).

tweaks and ok tobiasu@
2013-04-08 08:20:19 +00:00

83 lines
2.9 KiB
Plaintext

$OpenBSD: patch-gcc_config_gcc,v 1.1.1.1 2013/04/08 08:20:25 pascal Exp $
--- gcc/config.gcc.orig Wed Mar 13 10:47:41 2013
+++ gcc/config.gcc Fri Mar 22 22:19:19 2013
@@ -711,6 +711,14 @@ case ${target} in
default_use_cxa_atexit=yes
;;
esac
+ case ${target} in
+ *-*-openbsd[0-3].*|*-*-openbsd4.[012])
+ # keep default of no cxa_atexit support for these older releases
+ ;;
+ *)
+ default_use_cxa_atexit=yes
+ ;;
+ esac
;;
*-*-openbsd*)
tmake_file="t-openbsd"
@@ -849,7 +857,7 @@ alpha*-*-netbsd*)
alpha/elf.opt"
;;
alpha*-*-openbsd*)
- tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
+ tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT PIE_DEFAULT=2"
tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
extra_options="${extra_options} openbsd.opt alpha/elf.opt"
# default x-alpha is only appropriate for dec-osf.
@@ -1069,6 +1077,7 @@ hppa*-*-linux*)
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_PA_11"
+ tm_defines="${tm_defines} PIE_DEFAULT=1"
tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
tmake_file="${tmake_file} pa/t-openbsd"
@@ -1251,6 +1260,7 @@ i[34567]86-*-openbsd*)
gnu_ld=yes
;;
x86_64-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=1"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
extra_options="${extra_options} openbsd.opt"
@@ -1972,11 +1982,12 @@ picochip-*)
use_gcc_stdint=wrap
tmake_file="picochip/t-picochip t-pnt16-warn"
;;
-# port not yet contributed
-#powerpc-*-openbsd*)
-# tmake_file="${tmake_file} rs6000/t-fprules"
-# extra_headers=
-# ;;
+powerpc-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=2"
+ 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 openbsd.opt"
+ ;;
powerpc-*-darwin*)
extra_options="${extra_options} rs6000/darwin.opt"
case ${target} in
@@ -2519,6 +2530,7 @@ sparc64-*-netbsd*)
tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
;;
sparc64-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=2"
tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
extra_options="${extra_options} openbsd.opt"
@@ -2705,6 +2717,12 @@ case ${target} in
else
arch=i386
fi
+ cpu=generic
+ arch_without_sse2=yes
+ arch_without_64bit=yes
+ ;;
+ i386-*-openbsd*)
+ arch=i486
cpu=generic
arch_without_sse2=yes
arch_without_64bit=yes