pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc6 Pull forward patch for host hooks for NetBSD...
details: https://anonhg.NetBSD.org/pkgsrc/rev/944457480520
branches: trunk
changeset: 315414:944457480520
user: abs <abs%pkgsrc.org@localhost>
date: Fri Nov 23 19:28:30 2018 +0000
description:
Pull forward patch for host hooks for NetBSD from gcc-5 - needed for working precompiled headers.
Also pull in missing config.hosts changes from gcc-6.5 in netbsd-current
Bump PKGREVISION
diffstat:
lang/gcc6/Makefile | 4 +-
lang/gcc6/distinfo | 5 +-
lang/gcc6/patches/patch-gcc_config.host | 26 +++
lang/gcc6/patches/patch-gcc_config_host-netbsd.c | 93 ++++++++++++
lang/gcc6/patches/patch-libgcc_config.host | 167 +++++++++++++++++++++++
5 files changed, 292 insertions(+), 3 deletions(-)
diffs (truncated from 343 to 300 lines):
diff -r 18471ef17d75 -r 944457480520 lang/gcc6/Makefile
--- a/lang/gcc6/Makefile Fri Nov 23 18:06:43 2018 +0000
+++ b/lang/gcc6/Makefile Fri Nov 23 19:28:30 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2018/11/05 18:59:44 maya Exp $
+# $NetBSD: Makefile,v 1.17 2018/11/23 19:28:30 abs Exp $
GCC_PKGNAME= gcc6
.include "version.mk"
@@ -8,7 +8,7 @@
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc6-libs needs to be bump to be at least 1 more than the
## PKGREVISION of this package!
-#PKGREVISION=
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC6_DIST_VERSION}/}
EXTRACT_SUFX= .tar.xz
diff -r 18471ef17d75 -r 944457480520 lang/gcc6/distinfo
--- a/lang/gcc6/distinfo Fri Nov 23 18:06:43 2018 +0000
+++ b/lang/gcc6/distinfo Fri Nov 23 19:28:30 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2018/11/05 18:59:44 maya Exp $
+$NetBSD: distinfo,v 1.13 2018/11/23 19:28:30 abs Exp $
SHA1 (gcc-6.5.0.tar.xz) = 368b3f5d294b1a8727b372ac0a77703d8b41968a
RMD160 (gcc-6.5.0.tar.xz) = 66782b17cff89f22e5e8869fa96bd9a8985f5067
@@ -10,7 +10,9 @@
Size (isl-0.14.tar.bz2) = 1399896 bytes
SHA1 (patch-gcc_Makefile.in) = 41d45e8988b59e6ffa7adb7833290d39fc1fd0e1
SHA1 (patch-gcc_config.gcc) = 84fedf863c853c40bf81884f5db3617200f0d31d
+SHA1 (patch-gcc_config.host) = 5dd1b72be5d520ebc679c79cbe92317eaf66028f
SHA1 (patch-gcc_config_arm_arm.h) = e69b7f89ba245847f58253675a16749890b9d1ae
+SHA1 (patch-gcc_config_host-netbsd.c) = 765295f07edb8a68f1910e3a9b4dd2a7dcd491a5
SHA1 (patch-gcc_config_netbsd-protos.h) = 6d28864b4ccc8c1a63fe28e43601b84b63a00633
SHA1 (patch-gcc_config_netbsd-stdint.h) = 025fc883101a187e84ed4c0772406720d645d550
SHA1 (patch-gcc_config_netbsd.c) = 3c09521e1803633a3643cf396a03f1f433ec869b
@@ -27,6 +29,7 @@
SHA1 (patch-libdecnumber_decNumber.c) = cec90e49c829bfc6ba1ec605d2fac7daaad62762
SHA1 (patch-libffi_configure) = bcfbfe8abddc378e2de4a39ad0669583b37e0292
SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 6321dde308579448c27c2b6e1e30633699dd145f
+SHA1 (patch-libgcc_config.host) = 7ef11f83071325ef29b710f40251fce2b62cc9f3
SHA1 (patch-libgcc_crtstuff.c) = d22dd1fb4a79aed2e7c2864f0bb00bcc338b3ab8
SHA1 (patch-libgcc_unwind-dw2-fde-dip.c) = 9c5e1823226521d11900b4d3b92c050d3941a1f6
SHA1 (patch-libgfortran_configure) = 869a60fd08edecf18a42732dcbf226bad1309394
diff -r 18471ef17d75 -r 944457480520 lang/gcc6/patches/patch-gcc_config.host
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc6/patches/patch-gcc_config.host Fri Nov 23 19:28:30 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-gcc_config.host,v 1.1 2018/11/23 19:28:30 abs Exp $
+
+Add aarch64*-*-netbsd* and generic *-*-netbsd* entries
+
+--- gcc/config.host.orig 2017-01-09 21:01:26.000000000 +0000
++++ gcc/config.host
+@@ -99,7 +99,7 @@ case ${host} in
+ esac
+
+ case ${host} in
+- aarch64*-*-freebsd* | aarch64*-*-linux*)
++ aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-netbsd*)
+ case ${target} in
+ aarch64*-*-*)
+ host_extra_gcc_objs="driver-aarch64.o"
+@@ -276,6 +276,10 @@ case ${host} in
+ out_host_hook_obj=host-openbsd.o
+ host_xmake_file="${host_xmake_file} x-openbsd"
+ ;;
++ *-*-netbsd*)
++ out_host_hook_obj=host-netbsd.o
++ host_xmake_file="${host_xmake_file} x-netbsd"
++ ;;
+ ia64-*-hpux*)
+ use_long_long_for_widest_fast_int=yes
+ out_host_hook_obj=host-hpux.o
diff -r 18471ef17d75 -r 944457480520 lang/gcc6/patches/patch-gcc_config_host-netbsd.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc6/patches/patch-gcc_config_host-netbsd.c Fri Nov 23 19:28:30 2018 +0000
@@ -0,0 +1,93 @@
+$NetBSD: patch-gcc_config_host-netbsd.c,v 1.1 2018/11/23 19:28:30 abs Exp $
+
+Add host hooks for NetBSD - needed for working precompiled headers.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58397
+
+--- /dev/null 2013-09-11 20:06:51.000000000 +0200
++++ gcc/config/host-netbsd.c 2013-09-11 20:29:31.000000000 +0200
+@@ -0,0 +1,85 @@
++/* NetBSD host-specific hook definitions.
++ Copyright (C) 2004-2013 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/>. */
++
++#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 netbsd_gt_pch_get_address
++#undef HOST_HOOKS_GT_PCH_USE_ADDRESS
++#define HOST_HOOKS_GT_PCH_USE_ADDRESS netbsd_gt_pch_use_address
++
++/* For various ports, try to guess a fixed spot in the vm space
++ that's probably free. */
++#if defined(__sparc64__)
++# define TRY_EMPTY_VM_SPACE 0x40000000000
++#elif defined(_LP64)
++# define TRY_EMPTY_VM_SPACE 0x400000000000
++#elif defined(__mips__) || defined(__vax__) || defined (__arm__)
++# define TRY_EMPTY_VM_SPACE 0x60000000
++#else
++# define TRY_EMPTY_VM_SPACE 0xb0000000
++#endif
++
++/* Determine a location where we might be able to reliably allocate
++ SIZE bytes. FD is the PCH file, though we should return with the
++ file unmapped. */
++
++static void *
++netbsd_gt_pch_get_address (size_t size, int fd)
++{
++ void *addr;
++
++ addr = mmap ((void *) TRY_EMPTY_VM_SPACE, size, PROT_READ | PROT_WRITE,
++ MAP_PRIVATE | MAP_FIXED, fd, 0);
++
++ /* If we failed the map, that means there's *no* free space. */
++ if (addr == (void *) MAP_FAILED)
++ return NULL;
++ /* Unmap the area before returning. */
++ munmap (addr, size);
++
++ return addr;
++}
++
++/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
++ mapping the data at BASE, -1 if we couldn't. */
++
++static int
++netbsd_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
++{
++ void *addr;
++
++ /* We're called with size == 0 if we're not planning to load a PCH
++ file at all. This allows the hook to free any static space that
++ we might have allocated at link time. */
++ if (size == 0)
++ return -1;
++
++ addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, offset);
++
++ return addr == base ? 1 : -1;
++}
++
++
++const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
diff -r 18471ef17d75 -r 944457480520 lang/gcc6/patches/patch-libgcc_config.host
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc6/patches/patch-libgcc_config.host Fri Nov 23 19:28:30 2018 +0000
@@ -0,0 +1,167 @@
+$NetBSD: patch-libgcc_config.host,v 1.1 2018/11/23 19:28:30 abs Exp $
+
+Sync with NetBSD-current as of 2018-11-23
+
+--- libgcc/config.host.orig 2017-11-21 09:41:34.000000000 +0000
++++ libgcc/config.host
+@@ -164,9 +164,15 @@ nds32*-*)
+ nios2*-*-*)
+ cpu_type=nios2
+ ;;
++or1k-*-* | or1knd-*-*)
++ cpu_type=or1k
++ ;;
+ powerpc*-*-*)
+ cpu_type=rs6000
+ ;;
++riscv*-*-*)
++ cpu_type=riscv
++ ;;
+ rs6000*-*-*)
+ ;;
+ sparc64*-*-*)
+@@ -242,7 +248,7 @@ case ${host} in
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ ;;
+ *-*-netbsd*)
+- tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
++ tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+ # NetBSD 1.7 and later are set up to use GCC's crtstuff for
+ # ELF configurations. We will clear extra_parts in the
+ # a.out configurations.
+@@ -338,6 +344,11 @@ aarch64*-*-freebsd*)
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+ ;;
++aarch64*-*-netbsd*)
++ extra_parts="$extra_parts crtfastmath.o"
++ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
++ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
++ ;;
+ aarch64*-*-linux*)
+ extra_parts="$extra_parts crtfastmath.o"
+ md_unwind_header=aarch64/linux-unwind.h
+@@ -389,7 +400,16 @@ arm*-*-freebsd*) # ARM Fr
+ tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+ ;;
+ arm*-*-netbsdelf*)
+- tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
++ tmake_file="$tmake_file arm/t-arm"
++ case ${host} in
++ arm*-*-netbsdelf-*eabi*)
++ tmake_file="${tmake_file} arm/t-netbsd-eabi"
++ unwind_header=config/arm/unwind-arm.h
++ ;;
++ *)
++ tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover"
++ ;;
++ esac
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
+@@ -573,6 +593,9 @@ hppa[12]*-*-hpux11*)
+ hppa*-*-openbsd*)
+ tmake_file="$tmake_file pa/t-openbsd"
+ ;;
++hppa*-*-netbsd*)
++ tmake_file="$tmake_file pa/t-netbsd"
++ ;;
+ i[34567]86-*-darwin*)
+ tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+ tm_file="$tm_file i386/darwin-lib.h"
+@@ -775,6 +798,10 @@ ia64*-*-linux*)
+ fi
+ md_unwind_header=ia64/linux-unwind.h
+ ;;
++ia64*-*-netbsd*)
++ extra_parts="${extra_parts} crtfastmath.o"
++ tmake_file="${tmake_file} ia64/t-ia64 ia64/t-ia64-elf t-crtfm ia64/t-softfp t-softfp ia64/t-eh-ia64"
++ ;;
+ ia64*-*-hpux*)
+ tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux"
+ ;;
+@@ -819,7 +846,10 @@ m32rle-*-linux*)
+ m68k-*-elf* | fido-*-elf)
+ tmake_file="$tmake_file m68k/t-floatlib"
+ ;;
+-m68k*-*-netbsdelf*)
++m5407-*-netbsdelf*)
++ ;;
++m68k*-*-netbsdelf* | m68010-*-netbsdelf*)
++ tmake_file="$tmake_file m68k/t-floatlib"
+ ;;
+ m68k*-*-openbsd*)
+ ;;
+@@ -858,6 +888,17 @@ microblaze*-*-rtems*)
+ extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
+ ;;
+ mips*-*-netbsd*) # NetBSD/mips, either endian.
++ if test "${libgcc_cv_mips_hard_float}" = no; then
++ # Eat soft float stuff added above since the netbsd libc provides it.
++ xtmake_file=
++ for t in ${tmake_file}; do
++ case $t in
++ *softfp*) ;;
++ *) xtmake_file="${xtmake_file} $t";;
++ esac
++ done
++ tmake_file="${xtmake_file}"
++ fi
+ ;;
+ mips*-*-linux*) # Linux MIPS, either endian.
+ extra_parts="$extra_parts crtfastmath.o"
+@@ -951,6 +992,17 @@ msp430*-*-elf)
+ tmake_file="$tm_file t-crtstuff t-fdpbit msp430/t-msp430"
+ extra_parts="$extra_parts libmul_none.a libmul_16.a libmul_32.a libmul_f5.a"
+ ;;
++or1k*-*-linux* | or1k*-*-uclinux*)
++ tmake_file="$tmake_file or1k/t-or1k or1k/t-linux or1k/t-crtstuff t-softfp-sfdf t-softfp"
++ md_unwind_header=or1k/linux-unwind.h
++ ;;
++or1k*-*-netbsd*)
++ tmake_file="$tmake_file or1k/t-or1k"
++ ;;
++or1k*-*-*)
Home |
Main Index |
Thread Index |
Old Index