Module Name: src Committed By: mrg Date: Sat Mar 1 09:26:01 UTC 2014
Added Files: src/external/gpl3/gcc/dist/gcc/config: host-netbsd.c netbsd-stdint.h x-netbsd src/external/gpl3/gcc/dist/libgcc/config/arm: t-netbsd-eabi src/external/gpl3/gcc/dist/libgcc/config/m68k: t-netbsd-m68010 src/external/gpl3/gcc/dist/libgcc/config/pa: t-netbsd Removed Files: src/external/gpl3/gcc/dist/gcc/config/arm: t-netbsd-eabi Log Message: merge gcc 4.8.2 r206687 (part 3). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c \ src/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h \ src/external/gpl3/gcc/dist/gcc/config/x-netbsd cvs rdiff -u -r1.6 -r0 \ src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsd-eabi cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/dist/libgcc/config/arm/t-netbsd-eabi cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/dist/libgcc/config/m68k/t-netbsd-m68010 cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/libgcc/config/pa/t-netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/gcc/config/host-netbsd.c Sat Mar 1 09:26:00 2014 @@ -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__) +# 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; Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/gcc/config/netbsd-stdint.h Sat Mar 1 09:26:00 2014 @@ -0,0 +1,56 @@ +/* Definitions for <stdint.h> types for NetBSD systems. + Copyright (C) 2009 Free Software Foundation, Inc. + Contributed by Gerald Pfeifer <ger...@pfeifer.com>. + +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. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + +#define SIG_ATOMIC_TYPE "int" + +#define INT8_TYPE "signed char" +#define INT16_TYPE "short int" +#define INT32_TYPE "int" +#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") +#define UINT8_TYPE "unsigned char" +#define UINT16_TYPE "short unsigned int" +#define UINT32_TYPE "unsigned int" +#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + +#define INT_LEAST8_TYPE "signed char" +#define INT_LEAST16_TYPE "short int" +#define INT_LEAST32_TYPE "int" +#define INT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") +#define UINT_LEAST8_TYPE "unsigned char" +#define UINT_LEAST16_TYPE "short unsigned int" +#define UINT_LEAST32_TYPE "unsigned int" +#define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + +#define INT_FAST8_TYPE "int" +#define INT_FAST16_TYPE "int" +#define INT_FAST32_TYPE "int" +#define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") +#define UINT_FAST8_TYPE "unsigned int" +#define UINT_FAST16_TYPE "unsigned int" +#define UINT_FAST32_TYPE "unsigned int" +#define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + +#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") Index: src/external/gpl3/gcc/dist/gcc/config/x-netbsd diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/x-netbsd:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/gcc/config/x-netbsd Sat Mar 1 09:26:00 2014 @@ -0,0 +1,4 @@ +host-netbsd.o : $(srcdir)/config/host-netbsd.c $(CONFIG_H) $(SYSTEM_H) \ + coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H) + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + $(srcdir)/config/host-netbsd.c Index: src/external/gpl3/gcc/dist/libgcc/config/arm/t-netbsd-eabi diff -u /dev/null src/external/gpl3/gcc/dist/libgcc/config/arm/t-netbsd-eabi:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/libgcc/config/arm/t-netbsd-eabi Sat Mar 1 09:26:00 2014 @@ -0,0 +1,19 @@ +# This list is from t-elf, but with lots removed. +LIB1ASMFUNCS += _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX \ + _clzsi2 _clzdi2 _ctzsi2 + +# Derived from t-bpabi +# Add the BPABI C functions. +LIB2ADD += $(srcdir)/config/arm/unaligned-funcs.c + +LIB2ADDEH = $(srcdir)/config/arm/unwind-arm.c \ + $(srcdir)/config/arm/libunwind.S \ + $(srcdir)/config/arm/pr-support.c $(srcdir)/unwind-c.c + +# Add the BPABI names. +SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver + +# On ARM, specifying -fnon-call-exceptions will needlessly pull in +# the unwinder in simple programs which use 64-bit division. Omitting +# the option is safe. +LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions Index: src/external/gpl3/gcc/dist/libgcc/config/m68k/t-netbsd-m68010 diff -u /dev/null src/external/gpl3/gcc/dist/libgcc/config/m68k/t-netbsd-m68010:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/libgcc/config/m68k/t-netbsd-m68010 Sat Mar 1 09:26:01 2014 @@ -0,0 +1,5 @@ +LIB1ASMSRC = m68k/lb1sf68.S +LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ + _double _float _floatex \ + _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ + _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 Index: src/external/gpl3/gcc/dist/libgcc/config/pa/t-netbsd diff -u /dev/null src/external/gpl3/gcc/dist/libgcc/config/pa/t-netbsd:1.1 --- /dev/null Sat Mar 1 09:26:01 2014 +++ src/external/gpl3/gcc/dist/libgcc/config/pa/t-netbsd Sat Mar 1 09:26:01 2014 @@ -0,0 +1,9 @@ +#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. +LIB1ASMSRC = pa/milli64.S +LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI _dyncall + +HOST_LIBGCC2_CFLAGS += -DELF=1 -DLINUX=1 + +LIB2ADD = $(srcdir)/config/pa/fptr.c