merge forward our changes into the GCC 4.5.3 tree. mostly from chuq.
This commit is contained in:
parent
0a0dd75b65
commit
2f4e9d03df
2
external/gpl3/gcc/dist/configure
vendored
2
external/gpl3/gcc/dist/configure
vendored
@ -3276,7 +3276,7 @@ case "${target}" in
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
# Skip some stuff on all NetBSD configurations.
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||
|
||||
# Skip some stuff that's unsupported on some NetBSD configurations.
|
||||
case "${target}" in
|
||||
|
2
external/gpl3/gcc/dist/configure.ac
vendored
2
external/gpl3/gcc/dist/configure.ac
vendored
@ -513,7 +513,7 @@ case "${target}" in
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
# Skip some stuff on all NetBSD configurations.
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||
|
||||
# Skip some stuff that's unsupported on some NetBSD configurations.
|
||||
case "${target}" in
|
||||
|
5
external/gpl3/gcc/dist/gcc/Makefile.in
vendored
5
external/gpl3/gcc/dist/gcc/Makefile.in
vendored
@ -1880,6 +1880,7 @@ multilib.h: s-mlib; @true
|
||||
s-mlib: $(srcdir)/genmultilib Makefile
|
||||
if test @enable_multilib@ = yes \
|
||||
|| test -n "$(MULTILIB_OSDIRNAMES)"; then \
|
||||
CONFIG_SHELL="$(SHELL)" \
|
||||
$(SHELL) $(srcdir)/genmultilib \
|
||||
"$(MULTILIB_OPTIONS)" \
|
||||
"$(MULTILIB_DIRNAMES)" \
|
||||
@ -3926,7 +3927,7 @@ s-fixinc_list : $(GCC_PASSES)
|
||||
# Abort if no system headers available, unless building a crosscompiler.
|
||||
# FIXME: abort unless building --without-headers would be more accurate and less ugly
|
||||
stmp-fixinc: gsyslimits.h macro_list fixinc_list \
|
||||
$(build_objdir)/fixincludes/fixincl \
|
||||
$(build_objdir)/fixincludes/fixincl$(build_exeext) \
|
||||
$(build_objdir)/fixincludes/fixinc.sh
|
||||
rm -rf include-fixed; mkdir include-fixed
|
||||
-chmod a+rx include-fixed
|
||||
@ -4389,6 +4390,8 @@ install-info:: doc installdirs \
|
||||
lang.install-info
|
||||
|
||||
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_info:
|
||||
rm -f $@
|
||||
if [ -f $< ]; then \
|
||||
for f in $(<)*; do \
|
||||
|
10
external/gpl3/gcc/dist/gcc/c-opts.c
vendored
10
external/gpl3/gcc/dist/gcc/c-opts.c
vendored
@ -160,12 +160,14 @@ c_common_missing_argument (const char *opt, size_t code)
|
||||
error ("macro name missing after %qs", opt);
|
||||
break;
|
||||
|
||||
case OPT_cxx_isystem:
|
||||
case OPT_F:
|
||||
case OPT_I:
|
||||
case OPT_idirafter:
|
||||
case OPT_isysroot:
|
||||
case OPT_isystem:
|
||||
case OPT_iquote:
|
||||
case OPT_iremap:
|
||||
error ("missing path after %qs", opt);
|
||||
break;
|
||||
|
||||
@ -564,6 +566,10 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
||||
set_std_cxx98 (true);
|
||||
break;
|
||||
|
||||
case OPT_cxx_isystem:
|
||||
add_path (xstrdup (arg), SYSTEM, 1, true);
|
||||
break;
|
||||
|
||||
case OPT_d:
|
||||
handle_OPT_d (arg);
|
||||
break;
|
||||
@ -879,6 +885,10 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
||||
add_path (xstrdup (arg), SYSTEM, 0, true);
|
||||
break;
|
||||
|
||||
case OPT_iremap:
|
||||
add_cpp_remap_path (arg);
|
||||
break;
|
||||
|
||||
case OPT_iwithprefix:
|
||||
add_prefixed_path (arg, SYSTEM);
|
||||
break;
|
||||
|
10
external/gpl3/gcc/dist/gcc/c.opt
vendored
10
external/gpl3/gcc/dist/gcc/c.opt
vendored
@ -520,6 +520,12 @@ ansi
|
||||
C ObjC C++ ObjC++
|
||||
A synonym for -std=c89 (for C) or -std=c++98 (for C++)
|
||||
|
||||
; This should really just be C++/ObjC++ but we (NetBSD) use it when
|
||||
; calling C and ObjC compilers as well.
|
||||
cxx-isystem
|
||||
C ObjC C++ ObjC++ Joined Separate
|
||||
-cxx-isystem <dir> Add <dir> to the start of the C++ system include path
|
||||
|
||||
d
|
||||
C ObjC C++ ObjC++ Joined
|
||||
; Documented in common.opt. FIXME - what about -dI, -dD, -dN and -dD?
|
||||
@ -904,6 +910,10 @@ iquote
|
||||
C ObjC C++ ObjC++ Joined Separate
|
||||
-iquote <dir> Add <dir> to the end of the quote include path
|
||||
|
||||
iremap
|
||||
C ObjC C++ ObjC++ Joined Separate
|
||||
-iremap <src:dst> Convert <src> to <dst> if it occurs as prefix in __FILE__.
|
||||
|
||||
iwithprefix
|
||||
C ObjC C++ ObjC++ Joined Separate
|
||||
-iwithprefix <dir> Add <dir> to the end of the system include path
|
||||
|
4
external/gpl3/gcc/dist/gcc/cfgexpand.c
vendored
4
external/gpl3/gcc/dist/gcc/cfgexpand.c
vendored
@ -1080,7 +1080,9 @@ stack_protect_classify_type (tree type)
|
||||
else
|
||||
len = tree_low_cst (TYPE_SIZE_UNIT (type), 1);
|
||||
|
||||
if (len < max)
|
||||
if (len == 0)
|
||||
ret = SPCT_HAS_ARRAY;
|
||||
else if (len < max)
|
||||
ret = SPCT_HAS_SMALL_CHAR_ARRAY | SPCT_HAS_ARRAY;
|
||||
else
|
||||
ret = SPCT_HAS_LARGE_CHAR_ARRAY | SPCT_HAS_ARRAY;
|
||||
|
43
external/gpl3/gcc/dist/gcc/config.gcc
vendored
43
external/gpl3/gcc/dist/gcc/config.gcc
vendored
@ -720,6 +720,9 @@ arm*-*-freebsd*)
|
||||
arm*-*-netbsdelf*)
|
||||
tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
|
||||
tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
|
||||
case ${target} in
|
||||
armeb*) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END" ;;
|
||||
esac
|
||||
;;
|
||||
arm*-*-netbsd*)
|
||||
tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
|
||||
@ -956,6 +959,12 @@ hppa*-*-linux*)
|
||||
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
|
||||
fi
|
||||
;;
|
||||
hppa*-*-netbsd* | parisc*-*-netbsd*)
|
||||
target_cpu_default="MASK_PA_11"
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h netbsd.h netbsd-elf.h \
|
||||
pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h"
|
||||
tmake_file="${tmake_file} pa/t-netbsd"
|
||||
;;
|
||||
# port not yet contributed.
|
||||
#hppa*-*-openbsd*)
|
||||
# target_cpu_default="MASK_PA_11"
|
||||
@ -1129,7 +1138,7 @@ i[34567]86-*-netbsd*)
|
||||
;;
|
||||
x86_64-*-netbsd*)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
|
||||
tmake_file="${tmake_file} i386/t-crtstuff"
|
||||
tmake_file="${tmake_file} i386/t-netbsd64"
|
||||
;;
|
||||
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
|
||||
tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
|
||||
@ -1468,6 +1477,12 @@ ia64*-*-elf*)
|
||||
fi
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
|
||||
;;
|
||||
ia64*-*-netbsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h ia64/sysv4.h ia64/netbsd.h"
|
||||
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
|
||||
tmake_file="${tmake_file} ia64/t-ia64"
|
||||
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
|
||||
;;
|
||||
ia64*-*-freebsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
|
||||
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
|
||||
@ -1733,6 +1748,16 @@ mips-sgi-irix[56]*)
|
||||
"":yes | yes:yes ) thread_file=posix ;;
|
||||
esac
|
||||
;;
|
||||
mips64*-*-netbsd*) # NetBSD/mips64, either endian.
|
||||
target_cpu_default="MASK_ABICALLS|MASK_64BIT|MASK_FLOAT64"
|
||||
tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h mips/netbsd64.h"
|
||||
tmake_file="${tmake_file} mips/t-netbsd64"
|
||||
# tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
|
||||
tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
|
||||
# tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"mips64\\\""
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
mips*-*-netbsd*) # NetBSD/mips, either endian.
|
||||
target_cpu_default="MASK_ABICALLS"
|
||||
tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
|
||||
@ -1949,10 +1974,19 @@ powerpc*-*-freebsd*)
|
||||
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
;;
|
||||
powerpc-*-netbsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
|
||||
powerpc*-*-netbsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h"
|
||||
case ${target} in
|
||||
powerpc64*)
|
||||
tm_file="rs6000/biarch64.h ${tm_file} rs6000/default64.h rs6000/netbsd64.h"
|
||||
tmake_file="${tmake_file} rs6000/t-netbsd64"
|
||||
;;
|
||||
*)
|
||||
tm_file="${tm_file} rs6000/netbsd.h"
|
||||
tmake_file="${tmake_file} rs6000/t-netbsd"
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
;;
|
||||
esac
|
||||
extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
|
||||
;;
|
||||
powerpc-*-eabispe*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
|
||||
@ -2489,6 +2523,7 @@ sparc64-*-netbsd*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
tmake_file="${tmake_file} sparc/t-netbsd64"
|
||||
with_cpu=ultrasparc
|
||||
;;
|
||||
spu-*-elf*)
|
||||
tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
|
||||
|
2
external/gpl3/gcc/dist/gcc/config/arm/t-arm
vendored
2
external/gpl3/gcc/dist/gcc/config/arm/t-arm
vendored
@ -41,6 +41,8 @@ s-config s-conditions s-flags s-codes s-constants s-emit s-recog s-preds \
|
||||
|
||||
$(srcdir)/config/arm/arm-tune.md: $(srcdir)/config/arm/gentune.sh \
|
||||
$(srcdir)/config/arm/arm-cores.def
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_config_arm_arm-tune.md:
|
||||
$(SHELL) $(srcdir)/config/arm/gentune.sh \
|
||||
$(srcdir)/config/arm/arm-cores.def > \
|
||||
$(srcdir)/config/arm/arm-tune.md
|
||||
|
49
external/gpl3/gcc/dist/gcc/config/m68k/m68k.md
vendored
49
external/gpl3/gcc/dist/gcc/config/m68k/m68k.md
vendored
@ -3116,16 +3116,33 @@
|
||||
;; We need a separate DEFINE_EXPAND for u?mulsidi3 to be able to use the
|
||||
;; proper matching constraint. This is because the matching is between
|
||||
;; the high-numbered word of the DImode operand[0] and operand[1].
|
||||
;;
|
||||
;; Note: life_analysis() does not keep track of the individual halves of the
|
||||
;; DImode register. To prevent spurious liveness before the u?mulsidi3 insn
|
||||
;; (which causes "uninitialized variable" warnings), we explicitly clobber
|
||||
;; the DImode register.
|
||||
(define_expand "umulsidi3"
|
||||
[(parallel
|
||||
[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
|
||||
(mult:SI (match_operand:SI 1 "register_operand" "")
|
||||
(match_operand:SI 2 "register_operand" "")))
|
||||
[(set (match_operand:DI 0 "register_operand" "")
|
||||
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
|
||||
(zero_extend:DI (match_operand:SI 2 "register_operand" ""))))]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"")
|
||||
|
||||
(define_insn_and_split "*umulsidi3_split"
|
||||
[(set (match_operand:DI 0 "register_operand" "")
|
||||
(mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" ""))
|
||||
(zero_extend:DI (match_operand:SI 2 "register_operand" ""))))]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"#"
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
[(clobber (match_dup 0))
|
||||
(parallel
|
||||
[(set (subreg:SI (match_dup 0) 4)
|
||||
(mult:SI (match_dup 1) (match_dup 2)))
|
||||
(set (subreg:SI (match_dup 0) 0)
|
||||
(truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
|
||||
(zero_extend:DI (match_dup 2)))
|
||||
(const_int 32))))])]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
@ -3156,15 +3173,27 @@
|
||||
"mulu%.l %2,%3:%0")
|
||||
|
||||
(define_expand "mulsidi3"
|
||||
[(parallel
|
||||
[(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4)
|
||||
(mult:SI (match_operand:SI 1 "register_operand" "")
|
||||
(match_operand:SI 2 "register_operand" "")))
|
||||
[(set (match_operand:DI 0 "register_operand" "")
|
||||
(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" ""))
|
||||
(sign_extend:DI (match_operand:SI 2 "register_operand" ""))))]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"")
|
||||
|
||||
(define_insn_and_split "*mulsidi3_split"
|
||||
[(set (match_operand:DI 0 "register_operand" "")
|
||||
(mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" ""))
|
||||
(sign_extend:DI (match_operand:SI 2 "register_operand" ""))))]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"#"
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
[(clobber (match_dup 0))
|
||||
(parallel
|
||||
[(set (subreg:SI (match_dup 0) 4)
|
||||
(mult:SI (match_dup 1) (match_dup 2)))
|
||||
(set (subreg:SI (match_dup 0) 0)
|
||||
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
|
||||
(sign_extend:DI (match_dup 2)))
|
||||
(const_int 32))))])]
|
||||
"TARGET_68020 && !TUNE_68060 && !TARGET_COLDFIRE"
|
||||
"")
|
||||
|
||||
(define_insn ""
|
||||
|
75
external/gpl3/gcc/dist/gcc/config/mips/netbsd.h
vendored
75
external/gpl3/gcc/dist/gcc/config/mips/netbsd.h
vendored
@ -40,16 +40,63 @@ along with GCC; see the file COPYING3. If not see
|
||||
if (TARGET_ABICALLS) \
|
||||
builtin_define ("__ABICALLS__"); \
|
||||
\
|
||||
if (mips_abi == ABI_EABI) \
|
||||
builtin_define ("__mips_eabi"); \
|
||||
else if (mips_abi == ABI_N32) \
|
||||
/* The GNU C++ standard library requires this. */ \
|
||||
if (c_dialect_cxx ()) \
|
||||
builtin_define ("_GNU_SOURCE"); \
|
||||
\
|
||||
if (mips_abi == ABI_N32) \
|
||||
{ \
|
||||
builtin_define ("__mips_n32"); \
|
||||
builtin_define ("_ABIN32=2"); \
|
||||
builtin_define ("_MIPS_SIM=_ABIN32"); \
|
||||
builtin_define ("_MIPS_SZLONG=32"); \
|
||||
builtin_define ("_MIPS_SZPTR=32"); \
|
||||
} \
|
||||
else if (mips_abi == ABI_64) \
|
||||
{ \
|
||||
builtin_define ("__mips_n64"); \
|
||||
builtin_define ("_ABI64=3"); \
|
||||
builtin_define ("_MIPS_SIM=_ABI64"); \
|
||||
builtin_define ("_MIPS_SZLONG=64"); \
|
||||
builtin_define ("_MIPS_SZPTR=64"); \
|
||||
} \
|
||||
else if (mips_abi == ABI_O64) \
|
||||
{ \
|
||||
builtin_define ("__mips_o64"); \
|
||||
builtin_define ("_ABIO64=4"); \
|
||||
builtin_define ("_MIPS_SIM=_ABIO64"); \
|
||||
builtin_define ("_MIPS_SZLONG=64"); \
|
||||
builtin_define ("_MIPS_SZPTR=64"); \
|
||||
} \
|
||||
while (0)
|
||||
else if (mips_abi == ABI_EABI) \
|
||||
{ \
|
||||
builtin_define ("__mips_eabi"); \
|
||||
builtin_define ("_ABIEMB=5"); \
|
||||
builtin_define ("_MIPS_SIM=_ABIEMB"); \
|
||||
if (TARGET_LONG64) \
|
||||
builtin_define ("_MIPS_SZLONG=64"); \
|
||||
else \
|
||||
builtin_define ("_MIPS_SZLONG=32"); \
|
||||
if (TARGET_64BIT) \
|
||||
builtin_define ("_MIPS_SZPTR=64"); \
|
||||
else \
|
||||
builtin_define ("_MIPS_SZPTR=32"); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
builtin_define ("__mips_o32"); \
|
||||
builtin_define ("_ABIO32=1"); \
|
||||
builtin_define ("_MIPS_SIM=_ABIO32"); \
|
||||
builtin_define ("_MIPS_SZLONG=32"); \
|
||||
builtin_define ("_MIPS_SZPTR=32"); \
|
||||
} \
|
||||
if (TARGET_FLOAT64) \
|
||||
builtin_define ("_MIPS_FPSET=32"); \
|
||||
else \
|
||||
builtin_define ("_MIPS_FPSET=16"); \
|
||||
\
|
||||
builtin_define ("_MIPS_SZINT=32"); \
|
||||
} while (0)
|
||||
|
||||
/* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD.
|
||||
Specifically, they define too many namespace-invasive macros. Override
|
||||
@ -104,6 +151,11 @@ along with GCC; see the file COPYING3. If not see
|
||||
{ \
|
||||
builtin_define ("__mips=64"); \
|
||||
builtin_define ("__mips_isa_rev=1"); \
|
||||
} \
|
||||
else if (ISA_MIPS64R2) \
|
||||
{ \
|
||||
builtin_define ("__mips=64"); \
|
||||
builtin_define ("__mips_isa_rev=2"); \
|
||||
} \
|
||||
\
|
||||
if (TARGET_HARD_FLOAT) \
|
||||
@ -148,10 +200,11 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{EL:-m elf32lmip} \
|
||||
%{EB:-m elf32bmip} \
|
||||
"%{EL:-m elf32ltsmip} \
|
||||
%{EB:-m elf32btsmip} \
|
||||
%(endian_spec) \
|
||||
%{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \
|
||||
%{G*} %{mips1} %{mips2} %{mips3} %{mips4} \
|
||||
%{mips32} %{mips32r2} %{mips64} %{mips64r2} \
|
||||
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
|
||||
%(netbsd_link_spec)"
|
||||
|
||||
@ -192,6 +245,14 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
/* Make gcc agree with <machine/ansi.h> */
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \
|
||||
? "long unsigned int" : "unsigned int")
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \
|
||||
? "long int" : "int")
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
|
@ -82,6 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#define NETBSD_LINK_SPEC_ELF \
|
||||
"%{assert*} %{R*} %{rpath*} \
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
%{!shared: \
|
||||
-dc -dp \
|
||||
%{!nostdlib: \
|
||||
|
53
external/gpl3/gcc/dist/gcc/config/netbsd.h
vendored
53
external/gpl3/gcc/dist/gcc/config/netbsd.h
vendored
@ -46,15 +46,19 @@ along with GCC; see the file COPYING3. If not see
|
||||
#undef GPLUSPLUS_INCLUDE_DIR
|
||||
#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
|
||||
|
||||
#undef GPLUSPLUS_BACKWARD_INCLUDE_DIR
|
||||
#define GPLUSPLUS_BACKWARD_INCLUDE_DIR "/usr/include/g++/backward"
|
||||
|
||||
#undef GCC_INCLUDE_DIR
|
||||
#define GCC_INCLUDE_DIR "/usr/include"
|
||||
|
||||
#undef INCLUDE_DEFAULTS
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
#define INCLUDE_DEFAULTS \
|
||||
{ \
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
|
||||
{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1 }, \
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, \
|
||||
{ 0, 0, 0, 0 } \
|
||||
}
|
||||
|
||||
/* Under NetBSD, the normal location of the compiler back ends is the
|
||||
@ -69,6 +73,15 @@ along with GCC; see the file COPYING3. If not see
|
||||
#undef STANDARD_STARTFILE_PREFIX
|
||||
#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
|
||||
|
||||
#undef TOOLDIR_BASE_PREFIX
|
||||
#define TOOLDIR_BASE_PREFIX "/usr/"
|
||||
|
||||
#undef STANDARD_BINDIR_PREFIX
|
||||
#define STANDARD_BINDIR_PREFIX "/usr/bin"
|
||||
|
||||
#undef STANDARD_LIBEXEC_PREFIX
|
||||
#define STANDARD_LIBEXEC_PREFIX STANDARD_EXEC_PREFIX
|
||||
|
||||
#endif /* NETBSD_NATIVE */
|
||||
|
||||
|
||||
@ -97,6 +110,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{!pg:-lposix}} \
|
||||
%{p:-lposix_p} \
|
||||
%{pg:-lposix_p}} \
|
||||
%{shared:-lc} \
|
||||
%{!shared: \
|
||||
%{!symbolic: \
|
||||
%{!p: \
|
||||
@ -110,6 +124,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{!pg:-lposix}} \
|
||||
%{p:-lposix_p} \
|
||||
%{pg:-lposix_p}} \
|
||||
%{shared:-lc} \
|
||||
%{!shared: \
|
||||
%{!symbolic: \
|
||||
%{!p: \
|
||||
@ -121,24 +136,22 @@ along with GCC; see the file COPYING3. If not see
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC NETBSD_LIB_SPEC
|
||||
|
||||
/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
|
||||
libgcc with -symbolic. */
|
||||
/* Don't provide a LIBGCC_SPEC appropriate for NetBSD as the default
|
||||
is correct. In the --disabled-shared case -lgcc is perfect. */
|
||||
|
||||
#ifdef NETBSD_NATIVE
|
||||
#define NETBSD_LIBGCC_SPEC \
|
||||
"%{!symbolic: \
|
||||
%{!shared: \
|
||||
%{!p: \
|
||||
%{!pg: -lgcc}}} \
|
||||
%{shared: -lgcc_pic} \
|
||||
%{p: -lgcc_p} \
|
||||
%{pg: -lgcc_p}}"
|
||||
#else
|
||||
#define NETBSD_LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}"
|
||||
#if defined(NETBSD_TOOLS) || defined(NETBSD_NATIVE)
|
||||
#define LIBGCC_PICSUFFIX "_pic"
|
||||
#endif
|
||||
|
||||
#undef LIBGCC_SPEC
|
||||
#define LIBGCC_SPEC NETBSD_LIBGCC_SPEC
|
||||
/* Pass -cxx-isystem to cc1/cc1plus. */
|
||||
#define NETBSD_CC1_AND_CC1PLUS_SPEC \
|
||||
"%{cxx-isystem}"
|
||||
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC NETBSD_CC1_AND_CC1PLUS_SPEC
|
||||
|
||||
#undef CC1PLUS_SPEC
|
||||
#define CC1PLUS_SPEC NETBSD_CC1_AND_CC1PLUS_SPEC
|
||||
|
||||
/* When building shared libraries, the initialization and finalization
|
||||
functions for the library are .init and .fini respectively. */
|
||||
|
@ -221,7 +221,7 @@ GSYM($$dyncall)
|
||||
ldw 4(%r22),%r19 ; load new LTP value
|
||||
ldw 0(%r22),%r22 ; load address of target
|
||||
LSYM(1)
|
||||
#ifdef LINUX
|
||||
#if defined(LINUX) || defined(NETBSD)
|
||||
bv %r0(%r22) ; branch to the real target
|
||||
#else
|
||||
ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22
|
||||
|
34
external/gpl3/gcc/dist/gcc/config/pa/pa.c
vendored
34
external/gpl3/gcc/dist/gcc/config/pa/pa.c
vendored
@ -990,9 +990,9 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
||||
|| GET_CODE (XEXP (x, 0)) == REG))
|
||||
{
|
||||
rtx int_part, ptr_reg;
|
||||
int newoffset;
|
||||
int offset = INTVAL (XEXP (x, 1));
|
||||
int mask;
|
||||
HOST_WIDE_INT newoffset;
|
||||
HOST_WIDE_INT offset = INTVAL (XEXP (x, 1));
|
||||
HOST_WIDE_INT mask;
|
||||
|
||||
mask = (GET_MODE_CLASS (mode) == MODE_FLOAT
|
||||
? (INT14_OK_STRICT ? 0x3fff : 0x1f) : 0x3fff);
|
||||
@ -1046,7 +1046,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
||||
|| GET_CODE (XEXP (x, 1)) == SUBREG)
|
||||
&& GET_CODE (XEXP (x, 1)) != CONST)
|
||||
{
|
||||
int val = INTVAL (XEXP (XEXP (x, 0), 1));
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (XEXP (x, 0), 1));
|
||||
rtx reg1, reg2;
|
||||
|
||||
reg1 = XEXP (x, 1);
|
||||
@ -1125,7 +1125,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
||||
&& INTVAL (XEXP (idx, 1)) % INTVAL (XEXP (XEXP (idx, 0), 1)) == 0)
|
||||
{
|
||||
/* Divide the CONST_INT by the scale factor, then add it to A. */
|
||||
int val = INTVAL (XEXP (idx, 1));
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (idx, 1));
|
||||
|
||||
val /= INTVAL (XEXP (XEXP (idx, 0), 1));
|
||||
reg1 = XEXP (XEXP (idx, 0), 0);
|
||||
@ -1148,7 +1148,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
||||
&& INTVAL (XEXP (idx, 1)) <= 4096
|
||||
&& INTVAL (XEXP (idx, 1)) >= -4096)
|
||||
{
|
||||
int val = INTVAL (XEXP (XEXP (idx, 0), 1));
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (XEXP (idx, 0), 1));
|
||||
rtx reg1, reg2;
|
||||
|
||||
reg1 = force_reg (Pmode, gen_rtx_PLUS (Pmode, base, XEXP (idx, 1)));
|
||||
@ -1232,7 +1232,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
|
||||
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
|
||||
&& shadd_constant_p (INTVAL (XEXP (XEXP (x, 0), 1))))
|
||||
{
|
||||
int val = INTVAL (XEXP (XEXP (x, 0), 1));
|
||||
HOST_WIDE_INT val = INTVAL (XEXP (XEXP (x, 0), 1));
|
||||
rtx reg1, reg2;
|
||||
|
||||
reg1 = XEXP (x, 1);
|
||||
@ -2650,8 +2650,8 @@ find_addr_reg (rtx addr)
|
||||
const char *
|
||||
output_block_move (rtx *operands, int size_is_constant ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int align = INTVAL (operands[5]);
|
||||
unsigned long n_bytes = INTVAL (operands[4]);
|
||||
HOST_WIDE_INT align = INTVAL (operands[5]);
|
||||
unsigned HOST_WIDE_INT n_bytes = INTVAL (operands[4]);
|
||||
|
||||
/* We can't move more than a word at a time because the PA
|
||||
has no longer integer move insns. (Could use fp mem ops?) */
|
||||
@ -2778,8 +2778,8 @@ static int
|
||||
compute_movmem_length (rtx insn)
|
||||
{
|
||||
rtx pat = PATTERN (insn);
|
||||
unsigned int align = INTVAL (XEXP (XVECEXP (pat, 0, 7), 0));
|
||||
unsigned long n_bytes = INTVAL (XEXP (XVECEXP (pat, 0, 6), 0));
|
||||
unsigned HOST_WIDE_INT align = INTVAL (XEXP (XVECEXP (pat, 0, 7), 0));
|
||||
unsigned HOST_WIDE_INT n_bytes = INTVAL (XEXP (XVECEXP (pat, 0, 6), 0));
|
||||
unsigned int n_insns = 0;
|
||||
|
||||
/* We can't move more than four bytes at a time because the PA
|
||||
@ -2814,8 +2814,8 @@ compute_movmem_length (rtx insn)
|
||||
const char *
|
||||
output_block_clear (rtx *operands, int size_is_constant ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int align = INTVAL (operands[3]);
|
||||
unsigned long n_bytes = INTVAL (operands[2]);
|
||||
HOST_WIDE_INT align = INTVAL (operands[3]);
|
||||
unsigned HOST_WIDE_INT n_bytes = INTVAL (operands[2]);
|
||||
|
||||
/* We can't clear more than a word at a time because the PA
|
||||
has no longer integer move insns. */
|
||||
@ -2920,8 +2920,8 @@ static int
|
||||
compute_clrmem_length (rtx insn)
|
||||
{
|
||||
rtx pat = PATTERN (insn);
|
||||
unsigned int align = INTVAL (XEXP (XVECEXP (pat, 0, 4), 0));
|
||||
unsigned long n_bytes = INTVAL (XEXP (XVECEXP (pat, 0, 3), 0));
|
||||
unsigned HOST_WIDE_INT align = INTVAL (XEXP (XVECEXP (pat, 0, 4), 0));
|
||||
unsigned HOST_WIDE_INT n_bytes = INTVAL (XEXP (XVECEXP (pat, 0, 3), 0));
|
||||
unsigned int n_insns = 0;
|
||||
|
||||
/* We can't clear more than a word at a time because the PA
|
||||
@ -5337,7 +5337,7 @@ pa_som_file_start (void)
|
||||
static void
|
||||
pa_linux_file_start (void)
|
||||
{
|
||||
pa_file_start_file (1);
|
||||
pa_file_start_file (0);
|
||||
pa_file_start_level ();
|
||||
pa_file_start_mcount ("CODE");
|
||||
}
|
||||
@ -5552,7 +5552,7 @@ emit_hpdiv_const (rtx *operands, int unsignedp)
|
||||
const char *
|
||||
output_div_insn (rtx *operands, int unsignedp, rtx insn)
|
||||
{
|
||||
int divisor;
|
||||
HOST_WIDE_INT divisor;
|
||||
|
||||
/* If the divisor is a constant, try to use one of the special
|
||||
opcodes .*/
|
||||
|
2
external/gpl3/gcc/dist/gcc/config/pa/pa.h
vendored
2
external/gpl3/gcc/dist/gcc/config/pa/pa.h
vendored
@ -1196,7 +1196,7 @@ extern int may_call_alloca;
|
||||
There may be more opportunities to improve code with this hook. */
|
||||
#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
|
||||
do { \
|
||||
long offset, newoffset, mask; \
|
||||
HOST_WIDE_INT offset, newoffset, mask; \
|
||||
rtx new_rtx, temp = NULL_RTX; \
|
||||
\
|
||||
mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \
|
||||
|
@ -19,6 +19,22 @@
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This defines which switch letters take arguments. On NetBSD, most
|
||||
of the normal cases (defined by gcc.c) apply, and we also have -h*
|
||||
and -z* options (for the linker) (coming from SVR4).
|
||||
Copied from ../netbsd-elf.h and re{undef,defined} here to
|
||||
override the powerpc sysv4.h definition.
|
||||
netbsd-elf.h defines the default list + 'h' + 'z' + 'R'.
|
||||
rs6000/sysv4.h defines the default list + 'G'. */
|
||||
|
||||
#undef SWITCH_TAKES_ARG
|
||||
#define SWITCH_TAKES_ARG(CHAR) \
|
||||
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|
||||
|| (CHAR) == 'h' \
|
||||
|| (CHAR) == 'z' \
|
||||
|| (CHAR) == 'R' \
|
||||
|| (CHAR) == 'G')
|
||||
|
||||
#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
@ -58,6 +74,17 @@
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "int"
|
||||
|
||||
/* Redefine some types that where redefined by rs6000 include files. */
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
||||
|
||||
#undef WINT_TYPE
|
||||
#define WINT_TYPE "int"
|
||||
|
||||
/* Undo the spec mess from sysv4.h, and just define the specs
|
||||
the way NetBSD systems actually expect. */
|
||||
|
||||
@ -86,6 +113,27 @@
|
||||
{ "netbsd_entry_point", NETBSD_ENTRY_POINT }, \
|
||||
{ "netbsd_endfile_spec", NETBSD_ENDFILE_SPEC },
|
||||
|
||||
/*
|
||||
* Add NetBSD specific defaults: -mpowerpc -mnew_mnemonics -mstrict-align
|
||||
*/
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN)
|
||||
|
||||
/* Attempt to enable execute permissions on the stack. */
|
||||
#define TRANSFER_FROM_TRAMPOLINE NETBSD_ENABLE_EXECUTE_STACK
|
||||
#ifdef L_trampoline
|
||||
#undef TRAMPOLINE_SIZE
|
||||
#define TRAMPOLINE_SIZE 48
|
||||
#endif
|
||||
|
||||
/* Make sure _enable_execute_stack() isn't the empty function in libgcc2.c.
|
||||
It gets defined in _trampoline.o via NETBSD_ENABLE_EXECUTE_STACK. */
|
||||
#undef ENABLE_EXECUTE_STACK
|
||||
#define ENABLE_EXECUTE_STACK
|
||||
|
||||
/* Override STACK_BOUNDARY to use Altivec compliant one. */
|
||||
#undef STACK_BOUNDARY
|
||||
#define STACK_BOUNDARY 128
|
||||
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fprintf (stderr, " (NetBSD/powerpc ELF)");
|
||||
|
@ -2511,7 +2511,7 @@ rs6000_override_options (const char *default_cpu)
|
||||
if (!rs6000_explicit_options.long_double)
|
||||
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
|
||||
|
||||
#ifndef POWERPC_LINUX
|
||||
#if !defined(POWERPC_LINUX) && !defined(POWERPC_NETBSD)
|
||||
if (!rs6000_explicit_options.ieee)
|
||||
rs6000_ieeequad = 1;
|
||||
#endif
|
||||
|
31
external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h
vendored
31
external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h
vendored
@ -120,7 +120,12 @@ do { \
|
||||
else if (!strcmp (rs6000_abi_name, "gnu")) \
|
||||
rs6000_current_abi = ABI_V4; \
|
||||
else if (!strcmp (rs6000_abi_name, "netbsd")) \
|
||||
rs6000_current_abi = ABI_V4; \
|
||||
{ \
|
||||
if (TARGET_64BIT) \
|
||||
rs6000_current_abi = ABI_AIX; \
|
||||
else \
|
||||
rs6000_current_abi = ABI_V4; \
|
||||
} \
|
||||
else if (!strcmp (rs6000_abi_name, "openbsd")) \
|
||||
rs6000_current_abi = ABI_V4; \
|
||||
else if (!strcmp (rs6000_abi_name, "i960-old")) \
|
||||
@ -618,6 +623,7 @@ SVR4_ASM_SPEC \
|
||||
#endif
|
||||
|
||||
/* Pass -G xxx to the compiler and set correct endian mode. */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{G*} %(cc1_cpu) \
|
||||
%{mlittle|mlittle-endian: %(cc1_endian_little); \
|
||||
mbig |mbig-endian : %(cc1_endian_big); \
|
||||
@ -641,7 +647,8 @@ SVR4_ASM_SPEC \
|
||||
%{msdata: -msdata=default} \
|
||||
%{mno-sdata: -msdata=none} \
|
||||
%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
|
||||
%{profile: -p}"
|
||||
%{profile: -p} \
|
||||
%(cc1_os_netbsd)"
|
||||
|
||||
/* Don't put -Y P,<path> for cross compilers. */
|
||||
#ifndef CROSS_DIRECTORY_STRUCTURE
|
||||
@ -950,28 +957,23 @@ SVR4_ASM_SPEC \
|
||||
-Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
|
||||
|
||||
/* NetBSD support. */
|
||||
#define LIB_NETBSD_SPEC "\
|
||||
%{profile:-lgmon -lc_p} %{!profile:-lc}"
|
||||
#define LIB_NETBSD_SPEC NETBSD_LIB_SPEC
|
||||
|
||||
#define STARTFILE_NETBSD_SPEC "\
|
||||
ncrti.o%s crt0.o%s \
|
||||
%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
|
||||
#define STARTFILE_NETBSD_SPEC NETBSD_STARTFILE_SPEC
|
||||
|
||||
#define ENDFILE_NETBSD_SPEC "\
|
||||
%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
|
||||
ncrtn.o%s"
|
||||
#define ENDFILE_NETBSD_SPEC NETBSD_ENDFILE_SPEC
|
||||
|
||||
#define LINK_START_NETBSD_SPEC "\
|
||||
"
|
||||
|
||||
#define LINK_OS_NETBSD_SPEC "\
|
||||
%{!shared: %{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}"
|
||||
#define LINK_OS_NETBSD_SPEC NETBSD_LINK_SPEC_ELF
|
||||
|
||||
#define CPP_OS_NETBSD_SPEC "\
|
||||
-D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
|
||||
|
||||
#define CC1_OS_NETBSD_SPEC "\
|
||||
%{cxx-isystem}"
|
||||
|
||||
/* OpenBSD support. */
|
||||
#ifndef LIB_OPENBSD_SPEC
|
||||
#define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
|
||||
@ -1064,6 +1066,7 @@ ncrtn.o%s"
|
||||
{ "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
|
||||
{ "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \
|
||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
{ "cc1_os_netbsd", CC1_OS_NETBSD_SPEC }, \
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
|
@ -18,15 +18,12 @@
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
LIB2FUNCS_EXTRA = tramp.S
|
||||
LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/tramp.asm
|
||||
|
||||
LIB2FUNCS_STATIC_EXTRA = crtsavfpr.S crtresfpr.S \
|
||||
crtsavgpr.S crtresgpr.S \
|
||||
crtresxfpr.S crtresxgpr.S
|
||||
|
||||
tramp.S: $(srcdir)/config/rs6000/tramp.asm
|
||||
cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
|
||||
|
||||
crtsavfpr.S: $(srcdir)/config/rs6000/crtsavfpr.asm
|
||||
cat $(srcdir)/config/rs6000/crtsavfpr.asm >crtsavfpr.S
|
||||
|
||||
|
@ -19,6 +19,10 @@
|
||||
TARGET_LIBGCC2_CFLAGS = -fpic -mieee
|
||||
LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
|
||||
# Use sh specific libgcc-std.ver to avoid exporting some
|
||||
# lib1func routines which shoud not be called via PLT.
|
||||
SHLIB_MAPFILES = $(srcdir)/config/sh/libgcc-std.ver
|
||||
|
||||
LIB2FUNCS_EXTRA=
|
||||
|
||||
EXTRA_MULTILIB_PARTS=
|
||||
|
@ -112,7 +112,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
|
||||
|
||||
#undef SPARC_DEFAULT_CMODEL
|
||||
#define SPARC_DEFAULT_CMODEL CM_MEDANY
|
||||
#define SPARC_DEFAULT_CMODEL CM_MEDLOW
|
||||
|
||||
#endif
|
||||
|
||||
@ -132,9 +132,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{!mf934: \
|
||||
%{!mv8*: \
|
||||
%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
|
||||
%{!mno-vis:%{!mcpu=v9:-mvis}} \
|
||||
%{p:-mcmodel=medlow} \
|
||||
%{pg:-mcmodel=medlow}}"
|
||||
%{!mno-vis:%{!mcpu=v9:-mvis}}" \
|
||||
NETBSD_CC1_AND_CC1PLUS_SPEC
|
||||
|
||||
#define CC1_SPEC64 \
|
||||
"%{sun4:} %{target:} \
|
||||
@ -151,10 +150,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
%{!mf930: \
|
||||
%{!mf934: \
|
||||
%{!mv8*: \
|
||||
%{!msupersparc:-mcpu=cypress}}}}}}}} \
|
||||
%{!m32: \
|
||||
%{p:-mcmodel=medlow} \
|
||||
%{pg:-mcmodel=medlow}}"
|
||||
%{!msupersparc:-mcpu=cypress}}}}}}}}" \
|
||||
NETBSD_CC1_AND_CC1PLUS_SPEC
|
||||
|
||||
/* Make sure we use the right output format. Pick a default and then
|
||||
make sure -m32/-m64 switch to the right one. */
|
||||
|
@ -1,8 +1,9 @@
|
||||
# Disable multilib fow now, as NetBSD/sparc64 does not ship with
|
||||
# a 32-bit environment.
|
||||
#MULTILIB_OPTIONS = m32/m64
|
||||
#MULTILIB_DIRNAMES = 32 64
|
||||
#MULTILIB_MATCHES =
|
||||
# NetBSD has (will have) "non-native" libraries in /usr/lib/<arch>.
|
||||
# For NetBSD/sparc64 we thus have /usr/lib and /usr/lib/sparc.
|
||||
|
||||
#LIBGCC = stmp-multilib
|
||||
#INSTALL_LIBGCC = install-multilib
|
||||
MULTILIB_OPTIONS = m64/m32
|
||||
MULTILIB_DIRNAMES = 64 32
|
||||
MULTILIB_OSDIRNAMES = . ../lib/sparc
|
||||
|
||||
LIBGCC = stmp-multilib
|
||||
INSTALL_LIBGCC = install-multilib
|
||||
|
5
external/gpl3/gcc/dist/gcc/configure
vendored
5
external/gpl3/gcc/dist/gcc/configure
vendored
@ -22301,7 +22301,7 @@ foo: .long 25
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
sh-*-* | sh[34]-*-*)
|
||||
sh-*-* | sh[34]-*-* | sh*l*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
@ -25005,7 +25005,7 @@ else
|
||||
# simply assert that glibc does provide this, which is true for all
|
||||
# realistically usable GNU/Hurd configurations.
|
||||
gcc_cv_libc_provides_ssp=yes;;
|
||||
*-*-darwin* | *-*-freebsd*)
|
||||
*-*-darwin* | *-*-freebsd* | *-*-netbsd*)
|
||||
ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
|
||||
if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
|
||||
gcc_cv_libc_provides_ssp=yes
|
||||
@ -26973,4 +26973,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
|
4
external/gpl3/gcc/dist/gcc/configure.ac
vendored
4
external/gpl3/gcc/dist/gcc/configure.ac
vendored
@ -2882,7 +2882,7 @@ foo: .long 25
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
sh-*-* | sh[34]-*-*)
|
||||
sh-*-* | sh[34]-*-* | sh*l*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
@ -4127,7 +4127,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
|
||||
# simply assert that glibc does provide this, which is true for all
|
||||
# realistically usable GNU/Hurd configurations.
|
||||
gcc_cv_libc_provides_ssp=yes;;
|
||||
*-*-darwin* | *-*-freebsd*)
|
||||
*-*-darwin* | *-*-freebsd* | *-*-netbsd*)
|
||||
AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
|
||||
[echo "no __stack_chk_fail on this target"])
|
||||
;;
|
||||
|
4
external/gpl3/gcc/dist/gcc/doc/cpp.texi
vendored
4
external/gpl3/gcc/dist/gcc/doc/cpp.texi
vendored
@ -1160,6 +1160,9 @@ command line. If the same directory is named by both @option{-I} and
|
||||
@option{-isystem}, the @option{-I} option is ignored. GCC provides an
|
||||
informative message when this occurs if @option{-v} is used.
|
||||
|
||||
The @option{-cxx-isystem} command line option adds its argument to the
|
||||
list of C++ system headers, similar to @option{-isystem} for C headers.
|
||||
|
||||
@findex #pragma GCC system_header
|
||||
There is also a directive, @code{@w{#pragma GCC system_header}}, which
|
||||
tells GCC to consider the rest of the current include file a system
|
||||
@ -4349,6 +4352,7 @@ without notice.
|
||||
@c man begin SYNOPSIS
|
||||
cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
|
||||
[@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}]
|
||||
[@option{-iremap}@var{src}:@var{dst}]
|
||||
[@option{-W}@var{warn}@dots{}]
|
||||
[@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}]
|
||||
[@option{-MP}] [@option{-MQ} @var{target}@dots{}]
|
||||
|
13
external/gpl3/gcc/dist/gcc/doc/cppenv.texi
vendored
13
external/gpl3/gcc/dist/gcc/doc/cppenv.texi
vendored
@ -80,4 +80,17 @@ main input file is omitted.
|
||||
@ifclear cppmanual
|
||||
@xref{Preprocessor Options}.
|
||||
@end ifclear
|
||||
|
||||
@item CPP_RESTRICTED
|
||||
@cindex only open regular files
|
||||
If this variable is defined, cpp will skip any include file which is not a
|
||||
regular file, and will continue searching for the requested name (this is
|
||||
always done if the found file is a directory).
|
||||
@ifset cppmanual
|
||||
@xref{Invocation}.
|
||||
@end ifset
|
||||
@ifclear cppmanual
|
||||
@xref{Preprocessor Options}.
|
||||
@end ifclear
|
||||
|
||||
@end vtable
|
||||
|
16
external/gpl3/gcc/dist/gcc/doc/cppopts.texi
vendored
16
external/gpl3/gcc/dist/gcc/doc/cppopts.texi
vendored
@ -504,6 +504,16 @@ is applied to the standard system directories.
|
||||
If @var{dir} begins with @code{=}, then the @code{=} will be replaced
|
||||
by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}.
|
||||
|
||||
@item -cxx-isystem @var{dir}
|
||||
@opindex cxxisystem
|
||||
Search @var{dir} for C++ header files, after all directories specified by
|
||||
@option{-I} but before the standard system directories. Mark it
|
||||
as a system directory, so that it gets the same special treatment as
|
||||
is applied to the standard system directories.
|
||||
@ifset cppmanual
|
||||
@xref{System Headers}.
|
||||
@end ifset
|
||||
|
||||
@item -iquote @var{dir}
|
||||
@opindex iquote
|
||||
Search @var{dir} only for header files requested with
|
||||
@ -538,6 +548,12 @@ With both @option{-E} and @option{-fpreprocessed}, the rules for
|
||||
@option{-fpreprocessed} take precedence. This enables full preprocessing of
|
||||
files previously preprocessed with @code{-E -fdirectives-only}.
|
||||
|
||||
@item -iremap @var{src}:@var{dst}
|
||||
@opindex iremap
|
||||
Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time.
|
||||
This option can be specified more than once. Processing stops at the first
|
||||
match.
|
||||
|
||||
@item -fdollars-in-identifiers
|
||||
@opindex fdollars-in-identifiers
|
||||
@anchor{fdollars-in-identifiers}
|
||||
|
3
external/gpl3/gcc/dist/gcc/doc/gcov.texi
vendored
3
external/gpl3/gcc/dist/gcc/doc/gcov.texi
vendored
@ -128,8 +128,9 @@ gcov [@option{-v}|@option{--version}] [@option{-h}|@option{--help}]
|
||||
[@option{-l}|@option{--long-file-names}]
|
||||
[@option{-p}|@option{--preserve-paths}]
|
||||
[@option{-f}|@option{--function-summaries}]
|
||||
[@option{-o}|@option{--object-directory} @var{directory|file}] @var{sourcefiles}
|
||||
[@option{-o}|@option{--object-directory} @var{directory|file}]
|
||||
[@option{-u}|@option{--unconditional-branches}]
|
||||
@var{sourcefiles}
|
||||
@c man end
|
||||
@c man begin SEEALSO
|
||||
gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
|
||||
|
20
external/gpl3/gcc/dist/gcc/doc/invoke.texi
vendored
20
external/gpl3/gcc/dist/gcc/doc/invoke.texi
vendored
@ -404,6 +404,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||
-include @var{file} -imacros @var{file} @gol
|
||||
-iprefix @var{file} -iwithprefix @var{dir} @gol
|
||||
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
|
||||
-cxx-isystem @var{dir} @gol
|
||||
-imultilib @var{dir} -isysroot @var{dir} @gol
|
||||
-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
|
||||
-P -fworking-directory -remap @gol
|
||||
@ -425,7 +426,8 @@ Objective-C and Objective-C++ Dialects}.
|
||||
|
||||
@item Directory Options
|
||||
@xref{Directory Options,,Options for Directory Search}.
|
||||
@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
|
||||
@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir}
|
||||
-iremap@var{src}:@var{dst} -L@var{dir}
|
||||
-specs=@var{file} -I- --sysroot=@var{dir}}
|
||||
|
||||
@item Target Options
|
||||
@ -3246,11 +3248,11 @@ Furthermore, the prior value shall be read only to determine the value
|
||||
to be stored.''. If a program breaks these rules, the results on any
|
||||
particular implementation are entirely unpredictable.
|
||||
|
||||
Examples of code with undefined behavior are @code{a = a++;}, @code{a[n]
|
||||
= b[n++]} and @code{a[i++] = i;}. Some more complicated cases are not
|
||||
diagnosed by this option, and it may give an occasional false positive
|
||||
result, but in general it has been found fairly effective at detecting
|
||||
this sort of problem in programs.
|
||||
Examples of code with undefined behavior are @code{a = a++;},
|
||||
@code{a[n] = b[n++]} and @code{a[i++] = i;}. Some more complicated cases
|
||||
are not diagnosed by this option, and it may give an occasional false
|
||||
positive result, but in general it has been found fairly effective at
|
||||
detecting this sort of problem in programs.
|
||||
|
||||
The standard is worded confusingly, therefore there is some debate
|
||||
over the precise meaning of the sequence point rules in subtle cases.
|
||||
@ -8873,6 +8875,12 @@ be searched for header files only for the case of @samp{#include
|
||||
"@var{file}"}; they are not searched for @samp{#include <@var{file}>},
|
||||
otherwise just like @option{-I}.
|
||||
|
||||
@item -iremap @var{src}:@var{dst}
|
||||
@opindex iremap
|
||||
Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time.
|
||||
This option can be specified more than once. Processing stops at the first
|
||||
match.
|
||||
|
||||
@item -L@var{dir}
|
||||
@opindex L
|
||||
Add directory @var{dir} to the list of directories to be searched
|
||||
|
37
external/gpl3/gcc/dist/gcc/gcc.c
vendored
37
external/gpl3/gcc/dist/gcc/gcc.c
vendored
@ -1753,15 +1753,35 @@ init_gcc_specs (struct obstack *obstack, const char *shared_name,
|
||||
{
|
||||
char *buf;
|
||||
|
||||
buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, "}"
|
||||
buf = concat ("%{static",
|
||||
#ifdef LIBGCC_PICSUFFIX
|
||||
": ", static_name, " ", eh_name, "}",
|
||||
"%{static-libgcc: ",
|
||||
"%{!shared:", static_name, " ", eh_name, "}",
|
||||
"%{shared:", static_name, LIBGCC_PICSUFFIX, " ",
|
||||
eh_name, LIBGCC_PICSUFFIX, "}",
|
||||
#else
|
||||
"|static-libgcc:", static_name, " ", eh_name,
|
||||
#endif
|
||||
"}"
|
||||
"%{!static:%{!static-libgcc:"
|
||||
#if USE_LD_AS_NEEDED
|
||||
"%{!shared:"
|
||||
"%{!shared-libgcc:",
|
||||
static_name, " --as-needed ", shared_name, " --no-as-needed"
|
||||
"}"
|
||||
"%{shared-libgcc:",
|
||||
shared_name, "%{!shared: ", static_name, "}"
|
||||
"}"
|
||||
"}"
|
||||
"%{shared:"
|
||||
"%{shared-libgcc: --as-needed", shared_name, " --no-as-needed} ",
|
||||
"%{!shared-libgcc:", static_name,
|
||||
#ifdef LIBGCC_PICSUFFIX
|
||||
LIBGCC_PICSUFFIX,
|
||||
#endif
|
||||
"}"
|
||||
"}"
|
||||
#else
|
||||
"%{!shared:"
|
||||
"%{!shared-libgcc:", static_name, " ", eh_name, "}"
|
||||
@ -1770,7 +1790,11 @@ init_gcc_specs (struct obstack *obstack, const char *shared_name,
|
||||
#ifdef LINK_EH_SPEC
|
||||
"%{shared:"
|
||||
"%{shared-libgcc:", shared_name, "}"
|
||||
"%{!shared-libgcc:", static_name, "}"
|
||||
"%{!shared-libgcc:", static_name,
|
||||
#ifdef LIBGCC_PICSUFFIX
|
||||
LIBGCC_PICSUFFIX,
|
||||
#endif
|
||||
"}"
|
||||
"}"
|
||||
#else
|
||||
"%{shared:", shared_name, "}"
|
||||
@ -3629,6 +3653,10 @@ process_command (int argc, const char **argv)
|
||||
/* FIXME: make_relative_prefix doesn't yet work for VMS. */
|
||||
if (!gcc_exec_prefix)
|
||||
{
|
||||
#ifdef NETBSD_NATIVE
|
||||
add_prefix (&exec_prefixes, standard_libexec_prefix, "GCC",
|
||||
PREFIX_PRIORITY_LAST, 0, 0);
|
||||
#else
|
||||
gcc_exec_prefix = get_relative_prefix (argv[0],
|
||||
standard_bindir_prefix,
|
||||
standard_exec_prefix);
|
||||
@ -3638,6 +3666,7 @@ process_command (int argc, const char **argv)
|
||||
if (gcc_exec_prefix)
|
||||
xputenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
/* make_relative_prefix requires a program name, but
|
||||
@ -6938,6 +6967,7 @@ main (int argc, char **argv)
|
||||
else
|
||||
init_spec ();
|
||||
|
||||
#ifndef NETBSD_NATIVE
|
||||
/* We need to check standard_exec_prefix/just_machine_suffix/specs
|
||||
for any override of as, ld and libraries. */
|
||||
specs_file = (char *) alloca (strlen (standard_exec_prefix)
|
||||
@ -6948,6 +6978,7 @@ main (int argc, char **argv)
|
||||
strcat (specs_file, "specs");
|
||||
if (access (specs_file, R_OK) == 0)
|
||||
read_specs (specs_file, TRUE);
|
||||
#endif
|
||||
|
||||
/* Process any configure-time defaults specified for the command line
|
||||
options, via OPTION_DEFAULT_SPECS. */
|
||||
@ -7085,6 +7116,7 @@ main (int argc, char **argv)
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
#ifndef NETBSD_NATIVE
|
||||
/* Sysrooted prefixes are relocated because target_system_root is
|
||||
also relocated by gcc_exec_prefix. */
|
||||
if (*standard_startfile_prefix_1)
|
||||
@ -7095,6 +7127,7 @@ main (int argc, char **argv)
|
||||
add_sysrooted_prefix (&startfile_prefixes,
|
||||
standard_startfile_prefix_2, "BINUTILS",
|
||||
PREFIX_PRIORITY_LAST, 0, 1);
|
||||
#endif /* NETBSD_NATIVE */
|
||||
}
|
||||
|
||||
/* Process any user specified specs in the order given on the command
|
||||
|
1
external/gpl3/gcc/dist/gcc/gcc.h
vendored
1
external/gpl3/gcc/dist/gcc/gcc.h
vendored
@ -50,6 +50,7 @@ struct spec_function
|
||||
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|
||||
|| !strcmp (STR, "iquote") || !strcmp (STR, "isystem") \
|
||||
|| !strcmp (STR, "isysroot") \
|
||||
|| !strcmp (STR, "cxx-isystem") || !strcmp (STR, "-iremap") \
|
||||
|| !strcmp (STR, "-param") || !strcmp (STR, "specs") \
|
||||
|| !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ") \
|
||||
|| !strcmp (STR, "fintrinsic-modules-path") \
|
||||
|
6
external/gpl3/gcc/dist/gcc/genemit.c
vendored
6
external/gpl3/gcc/dist/gcc/genemit.c
vendored
@ -250,9 +250,9 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used)
|
||||
printf ("const_true_rtx");
|
||||
else
|
||||
{
|
||||
printf ("GEN_INT (");
|
||||
printf (HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
|
||||
printf (")");
|
||||
printf ("GEN_INT (HOST_WIDE_INT_CONSTANT (");
|
||||
printf (HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
|
||||
printf ("))");
|
||||
}
|
||||
return;
|
||||
|
||||
|
18
external/gpl3/gcc/dist/gcc/genmultilib
vendored
18
external/gpl3/gcc/dist/gcc/genmultilib
vendored
@ -136,8 +136,10 @@ cd ./tmpmultilib.$$ || exit 1
|
||||
# Since not all versions of sh support functions, we achieve recursion
|
||||
# by creating a temporary shell script which invokes itself.
|
||||
rm -f tmpmultilib
|
||||
cat >tmpmultilib <<\EOF
|
||||
#!/bin/sh
|
||||
cat >tmpmultilib <<EOF
|
||||
#!${CONFIG_SHELL:-/bin/sh}
|
||||
EOF
|
||||
cat >>tmpmultilib <<\EOF
|
||||
# This recursive script basically outputs all combinations of its
|
||||
# input arguments, handling mutually exclusive sets of options by
|
||||
# repetition. When the script is called, ${initial} is the list of
|
||||
@ -172,8 +174,10 @@ combinations=`initial=/ ./tmpmultilib ${options}`
|
||||
|
||||
# If there exceptions, weed them out now
|
||||
if [ -n "${exceptions}" ]; then
|
||||
cat >tmpmultilib2 <<\EOF
|
||||
#!/bin/sh
|
||||
cat >tmpmultilib2 <<EOF
|
||||
#!${CONFIG_SHELL:-/bin/sh}
|
||||
EOF
|
||||
cat >>tmpmultilib2 <<\EOF
|
||||
# This recursive script weeds out any combination of multilib
|
||||
# switches that should not be generated. The output looks like
|
||||
# a list of subdirectory names with leading and trailing slashes.
|
||||
@ -271,8 +275,10 @@ fi
|
||||
# opt1/opt2 nopt1 nopt2
|
||||
# In other words, we must output all combinations of matches.
|
||||
rm -f tmpmultilib2
|
||||
cat >tmpmultilib2 <<\EOF
|
||||
#!/bin/sh
|
||||
cat >tmpmultilib2 <<EOF
|
||||
#!${CONFIG_SHELL:-/bin/sh}
|
||||
EOF
|
||||
cat >>tmpmultilib2 <<\EOF
|
||||
# The positional parameters are a list of matches to consider.
|
||||
# ${dirout} is the directory name and ${optout} is the current list of
|
||||
# options.
|
||||
|
6
external/gpl3/gcc/dist/gcc/genrecog.c
vendored
6
external/gpl3/gcc/dist/gcc/genrecog.c
vendored
@ -1849,11 +1849,13 @@ write_afterward (struct decision *start, struct decision *afterward,
|
||||
static void
|
||||
print_host_wide_int (HOST_WIDE_INT val)
|
||||
{
|
||||
/* XXX: the "min" below is computed for build, not host!!! */
|
||||
HOST_WIDE_INT min = (unsigned HOST_WIDE_INT)1 << (HOST_BITS_PER_WIDE_INT-1);
|
||||
if (val == min)
|
||||
printf ("(" HOST_WIDE_INT_PRINT_DEC_C "-1)", val + 1);
|
||||
printf ("(HOST_WIDE_INT_CONSTANT (" HOST_WIDE_INT_PRINT_DEC ")-1)",
|
||||
val + 1);
|
||||
else
|
||||
printf (HOST_WIDE_INT_PRINT_DEC_C, val);
|
||||
printf ("HOST_WIDE_INT_CONSTANT (" HOST_WIDE_INT_PRINT_DEC")", val);
|
||||
}
|
||||
|
||||
/* Emit a switch statement, if possible, for an initial sequence of
|
||||
|
2
external/gpl3/gcc/dist/gcc/ginclude/stddef.h
vendored
2
external/gpl3/gcc/dist/gcc/ginclude/stddef.h
vendored
@ -52,8 +52,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
|
||||
one less case to deal with in the following. */
|
||||
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
|
||||
#ifndef inhibit_libc
|
||||
#include <machine/ansi.h>
|
||||
#endif
|
||||
#endif
|
||||
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
|
||||
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
|
||||
#include <sys/_types.h>
|
||||
|
2
external/gpl3/gcc/dist/gcc/hwint.h
vendored
2
external/gpl3/gcc/dist/gcc/hwint.h
vendored
@ -78,6 +78,7 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
|
||||
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
|
||||
# define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT
|
||||
# define HOST_WIDE_INT_PRINT_C "L"
|
||||
# define HOST_WIDE_INT_CONSTANT(x) x ## L
|
||||
/* 'long' might be 32 or 64 bits, and the number of leading zeroes
|
||||
must be tweaked accordingly. */
|
||||
# if HOST_BITS_PER_WIDE_INT == 64
|
||||
@ -90,6 +91,7 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
|
||||
#else
|
||||
# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT
|
||||
# define HOST_WIDE_INT_PRINT_C "LL"
|
||||
# define HOST_WIDE_INT_CONSTANT(x) x ## LL
|
||||
/* We can assume that 'long long' is at least 64 bits. */
|
||||
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \
|
||||
"0x%" HOST_LONG_LONG_FORMAT "x%016" HOST_LONG_LONG_FORMAT "x"
|
||||
|
9
external/gpl3/gcc/dist/gcc/libgcc2.c
vendored
9
external/gpl3/gcc/dist/gcc/libgcc2.c
vendored
@ -1802,15 +1802,19 @@ NAME (TYPE x, int m)
|
||||
#define isfinite(x) __builtin_expect (!isnan((x) - (x)), 1)
|
||||
#define isinf(x) __builtin_expect (!isnan(x) & !isfinite(x), 0)
|
||||
|
||||
#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
|
||||
#define INFINITY CONCAT2(__builtin_huge_val, CEXT) ()
|
||||
#endif
|
||||
#define I 1i
|
||||
|
||||
/* Helpers to make the following code slightly less gross. */
|
||||
#define COPYSIGN CONCAT2(__builtin_copysign, CEXT)
|
||||
#define FABS CONCAT2(__builtin_fabs, CEXT)
|
||||
|
||||
#ifdef INFINITY
|
||||
/* Verify that MTYPE matches up with CEXT. */
|
||||
extern void *compile_type_assert[sizeof(INFINITY) == sizeof(MTYPE) ? 1 : -1];
|
||||
#endif
|
||||
|
||||
/* Ensure that we've lost any extra precision. */
|
||||
#if NOTRUNC
|
||||
@ -1841,6 +1845,7 @@ CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
|
||||
x = ac - bd;
|
||||
y = ad + bc;
|
||||
|
||||
#ifdef INFINITY
|
||||
if (isnan (x) && isnan (y))
|
||||
{
|
||||
/* Recover infinities that computed as NaN + iNaN. */
|
||||
@ -1882,6 +1887,7 @@ CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
|
||||
y = INFINITY * (a * d + b * c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
__real__ res = x;
|
||||
__imag__ res = y;
|
||||
@ -1917,6 +1923,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
|
||||
y = (b - (a * ratio)) / denom;
|
||||
}
|
||||
|
||||
#ifdef INFINITY
|
||||
/* Recover infinities and zeros that computed as NaN+iNaN; the only cases
|
||||
are nonzero/zero, infinite/finite, and finite/infinite. */
|
||||
if (isnan (x) && isnan (y))
|
||||
@ -1941,6 +1948,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
|
||||
y = 0.0 * (b * c - a * d);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
__real__ res = x;
|
||||
__imag__ res = y;
|
||||
@ -1948,6 +1956,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
|
||||
}
|
||||
#endif /* complex divide */
|
||||
|
||||
#undef INFINITY
|
||||
#endif /* all complex float routines */
|
||||
|
||||
/* From here on down, the routines use normal data types. */
|
||||
|
4
external/gpl3/gcc/dist/gcc/tree-cfg.c
vendored
4
external/gpl3/gcc/dist/gcc/tree-cfg.c
vendored
@ -7092,7 +7092,8 @@ execute_warn_function_return (void)
|
||||
}
|
||||
if (location == UNKNOWN_LOCATION)
|
||||
location = cfun->function_end_locus;
|
||||
warning_at (location, 0, "%<noreturn%> function does return");
|
||||
if (warn_missing_noreturn)
|
||||
warning_at (location, 0, "%<noreturn%> function does return");
|
||||
}
|
||||
|
||||
/* If we see "return;" in some basic block, then we do reach the end
|
||||
@ -7294,4 +7295,3 @@ struct gimple_opt_pass pass_warn_unused_result =
|
||||
0, /* todo_flags_finish */
|
||||
}
|
||||
};
|
||||
|
||||
|
2
external/gpl3/gcc/dist/libcpp/Makefile.in
vendored
2
external/gpl3/gcc/dist/libcpp/Makefile.in
vendored
@ -141,7 +141,7 @@ $(srcdir)/config.in: @MAINT@ $(srcdir)/configure.ac
|
||||
localedir.h: localedir.hs; @true
|
||||
localedir.hs: Makefile
|
||||
echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
|
||||
$(srcdir)/../move-if-change localedir.new localedir.h
|
||||
$(SHELL) $(srcdir)/../move-if-change localedir.new localedir.h
|
||||
echo timestamp > localedir.hs
|
||||
|
||||
# Installation rules and other phony targets
|
||||
|
15
external/gpl3/gcc/dist/libcpp/files.c
vendored
15
external/gpl3/gcc/dist/libcpp/files.c
vendored
@ -30,6 +30,7 @@ along with this program; see the file COPYING3. If not see
|
||||
#include "obstack.h"
|
||||
#include "hashtab.h"
|
||||
#include "md5.h"
|
||||
#include "../gcc/defaults.h"
|
||||
#include <dirent.h>
|
||||
|
||||
/* Variable length record files on VMS will have a stat size that includes
|
||||
@ -219,20 +220,32 @@ static bool check_file_against_entries (cpp_reader *, _cpp_file *, bool);
|
||||
static bool
|
||||
open_file (_cpp_file *file)
|
||||
{
|
||||
const char *cpp_restricted;
|
||||
|
||||
GET_ENVIRONMENT(cpp_restricted, "CPP_RESTRICTED");
|
||||
|
||||
if (file->path[0] == '\0')
|
||||
{
|
||||
file->fd = 0;
|
||||
set_stdin_to_binary_mode ();
|
||||
}
|
||||
else
|
||||
file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY, 0666);
|
||||
file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY
|
||||
| (cpp_restricted != NULL) ? O_NONBLOCK : 0, 0666);
|
||||
|
||||
|
||||
if (file->fd != -1)
|
||||
{
|
||||
if (fstat (file->fd, &file->st) == 0)
|
||||
{
|
||||
if (!S_ISDIR (file->st.st_mode))
|
||||
if (cpp_restricted != NULL
|
||||
? S_ISREG (file->st.st_mode) : !S_ISDIR (file->st.st_mode))
|
||||
|
||||
{
|
||||
if (cpp_restricted)
|
||||
fcntl(file->fd, F_SETFL,
|
||||
fcntl(file->fd, F_GETFL, 0) & ~O_NONBLOCK);
|
||||
file->err_no = 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -674,6 +674,9 @@ extern void cpp_set_lang (cpp_reader *, enum c_lang);
|
||||
/* Set the include paths. */
|
||||
extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
|
||||
|
||||
/* Provide src:dst pair for __FILE__ remapping. */
|
||||
extern void add_cpp_remap_path (const char *);
|
||||
|
||||
/* Call these to get pointers to the options, callback, and deps
|
||||
structures for a given reader. These pointers are good until you
|
||||
call cpp_finish on that reader. You can either edit the callbacks
|
||||
|
2
external/gpl3/gcc/dist/libcpp/init.c
vendored
2
external/gpl3/gcc/dist/libcpp/init.c
vendored
@ -25,7 +25,9 @@ along with this program; see the file COPYING3. If not see
|
||||
#include "cpplib.h"
|
||||
#include "internal.h"
|
||||
#include "mkdeps.h"
|
||||
#ifdef ENABLE_NLS
|
||||
#include "localedir.h"
|
||||
#endif
|
||||
|
||||
static void init_library (void);
|
||||
static void mark_named_operators (cpp_reader *, int);
|
||||
|
3
external/gpl3/gcc/dist/libcpp/internal.h
vendored
3
external/gpl3/gcc/dist/libcpp/internal.h
vendored
@ -179,6 +179,9 @@ struct lexer_state
|
||||
/* Nonzero if first token on line is CPP_HASH. */
|
||||
unsigned char in_directive;
|
||||
|
||||
/* Nonzero if we are collecting macro arguments */
|
||||
unsigned char collecting_args;
|
||||
|
||||
/* Nonzero if in a directive that will handle padding tokens itself.
|
||||
#include needs this to avoid problems with computed include and
|
||||
spacing between tokens. */
|
||||
|
6
external/gpl3/gcc/dist/libcpp/lex.c
vendored
6
external/gpl3/gcc/dist/libcpp/lex.c
vendored
@ -1092,6 +1092,8 @@ save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from,
|
||||
{
|
||||
unsigned char *buffer;
|
||||
unsigned int len, clen;
|
||||
int convert_to_c = (pfile->state.in_directive || pfile->state.collecting_args)
|
||||
&& type == '/';
|
||||
|
||||
len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */
|
||||
|
||||
@ -1106,7 +1108,7 @@ save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from,
|
||||
|
||||
Note that the only time we encounter a directive here is
|
||||
when we are saving comments in a "#define". */
|
||||
clen = (pfile->state.in_directive && type == '/') ? len + 2 : len;
|
||||
clen = convert_to_c ? len + 2 : len;
|
||||
|
||||
buffer = _cpp_unaligned_alloc (pfile, clen);
|
||||
|
||||
@ -1118,7 +1120,7 @@ save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from,
|
||||
memcpy (buffer + 1, from, len - 1);
|
||||
|
||||
/* Finish conversion to a C comment, if necessary. */
|
||||
if (pfile->state.in_directive && type == '/')
|
||||
if (convert_to_c)
|
||||
{
|
||||
buffer[1] = '*';
|
||||
buffer[clen - 2] = '*';
|
||||
|
62
external/gpl3/gcc/dist/libcpp/macro.c
vendored
62
external/gpl3/gcc/dist/libcpp/macro.c
vendored
@ -111,6 +111,61 @@ static const char * const monthnames[] =
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
|
||||
static size_t remap_pairs;
|
||||
static char **remap_src;
|
||||
static char **remap_dst;
|
||||
|
||||
void
|
||||
add_cpp_remap_path (const char *arg)
|
||||
{
|
||||
const char *arg_dst;
|
||||
size_t len;
|
||||
|
||||
arg_dst = strchr(arg, ':');
|
||||
if (arg_dst == NULL) {
|
||||
fprintf(stderr, "Invalid argument for -iremap");
|
||||
exit(1);
|
||||
}
|
||||
len = arg_dst - arg;
|
||||
++arg_dst;
|
||||
|
||||
remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1));
|
||||
remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1));
|
||||
|
||||
remap_src[remap_pairs] = (char *) xmalloc(len + 1);
|
||||
memcpy(remap_src[remap_pairs], arg, len);
|
||||
remap_src[remap_pairs][len] = '\0';
|
||||
remap_dst[remap_pairs] = xstrdup(arg_dst);
|
||||
++remap_pairs;
|
||||
}
|
||||
|
||||
static const char *
|
||||
cpp_remap_file (const char *arg, char **tmp_name)
|
||||
{
|
||||
char *result;
|
||||
size_t i, len;
|
||||
|
||||
for (i = 0; i < remap_pairs; ++i) {
|
||||
len = strlen (remap_src[i]);
|
||||
if (strncmp (remap_src[i], arg, len))
|
||||
continue;
|
||||
if (arg[len] == '\0')
|
||||
return xstrdup (remap_dst[i]);
|
||||
if (arg[len] != '/')
|
||||
continue;
|
||||
arg += len;
|
||||
len = strlen (remap_dst[i]);
|
||||
result = (char *) xmalloc (len + strlen (arg) + 1);
|
||||
memcpy(result, remap_dst[i], len);
|
||||
strcpy(result + len, arg);
|
||||
*tmp_name = result;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
/* Helper function for builtin_macro. Returns the text generated by
|
||||
a builtin macro. */
|
||||
const uchar *
|
||||
@ -170,6 +225,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
|
||||
{
|
||||
unsigned int len;
|
||||
const char *name;
|
||||
char *tmp_name;
|
||||
uchar *buf;
|
||||
map = linemap_lookup (pfile->line_table, pfile->line_table->highest_line);
|
||||
|
||||
@ -177,12 +233,14 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
|
||||
while (! MAIN_FILE_P (map))
|
||||
map = INCLUDED_FROM (pfile->line_table, map);
|
||||
|
||||
name = map->to_file;
|
||||
tmp_name = NULL;
|
||||
name = cpp_remap_file (map->to_file, &tmp_name);
|
||||
len = strlen (name);
|
||||
buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
|
||||
result = buf;
|
||||
*buf = '"';
|
||||
buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len);
|
||||
free (tmp_name);
|
||||
*buf++ = '"';
|
||||
*buf = '\0';
|
||||
}
|
||||
@ -607,6 +665,7 @@ collect_args (cpp_reader *pfile, const cpp_hashnode *node,
|
||||
memset (args, 0, argc * sizeof (macro_arg));
|
||||
buff->cur = (unsigned char *) &args[argc];
|
||||
arg = args, argc = 0;
|
||||
pfile->state.collecting_args = 1;
|
||||
|
||||
/* Collect the tokens making up each argument. We don't yet know
|
||||
how many arguments have been supplied, whether too many or too
|
||||
@ -721,6 +780,7 @@ collect_args (cpp_reader *pfile, const cpp_hashnode *node,
|
||||
}
|
||||
}
|
||||
while (token->type != CPP_CLOSE_PAREN && token->type != CPP_EOF);
|
||||
pfile->state.collecting_args = 0;
|
||||
|
||||
if (token->type == CPP_EOF)
|
||||
{
|
||||
|
@ -473,7 +473,11 @@ floatformat_to_double (const struct floatformat *fmt,
|
||||
if (nan)
|
||||
dto = NAN;
|
||||
else
|
||||
#ifdef __vax__
|
||||
dto = HUGE_VAL;
|
||||
#else
|
||||
dto = INFINITY;
|
||||
#endif
|
||||
|
||||
if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1))
|
||||
dto = -dto;
|
||||
|
2
external/gpl3/gcc/dist/libiberty/strerror.c
vendored
2
external/gpl3/gcc/dist/libiberty/strerror.c
vendored
@ -347,7 +347,7 @@ static const struct error_info error_table[] =
|
||||
ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
|
||||
#endif
|
||||
#if defined (ENOPROTOOPT)
|
||||
ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
|
||||
ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"),
|
||||
#endif
|
||||
#if defined (EPROTONOSUPPORT)
|
||||
ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
|
||||
|
4
external/gpl3/gcc/dist/libobjc/hash.c
vendored
4
external/gpl3/gcc/dist/libobjc/hash.c
vendored
@ -151,8 +151,8 @@ objc_hash_add (cache_ptr *cachep, const void *key, void *value)
|
||||
(*cachep)->hash_func,
|
||||
(*cachep)->compare_func);
|
||||
|
||||
DEBUG_PRINTF ("Expanding cache %#x from %d to %d\n",
|
||||
(int) *cachep, (*cachep)->size, new->size);
|
||||
DEBUG_PRINTF ("Expanding cache %p from %d to %d\n",
|
||||
*cachep, (*cachep)->size, new->size);
|
||||
|
||||
/* Copy the nodes from the first hash table to the new one. */
|
||||
while ((node1 = objc_hash_next (*cachep, node1)))
|
||||
|
@ -42,17 +42,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
// NB: Offsets into ctype<char>::_M_table force a particular size
|
||||
// on the mask type. Because of this, we don't use an enum.
|
||||
typedef unsigned char mask;
|
||||
static const mask upper = _U;
|
||||
static const mask lower = _L;
|
||||
static const mask alpha = _U | _L;
|
||||
static const mask digit = _N;
|
||||
static const mask xdigit = _N | _X;
|
||||
static const mask space = _S;
|
||||
static const mask print = _P | _U | _L | _N | _B;
|
||||
static const mask graph = _P | _U | _L | _N;
|
||||
static const mask cntrl = _C;
|
||||
static const mask punct = _P;
|
||||
static const mask alnum = _U | _L | _N;
|
||||
static const mask upper = _CTYPE_U;
|
||||
static const mask lower = _CTYPE_L;
|
||||
static const mask alpha = _CTYPE_U | _CTYPE_L;
|
||||
static const mask digit = _CTYPE_N;
|
||||
static const mask xdigit = _CTYPE_N | _CTYPE_X;
|
||||
static const mask space = _CTYPE_S;
|
||||
static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B;
|
||||
static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
|
||||
static const mask cntrl = _CTYPE_C;
|
||||
static const mask punct = _CTYPE_P;
|
||||
static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N;
|
||||
};
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
@ -159,14 +159,51 @@ case "${host}" in
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
AC_SUBST(SECTION_FLAGS)
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
|
||||
AC_DEFINE(HAVE_ICONV)
|
||||
AC_DEFINE(HAVE_ICONV_CLOSE)
|
||||
AC_DEFINE(HAVE_ICONV_OPEN)
|
||||
AC_DEFINE(HAVE_LC_MESSAGES)
|
||||
|
||||
AC_DEFINE(HAVE_MMAP)
|
||||
AC_DEFINE(HAVE_GETPAGESIZE)
|
||||
AC_DEFINE(HAVE_SETENV)
|
||||
AC_DEFINE(HAVE_SIGSETJMP)
|
||||
|
||||
AC_DEFINE(HAVE_FINITEF)
|
||||
AC_DEFINE(HAVE_FINITE)
|
||||
AC_DEFINE(HAVE_FREXPF)
|
||||
AC_DEFINE(HAVE_HYPOT)
|
||||
AC_DEFINE(HAVE_HYPOTF)
|
||||
AC_DEFINE(HAVE_ISINF)
|
||||
AC_DEFINE(HAVE_ISINFF)
|
||||
AC_DEFINE(HAVE_ISNAN)
|
||||
AC_DEFINE(HAVE_ISNANF)
|
||||
AC_DEFINE(HAVE_ACOSF)
|
||||
AC_DEFINE(HAVE_ASINF)
|
||||
AC_DEFINE(HAVE_ATAN2F)
|
||||
AC_DEFINE(HAVE_ATANF)
|
||||
AC_DEFINE(HAVE_CEILF)
|
||||
AC_DEFINE(HAVE_COSF)
|
||||
AC_DEFINE(HAVE_COSHF)
|
||||
AC_DEFINE(HAVE_EXPF)
|
||||
AC_DEFINE(HAVE_FABSF)
|
||||
AC_DEFINE(HAVE_FLOORF)
|
||||
AC_DEFINE(HAVE_FMODF)
|
||||
AC_DEFINE(HAVE_FREXPF)
|
||||
AC_DEFINE(HAVE_LDEXPF)
|
||||
AC_DEFINE(HAVE_LOG10F)
|
||||
AC_DEFINE(HAVE_LOGF)
|
||||
AC_DEFINE(HAVE_MODF)
|
||||
AC_DEFINE(HAVE_MODFF)
|
||||
AC_DEFINE(HAVE_POWF)
|
||||
AC_DEFINE(HAVE_SINF)
|
||||
AC_DEFINE(HAVE_SINHF)
|
||||
AC_DEFINE(HAVE_SQRTF)
|
||||
AC_DEFINE(HAVE_STRTOF)
|
||||
AC_DEFINE(HAVE_STRTOLD)
|
||||
AC_DEFINE(HAVE_TANF)
|
||||
AC_DEFINE(HAVE_TANHF)
|
||||
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
||||
AC_DEFINE(HAVE_FINITEL)
|
||||
AC_DEFINE(HAVE_ISINFL)
|
||||
|
Loading…
Reference in New Issue
Block a user