pkgsrc/lang/gcc2/patches/patch-aa
wiz 39b07f0c64 Re-Import gcc2-2.95.3nb7 as lang/gcc2 (previously lang/gcc).
This directory contains the GNU Compiler Collection (GCC) version 2.95.
It includes all of the support for compiling C, C++, Objective C, Fortran,
Java, and Chill.

The GNU Compiler Collection is free software.  See the file COPYING for copying
permission.

See the file gcc.texi (together with other files that it includes) for
installation and porting information.  The file INSTALL contains a
copy of the installation information, as plain ASCII.

See the Bugs chapter of the GCC Manual for how to report bugs
usefully.  An online readable version of the manual is in the files
gcc.info*.
2015-04-25 10:32:07 +00:00

43 lines
1.5 KiB
Plaintext

$NetBSD: patch-aa,v 1.1 2015/04/25 10:32:07 wiz Exp $
from revision 1.5 of patch-ae:
Hand edit the alpha/netbsd.h patch. -current gcc relies on a new linker script
which only differs in setting the entry point. Let this use the default
linker script for alpha but force the entry point so this will work on older
NetBSD installs for alpha. For NetBSD-1.6 and newer, we don't need to change
the link spec.
--- ../gcc-2.95.3/gcc/config/alpha/netbsd.h.orig Tue Nov 25 17:51:14 2003
+++ ../gcc-2.95.3/gcc/config/alpha/netbsd.h
@@ -58,6 +58,8 @@ Boston, MA 02111-1307, USA. */
common to all ELF targets, except for the name of the start function. */
#undef LINK_SPEC
+#include <sys/param.h>
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 106000000
#define LINK_SPEC \
"-m elf64alpha_nbsd \
%{O*:-O3} %{!O*:-O1} \
@@ -70,6 +72,21 @@ Boston, MA 02111-1307, USA. */
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
%{static:-static}}"
+#else
+#define LINK_SPEC \
+ "-m elf64alpha \
+ -e __start \
+ %{O*:-O3} %{!O*:-O1} \
+ %{assert*} %{R*} \
+ %{shared:-shared} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
+#endif
/* Names to predefine in the preprocessor for this target machine.
XXX NetBSD, by convention, shouldn't do __alpha, but lots of applications