openbsd-ports/lang/gcc/4.6/patches/patch-gcc_config_pa_t-openbsd
pascal b368cf7d60 Add hppa support. Still a bit rough around the edges: Some optimisations
(-foptimize-sibling-calls and -freorder-blocks) cause segfaults during build,
so don't include them in -O2 on hppa.  Also, -go is not supported.

requested by and ok brad@ and tested on one of his machines
2013-01-16 19:28:48 +00:00

42 lines
1.5 KiB
Plaintext

$OpenBSD: patch-gcc_config_pa_t-openbsd,v 1.1 2013/01/16 19:28:48 pascal Exp $
--- gcc/config/pa/t-openbsd.orig Wed Apr 4 10:33:01 2012
+++ gcc/config/pa/t-openbsd Wed Apr 4 12:50:16 2012
@@ -0,0 +1,37 @@
+# Copyright (C) 1999, 2001, 2002, 2008 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 3, 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 COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+#Plug millicode routines into libgcc.a We want these on both native and
+#cross compiles. We use the "64-bit" routines because the "32-bit" code
+#is broken for certain corner cases.
+
+LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI _dyncall
+LIB1ASMSRC = pa/milli64.S
+
+# Compile libgcc2.a as PIC.
+TARGET_LIBGCC2_CFLAGS = -fPIC -DELF=1
+
+LIB2FUNCS_EXTRA=fptr.c
+LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/pa/linux-atomic.c
+
+fptr.c: $(srcdir)/config/pa/fptr.c
+ rm -f fptr.c
+ cp $(srcdir)/config/pa/fptr.c .
+
+# Compile crtbeginS.o and crtendS.o as PIC.
+CRTSTUFF_T_CFLAGS_S = -fPIC