pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang
Module Name: pkgsrc
Committed By: rhialto
Date: Wed Apr 8 13:29:55 UTC 2020
Modified Files:
pkgsrc/lang/gcc7: Makefile
pkgsrc/lang/gcc7-libs: Makefile
Added Files:
pkgsrc/lang/gcc7/patches: patch-gcc_config.host
patch-gcc_config_host-netbsd.c
Log Message:
lang/gcc7: add missing patches for precompiled headers.
Bump version, also on gcc7-libs.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/lang/gcc7/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/gcc7-libs/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc7/patches/patch-gcc_config.host \
pkgsrc/lang/gcc7/patches/patch-gcc_config_host-netbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/gcc7/Makefile
diff -u pkgsrc/lang/gcc7/Makefile:1.31 pkgsrc/lang/gcc7/Makefile:1.32
--- pkgsrc/lang/gcc7/Makefile:1.31 Wed Apr 1 14:08:14 2020
+++ pkgsrc/lang/gcc7/Makefile Wed Apr 8 13:29:54 2020
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.31 2020/04/01 14:08:14 wiz Exp $
+# $NetBSD: Makefile,v 1.32 2020/04/08 13:29:54 rhialto Exp $
GCC_PKGNAME= gcc7
.include "version.mk"
DISTNAME= gcc-${GCC7_DIST_VERSION}
PKGNAME= ${GCC_PKGNAME}-${GCC7_DIST_VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc7-libs needs to be bump to be at least 1 more than the
## PKGREVISION of this package!
Index: pkgsrc/lang/gcc7-libs/Makefile
diff -u pkgsrc/lang/gcc7-libs/Makefile:1.9 pkgsrc/lang/gcc7-libs/Makefile:1.10
--- pkgsrc/lang/gcc7-libs/Makefile:1.9 Fri Mar 13 15:00:36 2020
+++ pkgsrc/lang/gcc7-libs/Makefile Wed Apr 8 13:29:54 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2020/03/13 15:00:36 bacon Exp $
+# $NetBSD: Makefile,v 1.10 2020/04/08 13:29:54 rhialto Exp $
GCC_PKGNAME= gcc7
.include "../../lang/${GCC_PKGNAME}/version.mk"
@@ -9,7 +9,7 @@ PKGNAME= ${GCC_PKGNAME}-libs-${GCC7_DIST
## The PKGREVISION of this package needs to be at least 1 more than the
## PKGREVISION of the lang/gcc7 package so that with the dependence pattern
## '{gcc7,gcc7-libs}>=7.5.*' pkg_add will choose gcc7-libs over gcc7.
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= # empty
Added files:
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config.host
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config.host:1.1
--- /dev/null Wed Apr 8 13:29:55 2020
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config.host Wed Apr 8 13:29:54 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-gcc_config.host,v 1.1 2020/04/08 13:29:54 rhialto Exp $
+
+Add host hooks for NetBSD - needed for working precompiled headers.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58397
+
+--- gcc/config.host.orig 2013-01-10 21:38:27.000000000 +0100
++++ gcc/config.host 2013-09-10 20:25:36.000000000 +0200
+@@ -271,6 +271,10 @@
+ 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
Index: pkgsrc/lang/gcc7/patches/patch-gcc_config_host-netbsd.c
diff -u /dev/null pkgsrc/lang/gcc7/patches/patch-gcc_config_host-netbsd.c:1.1
--- /dev/null Wed Apr 8 13:29:55 2020
+++ pkgsrc/lang/gcc7/patches/patch-gcc_config_host-netbsd.c Wed Apr 8 13:29:54 2020
@@ -0,0 +1,93 @@
+$NetBSD: patch-gcc_config_host-netbsd.c,v 1.1 2020/04/08 13:29:54 rhialto 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;
Home |
Main Index |
Thread Index |
Old Index