diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/configure gcc4/configure
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/configure Thu Jun 24 14:06:37 2010
--- gcc4/configure Tue Jan 25 10:08:32 2011
*************** case "${target}" in
*** 3276,3282 ****
;;
*-*-netbsd*)
# Skip some stuff on all NetBSD configurations.
! noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
# Skip some stuff that's unsupported on some NetBSD configurations.
case "${target}" in
--- 3276,3282 ----
;;
*-*-netbsd*)
# Skip some stuff on all NetBSD configurations.
! noconfigdirs="$noconfigdirs target-newlib target-libgloss"
# Skip some stuff that's unsupported on some NetBSD configurations.
case "${target}" in
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/configure.ac gcc4/configure.ac
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/configure.ac Thu Jun 24 14:06:37 2010
--- gcc4/configure.ac Sun Jan 9 09:57:08 2011
*************** case "${target}" in
*** 513,519 ****
;;
*-*-netbsd*)
# Skip some stuff on all NetBSD configurations.
! noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
# Skip some stuff that's unsupported on some NetBSD configurations.
case "${target}" in
--- 513,519 ----
;;
*-*-netbsd*)
# Skip some stuff on all NetBSD configurations.
! noconfigdirs="$noconfigdirs target-newlib target-libgloss"
# Skip some stuff that's unsupported on some NetBSD configurations.
case "${target}" in
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/Makefile.in gcc4/gcc/Makefile.in
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/Makefile.in Wed Jun 30 06:26:17 2010
--- gcc4/gcc/Makefile.in Sun Jan 9 10:04:01 2011
*************** multilib.h: s-mlib; @true
*** 1880,1885 ****
--- 1880,1886 ----
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)" \
*************** s-fixinc_list : $(GCC_PASSES)
*** 3926,3932 ****
# 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/fixinc.sh
rm -rf include-fixed; mkdir include-fixed
-chmod a+rx include-fixed
--- 3927,3933 ----
# 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_exeext) \
$(build_objdir)/fixincludes/fixinc.sh
rm -rf include-fixed; mkdir include-fixed
-chmod a+rx include-fixed
*************** install-info:: doc installdirs \
*** 4389,4394 ****
--- 4390,4397 ----
lang.install-info
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
+ @echo "NOT REBUILDING $@"
+ NetBSD_DISABLED_info:
rm -f $@
if [ -f $< ]; then \
for f in $(<)*; do \
Only in gcc4/gcc: REVISION
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/c-opts.c gcc4/gcc/c-opts.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/c-opts.c Fri Apr 2 12:54:46 2010
--- gcc4/gcc/c-opts.c Sun Jan 9 10:13:08 2011
*************** c_common_missing_argument (const char *o
*** 160,171 ****
--- 160,173 ----
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;
*************** c_common_handle_option (size_t scode, co
*** 564,569 ****
--- 566,575 ----
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;
*************** c_common_handle_option (size_t scode, co
*** 879,884 ****
--- 885,894 ----
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;
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/c.opt gcc4/gcc/c.opt
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/c.opt Fri Apr 2 12:54:46 2010
--- gcc4/gcc/c.opt Sun Jan 9 18:42:21 2011
*************** ansi
*** 520,525 ****
--- 520,531 ----
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
Add 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?
*************** iquote
*** 904,909 ****
--- 910,919 ----
C ObjC C++ ObjC++ Joined Separate
-iquote Add to the end of the quote include path
+ iremap
+ C ObjC C++ ObjC++ Joined Separate
+ -iremap Convert to if it occurs as prefix in __FILE__.
+
iwithprefix
C ObjC C++ ObjC++ Joined Separate
-iwithprefix Add to the end of the system include path
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/cfgexpand.c gcc4/gcc/cfgexpand.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/cfgexpand.c Fri May 14 11:11:03 2010
--- gcc4/gcc/cfgexpand.c Sun Jan 9 10:18:34 2011
*************** stack_protect_classify_type (tree type)
*** 1081,1087 ****
else
len = tree_low_cst (TYPE_SIZE_UNIT (type), 1);
! if (len < max)
ret = SPCT_HAS_SMALL_CHAR_ARRAY | SPCT_HAS_ARRAY;
else
ret = SPCT_HAS_LARGE_CHAR_ARRAY | SPCT_HAS_ARRAY;
--- 1081,1089 ----
else
len = tree_low_cst (TYPE_SIZE_UNIT (type), 1);
! 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;
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/arm/t-arm gcc4/gcc/config/arm/t-arm
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/arm/t-arm Sun Jun 21 13:48:15 2009
--- gcc4/gcc/config/arm/t-arm Sun Jan 9 13:52:19 2011
*************** s-config s-conditions s-flags s-codes s-
*** 41,46 ****
--- 41,48 ----
$(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
Only in gcc4/gcc/config/i386: t-netbsd64
Only in gcc4/gcc/config/ia64: netbsd.h
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/m68k/m68k.md gcc4/gcc/config/m68k/m68k.md
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/m68k/m68k.md Wed Dec 30 15:03:46 2009
--- gcc4/gcc/config/m68k/m68k.md Sun Jan 9 16:34:00 2011
***************
*** 3116,3131 ****
;; 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].
(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 (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 ""
--- 3116,3148 ----
;; 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"
! [(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))))])]
"")
(define_insn ""
***************
*** 3156,3170 ****
"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 (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 ""
--- 3173,3199 ----
"mulu%.l %2,%3:%0")
(define_expand "mulsidi3"
! [(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))))])]
"")
(define_insn ""
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/mips/netbsd.h gcc4/gcc/config/mips/netbsd.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/mips/netbsd.h Thu Aug 2 03:49:31 2007
--- gcc4/gcc/config/mips/netbsd.h Sun Jan 9 16:45:17 2011
*************** along with GCC; see the file COPYING3.
*** 40,55 ****
if (TARGET_ABICALLS) \
builtin_define ("__ABICALLS__"); \
\
! if (mips_abi == ABI_EABI) \
! builtin_define ("__mips_eabi"); \
! else if (mips_abi == ABI_N32) \
builtin_define ("__mips_n32"); \
else if (mips_abi == ABI_64) \
builtin_define ("__mips_n64"); \
else if (mips_abi == ABI_O64) \
builtin_define ("__mips_o64"); \
} \
! while (0)
/* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD.
Specifically, they define too many namespace-invasive macros. Override
--- 40,102 ----
if (TARGET_ABICALLS) \
builtin_define ("__ABICALLS__"); \
\
! /* 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"); \
} \
! 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
*************** along with GCC; see the file COPYING3.
*** 105,110 ****
--- 152,162 ----
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) \
builtin_define ("__mips_hard_float"); \
*************** along with GCC; see the file COPYING3.
*** 148,157 ****
#undef LINK_SPEC
#define LINK_SPEC \
! "%{EL:-m elf32lmip} \
! %{EB:-m elf32bmip} \
%(endian_spec) \
! %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
%(netbsd_link_spec)"
--- 200,210 ----
#undef LINK_SPEC
#define LINK_SPEC \
! "%{EL:-m elf32ltsmip} \
! %{EB:-m elf32btsmip} \
%(endian_spec) \
! %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \
! %{mips32} %{mips32r2} %{mips64} %{mips64r2} \
%{bestGnum} %{call_shared} %{no_archive} %{exact_version} \
%(netbsd_link_spec)"
*************** along with GCC; see the file COPYING3.
*** 192,197 ****
--- 245,258 ----
/* Make gcc agree with */
+ #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"
Only in gcc4/gcc/config/mips: netbsd64.h
Only in gcc4/gcc/config/mips: t-netbsd64
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/netbsd-elf.h gcc4/gcc/config/netbsd-elf.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/netbsd-elf.h Mon Sep 3 09:14:04 2007
--- gcc4/gcc/config/netbsd-elf.h Sun Jan 9 13:46:32 2011
*************** along with GCC; see the file COPYING3.
*** 82,87 ****
--- 82,88 ----
#define NETBSD_LINK_SPEC_ELF \
"%{assert*} %{R*} %{rpath*} \
%{shared:-shared} \
+ %{symbolic:-Bsymbolic} \
%{!shared: \
-dc -dp \
%{!nostdlib: \
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/netbsd.h gcc4/gcc/config/netbsd.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/netbsd.h Tue Sep 22 08:11:37 2009
--- gcc4/gcc/config/netbsd.h Mon Jan 24 09:13:29 2011
*************** along with GCC; see the file COPYING3.
*** 46,51 ****
--- 46,54 ----
#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"
*************** along with GCC; see the file COPYING3.
*** 53,58 ****
--- 56,62 ----
#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 } \
}
*************** along with GCC; see the file COPYING3.
*** 69,74 ****
--- 73,87 ----
#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 */
*************** along with GCC; see the file COPYING3.
*** 97,102 ****
--- 110,116 ----
%{!pg:-lposix}} \
%{p:-lposix_p} \
%{pg:-lposix_p}} \
+ %{shared:-lc} \
%{!shared: \
%{!symbolic: \
%{!p: \
*************** along with GCC; see the file COPYING3.
*** 110,115 ****
--- 124,130 ----
%{!pg:-lposix}} \
%{p:-lposix_p} \
%{pg:-lposix_p}} \
+ %{shared:-lc} \
%{!shared: \
%{!symbolic: \
%{!p: \
*************** along with GCC; see the file COPYING3.
*** 121,144 ****
#undef LIB_SPEC
#define LIB_SPEC NETBSD_LIB_SPEC
! /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
! libgcc with -symbolic. */
! #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}}"
#endif
! #undef LIBGCC_SPEC
! #define LIBGCC_SPEC NETBSD_LIBGCC_SPEC
/* When building shared libraries, the initialization and finalization
functions for the library are .init and .fini respectively. */
--- 136,157 ----
#undef LIB_SPEC
#define LIB_SPEC NETBSD_LIB_SPEC
! /* Don't provide a LIBGCC_SPEC appropriate for NetBSD as the default
! is correct. In the --disabled-shared case -lgcc is perfect. */
! #if defined(NETBSD_TOOLS) || defined(NETBSD_NATIVE)
! #define LIBGCC_PICSUFFIX "_pic"
#endif
! /* 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. */
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/milli64.S gcc4/gcc/config/pa/milli64.S
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/milli64.S Thu Apr 9 08:00:19 2009
--- gcc4/gcc/config/pa/milli64.S Sun Jan 9 16:45:51 2011
*************** GSYM($$dyncall)
*** 221,227 ****
ldw 4(%r22),%r19 ; load new LTP value
ldw 0(%r22),%r22 ; load address of target
LSYM(1)
! #ifdef LINUX
bv %r0(%r22) ; branch to the real target
#else
ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22
--- 221,227 ----
ldw 4(%r22),%r19 ; load new LTP value
ldw 0(%r22),%r22 ; load address of target
LSYM(1)
! #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
Only in gcc4/gcc/config/pa: pa-netbsd.h
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/pa.c gcc4/gcc/config/pa/pa.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/pa.c Mon Jun 21 16:47:46 2010
--- gcc4/gcc/config/pa/pa.c Sun Jan 9 16:50:12 2011
*************** hppa_legitimize_address (rtx x, rtx oldx
*** 990,998 ****
|| GET_CODE (XEXP (x, 0)) == REG))
{
rtx int_part, ptr_reg;
! int newoffset;
! int offset = INTVAL (XEXP (x, 1));
! int mask;
mask = (GET_MODE_CLASS (mode) == MODE_FLOAT
? (INT14_OK_STRICT ? 0x3fff : 0x1f) : 0x3fff);
--- 990,998 ----
|| GET_CODE (XEXP (x, 0)) == REG))
{
rtx int_part, ptr_reg;
! 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);
*************** hppa_legitimize_address (rtx x, rtx oldx
*** 1046,1052 ****
|| GET_CODE (XEXP (x, 1)) == SUBREG)
&& GET_CODE (XEXP (x, 1)) != CONST)
{
! int val = INTVAL (XEXP (XEXP (x, 0), 1));
rtx reg1, reg2;
reg1 = XEXP (x, 1);
--- 1046,1052 ----
|| GET_CODE (XEXP (x, 1)) == SUBREG)
&& GET_CODE (XEXP (x, 1)) != CONST)
{
! HOST_WIDE_INT val = INTVAL (XEXP (XEXP (x, 0), 1));
rtx reg1, reg2;
reg1 = XEXP (x, 1);
*************** hppa_legitimize_address (rtx x, rtx oldx
*** 1125,1131 ****
&& 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));
val /= INTVAL (XEXP (XEXP (idx, 0), 1));
reg1 = XEXP (XEXP (idx, 0), 0);
--- 1125,1131 ----
&& INTVAL (XEXP (idx, 1)) % INTVAL (XEXP (XEXP (idx, 0), 1)) == 0)
{
/* Divide the CONST_INT by the scale factor, then add it to A. */
! HOST_WIDE_INT val = INTVAL (XEXP (idx, 1));
val /= INTVAL (XEXP (XEXP (idx, 0), 1));
reg1 = XEXP (XEXP (idx, 0), 0);
*************** hppa_legitimize_address (rtx x, rtx oldx
*** 1148,1154 ****
&& INTVAL (XEXP (idx, 1)) <= 4096
&& INTVAL (XEXP (idx, 1)) >= -4096)
{
! int val = INTVAL (XEXP (XEXP (idx, 0), 1));
rtx reg1, reg2;
reg1 = force_reg (Pmode, gen_rtx_PLUS (Pmode, base, XEXP (idx, 1)));
--- 1148,1154 ----
&& INTVAL (XEXP (idx, 1)) <= 4096
&& INTVAL (XEXP (idx, 1)) >= -4096)
{
! 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)));
*************** hppa_legitimize_address (rtx x, rtx oldx
*** 1232,1238 ****
&& 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));
rtx reg1, reg2;
reg1 = XEXP (x, 1);
--- 1232,1238 ----
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT
&& shadd_constant_p (INTVAL (XEXP (XEXP (x, 0), 1))))
{
! HOST_WIDE_INT val = INTVAL (XEXP (XEXP (x, 0), 1));
rtx reg1, reg2;
reg1 = XEXP (x, 1);
*************** find_addr_reg (rtx addr)
*** 2653,2660 ****
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]);
/* 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?) */
--- 2653,2660 ----
const char *
output_block_move (rtx *operands, int size_is_constant ATTRIBUTE_UNUSED)
{
! 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?) */
*************** static int
*** 2781,2788 ****
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 int n_insns = 0;
/* We can't move more than four bytes at a time because the PA
--- 2781,2788 ----
compute_movmem_length (rtx insn)
{
rtx pat = PATTERN (insn);
! 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
*************** compute_movmem_length (rtx insn)
*** 2817,2824 ****
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]);
/* We can't clear more than a word at a time because the PA
has no longer integer move insns. */
--- 2817,2824 ----
const char *
output_block_clear (rtx *operands, int size_is_constant ATTRIBUTE_UNUSED)
{
! 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. */
*************** static int
*** 2923,2930 ****
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 int n_insns = 0;
/* We can't clear more than a word at a time because the PA
--- 2923,2930 ----
compute_clrmem_length (rtx insn)
{
rtx pat = PATTERN (insn);
! 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
*************** pa_som_file_start (void)
*** 5340,5346 ****
static void
pa_linux_file_start (void)
{
! pa_file_start_file (1);
pa_file_start_level ();
pa_file_start_mcount ("CODE");
}
--- 5340,5346 ----
static void
pa_linux_file_start (void)
{
! pa_file_start_file (0);
pa_file_start_level ();
pa_file_start_mcount ("CODE");
}
*************** emit_hpdiv_const (rtx *operands, int uns
*** 5555,5561 ****
const char *
output_div_insn (rtx *operands, int unsignedp, rtx insn)
{
! int divisor;
/* If the divisor is a constant, try to use one of the special
opcodes .*/
--- 5555,5561 ----
const char *
output_div_insn (rtx *operands, int unsignedp, rtx insn)
{
! HOST_WIDE_INT divisor;
/* If the divisor is a constant, try to use one of the special
opcodes .*/
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/pa.h gcc4/gcc/config/pa/pa.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/pa/pa.h Sat Jul 3 13:38:04 2010
--- gcc4/gcc/config/pa/pa.h Sun Jan 9 16:50:37 2011
*************** extern int may_call_alloca;
*** 1195,1201 ****
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; \
rtx new_rtx, temp = NULL_RTX; \
\
mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \
--- 1195,1201 ----
There may be more opportunities to improve code with this hook. */
#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
do { \
! HOST_WIDE_INT offset, newoffset, mask; \
rtx new_rtx, temp = NULL_RTX; \
\
mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \
Only in gcc4/gcc/config/pa: pa32-netbsd.h
Only in gcc4/gcc/config/pa: t-netbsd
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/netbsd.h gcc4/gcc/config/rs6000/netbsd.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/netbsd.h Fri Feb 20 07:20:38 2009
--- gcc4/gcc/config/rs6000/netbsd.h Sun Jan 9 16:53:17 2011
***************
*** 19,24 ****
--- 19,40 ----
along with GCC; see the file COPYING3. If not see
. */
+ /* 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,63 ****
--- 74,90 ----
#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,91 ****
--- 113,139 ----
{ "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)");
Only in gcc4/gcc/config/rs6000: netbsd64.h
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/rs6000.c gcc4/gcc/config/rs6000/rs6000.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/rs6000.c Thu Jun 3 21:56:54 2010
--- gcc4/gcc/config/rs6000/rs6000.c Sun Jan 9 16:54:27 2011
*************** rs6000_override_options (const char *def
*** 2511,2517 ****
if (!rs6000_explicit_options.long_double)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
! #ifndef POWERPC_LINUX
if (!rs6000_explicit_options.ieee)
rs6000_ieeequad = 1;
#endif
--- 2511,2517 ----
if (!rs6000_explicit_options.long_double)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
! #if !defined(POWERPC_LINUX) && !defined(POWERPC_NETBSD)
if (!rs6000_explicit_options.ieee)
rs6000_ieeequad = 1;
#endif
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/sysv4.h gcc4/gcc/config/rs6000/sysv4.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/sysv4.h Wed Nov 25 12:23:20 2009
--- gcc4/gcc/config/rs6000/sysv4.h Sun Jan 9 16:58:43 2011
*************** do { \
*** 120,126 ****
--- 120,131 ----
else if (!strcmp (rs6000_abi_name, "gnu")) \
rs6000_current_abi = ABI_V4; \
else if (!strcmp (rs6000_abi_name, "netbsd")) \
+ { \
+ 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")) \
*************** SVR4_ASM_SPEC \
*** 620,625 ****
--- 625,631 ----
#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); \
*************** SVR4_ASM_SPEC \
*** 643,649 ****
%{msdata: -msdata=default} \
%{mno-sdata: -msdata=none} \
%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
! %{profile: -p}"
/* Don't put -Y P, for cross compilers. */
#ifndef CROSS_DIRECTORY_STRUCTURE
--- 649,656 ----
%{msdata: -msdata=default} \
%{mno-sdata: -msdata=none} \
%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
! %{profile: -p} \
! %(cc1_os_netbsd)"
/* Don't put -Y P, for cross compilers. */
#ifndef CROSS_DIRECTORY_STRUCTURE
*************** SVR4_ASM_SPEC \
*** 952,979 ****
-Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
/* NetBSD support. */
! #define LIB_NETBSD_SPEC "\
! %{profile:-lgmon -lc_p} %{!profile:-lc}"
! #define STARTFILE_NETBSD_SPEC "\
! ncrti.o%s crt0.o%s \
! %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
! #define ENDFILE_NETBSD_SPEC "\
! %{!shared:crtend.o%s} %{shared:crtendS.o%s} \
! ncrtn.o%s"
#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 CPP_OS_NETBSD_SPEC "\
-D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
/* 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}}}"
--- 959,981 ----
-Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
/* NetBSD support. */
! #define LIB_NETBSD_SPEC NETBSD_LIB_SPEC
! #define STARTFILE_NETBSD_SPEC NETBSD_STARTFILE_SPEC
! #define ENDFILE_NETBSD_SPEC NETBSD_ENDFILE_SPEC
#define LINK_START_NETBSD_SPEC "\
"
! #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}}}"
*************** ncrtn.o%s"
*** 1066,1071 ****
--- 1068,1074 ----
{ "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 }, \
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/t-netbsd gcc4/gcc/config/rs6000/t-netbsd
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/rs6000/t-netbsd Tue Apr 21 12:03:23 2009
--- gcc4/gcc/config/rs6000/t-netbsd Sun Jan 9 16:59:45 2011
***************
*** 18,32 ****
# along with GCC; see the file COPYING3. If not see
# .
! LIB2FUNCS_EXTRA = tramp.S
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
--- 18,29 ----
# along with GCC; see the file COPYING3. If not see
# .
! LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/tramp.asm
LIB2FUNCS_STATIC_EXTRA = crtsavfpr.S crtresfpr.S \
crtsavgpr.S crtresgpr.S \
crtresxfpr.S crtresxgpr.S
crtsavfpr.S: $(srcdir)/config/rs6000/crtsavfpr.asm
cat $(srcdir)/config/rs6000/crtsavfpr.asm >crtsavfpr.S
Only in gcc4/gcc/config/rs6000: t-netbsd64
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sh/t-netbsd gcc4/gcc/config/sh/t-netbsd
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sh/t-netbsd Sat Aug 22 14:43:07 2009
--- gcc4/gcc/config/sh/t-netbsd Sun Jan 9 17:01:00 2011
***************
*** 19,24 ****
--- 19,28 ----
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=
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sparc/netbsd-elf.h gcc4/gcc/config/sparc/netbsd-elf.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sparc/netbsd-elf.h Thu Aug 2 03:49:31 2007
--- gcc4/gcc/config/sparc/netbsd-elf.h Sun Jan 9 17:02:42 2011
*************** along with GCC; see the file COPYING3.
*** 112,118 ****
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
#undef SPARC_DEFAULT_CMODEL
! #define SPARC_DEFAULT_CMODEL CM_MEDANY
#endif
--- 112,118 ----
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
#undef SPARC_DEFAULT_CMODEL
! #define SPARC_DEFAULT_CMODEL CM_MEDLOW
#endif
*************** along with GCC; see the file COPYING3.
*** 132,140 ****
%{!mf934: \
%{!mv8*: \
%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
! %{!mno-vis:%{!mcpu=v9:-mvis}} \
! %{p:-mcmodel=medlow} \
! %{pg:-mcmodel=medlow}}"
#define CC1_SPEC64 \
"%{sun4:} %{target:} \
--- 132,139 ----
%{!mf934: \
%{!mv8*: \
%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
! %{!mno-vis:%{!mcpu=v9:-mvis}}" \
! NETBSD_CC1_AND_CC1PLUS_SPEC
#define CC1_SPEC64 \
"%{sun4:} %{target:} \
*************** along with GCC; see the file COPYING3.
*** 151,160 ****
%{!mf930: \
%{!mf934: \
%{!mv8*: \
! %{!msupersparc:-mcpu=cypress}}}}}}}} \
! %{!m32: \
! %{p:-mcmodel=medlow} \
! %{pg:-mcmodel=medlow}}"
/* Make sure we use the right output format. Pick a default and then
make sure -m32/-m64 switch to the right one. */
--- 150,157 ----
%{!mf930: \
%{!mf934: \
%{!mv8*: \
! %{!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. */
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sparc/t-netbsd64 gcc4/gcc/config/sparc/t-netbsd64
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config/sparc/t-netbsd64 Wed Sep 4 11:18:37 2002
--- gcc4/gcc/config/sparc/t-netbsd64 Sun Jan 9 17:03:26 2011
***************
*** 1,8 ****
! # 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 =
! #LIBGCC = stmp-multilib
! #INSTALL_LIBGCC = install-multilib
--- 1,9 ----
! # NetBSD has (will have) "non-native" libraries in /usr/lib/.
! # For NetBSD/sparc64 we thus have /usr/lib and /usr/lib/sparc.
! MULTILIB_OPTIONS = m64/m32
! MULTILIB_DIRNAMES = 64 32
! MULTILIB_OSDIRNAMES = . ../lib/sparc
!
! LIBGCC = stmp-multilib
! INSTALL_LIBGCC = install-multilib
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config.gcc gcc4/gcc/config.gcc
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/config.gcc Wed Jul 14 01:41:46 2010
--- gcc4/gcc/config.gcc Sun Jan 9 10:49:13 2011
*************** arm*-*-freebsd*)
*** 720,725 ****
--- 720,728 ----
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"
*************** hppa*-*-linux*)
*** 956,961 ****
--- 959,970 ----
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"
*************** i[34567]86-*-netbsd*)
*** 1128,1134 ****
;;
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"
;;
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"
--- 1137,1143 ----
;;
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-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"
*************** ia64*-*-elf*)
*** 1467,1472 ****
--- 1476,1487 ----
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"
*************** mips-sgi-irix[56]*)
*** 1732,1737 ****
--- 1747,1762 ----
"":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"
*************** powerpc*-*-freebsd*)
*** 1948,1957 ****
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"
tmake_file="${tmake_file} rs6000/t-netbsd"
! extra_options="${extra_options} rs6000/sysv4.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"
--- 1973,1991 ----
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"
! 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"
! ;;
! 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"
*************** sparc64-*-netbsd*)
*** 2488,2493 ****
--- 2522,2528 ----
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"
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/configure gcc4/gcc/configure
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/configure Mon Jun 14 03:38:18 2010
--- gcc4/gcc/configure Sun Jan 9 11:40:49 2011
*************** foo: .long 25
*** 22301,22307 ****
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
! sh-*-* | sh[34]-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
--- 22301,22307 ----
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
! sh-*-* | sh[34]-*-* | sh*l*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
*************** else
*** 24993,24999 ****
# 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*)
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
--- 24993,24999 ----
# 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* | *-*-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
*************** if test -n "$ac_unrecognized_opts" && te
*** 26923,26926 ****
{ $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
-
--- 26923,26925 ----
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/configure.ac gcc4/gcc/configure.ac
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/configure.ac Mon Jun 14 03:38:18 2010
--- gcc4/gcc/configure.ac Sun Jan 9 11:31:11 2011
*************** foo: .long 25
*** 2882,2888 ****
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
! sh-*-* | sh[34]-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
--- 2882,2888 ----
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
! sh-*-* | sh[34]-*-* | sh*l*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
*************** AC_CACHE_CHECK(__stack_chk_fail in targe
*** 4115,4121 ****
# 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*)
AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
[echo "no __stack_chk_fail on this target"])
;;
--- 4115,4121 ----
# 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* | *-*-netbsd*)
AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
[echo "no __stack_chk_fail on this target"])
;;
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cpp.texi gcc4/gcc/doc/cpp.texi
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cpp.texi Fri Apr 2 12:54:46 2010
--- gcc4/gcc/doc/cpp.texi Sun Jan 9 17:23:59 2011
*************** command line. If the same directory is
*** 1160,1165 ****
--- 1160,1168 ----
@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
*************** without notice.
*** 4348,4353 ****
--- 4351,4357 ----
@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{}]
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cppenv.texi gcc4/gcc/doc/cppenv.texi
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cppenv.texi Sat Jan 17 18:10:34 2004
--- gcc4/gcc/doc/cppenv.texi Sun Jan 9 17:24:37 2011
*************** main input file is omitted.
*** 80,83 ****
--- 80,96 ----
@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
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cppopts.texi gcc4/gcc/doc/cppopts.texi
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/cppopts.texi Fri Apr 2 12:54:46 2010
--- gcc4/gcc/doc/cppopts.texi Sun Jan 9 17:25:50 2011
*************** is applied to the standard system direct
*** 504,509 ****
--- 504,519 ----
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
*************** With both @option{-E} and @option{-fprep
*** 538,543 ****
--- 548,559 ----
@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}
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/gcov.texi gcc4/gcc/doc/gcov.texi
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/gcov.texi Fri Feb 20 07:20:38 2009
--- gcc4/gcc/doc/gcov.texi Sun Jan 9 17:26:23 2011
*************** gcov [@option{-v}|@option{--version}] [@
*** 128,135 ****
[@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{-u}|@option{--unconditional-branches}]
@c man end
@c man begin SEEALSO
gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
--- 128,136 ----
[@option{-l}|@option{--long-file-names}]
[@option{-p}|@option{--preserve-paths}]
[@option{-f}|@option{--function-summaries}]
! [@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}.
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/invoke.texi gcc4/gcc/doc/invoke.texi
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/doc/invoke.texi Tue Apr 6 07:02:22 2010
--- gcc4/gcc/doc/invoke.texi Sun Jan 9 17:33:17 2011
*************** Objective-C and Objective-C++ Dialects}.
*** 404,409 ****
--- 404,410 ----
-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
*************** Objective-C and Objective-C++ Dialects}.
*** 425,431 ****
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
! @gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
-specs=@var{file} -I- --sysroot=@var{dir}}
@item Target Options
--- 426,433 ----
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
! @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
*************** Furthermore, the prior value shall be re
*** 3246,3256 ****
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.
The standard is worded confusingly, therefore there is some debate
over the precise meaning of the sequence point rules in subtle cases.
--- 3248,3258 ----
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.
The standard is worded confusingly, therefore there is some debate
over the precise meaning of the sequence point rules in subtle cases.
*************** be searched for header files only for th
*** 8872,8877 ****
--- 8874,8885 ----
"@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
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/gcc.c gcc4/gcc/gcc.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/gcc.c Sun Apr 18 10:46:08 2010
--- gcc4/gcc/gcc.c Mon Jan 24 08:26:04 2011
*************** init_gcc_specs (struct obstack *obstack,
*** 1753,1767 ****
{
char *buf;
! buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, "}"
"%{!static:%{!static-libgcc:"
#if USE_LD_AS_NEEDED
"%{!shared-libgcc:",
static_name, " --as-needed ", shared_name, " --no-as-needed"
"}"
"%{shared-libgcc:",
shared_name, "%{!shared: ", static_name, "}"
"}"
#else
"%{!shared:"
"%{!shared-libgcc:", static_name, " ", eh_name, "}"
--- 1753,1787 ----
{
char *buf;
! 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, "}"
*************** init_gcc_specs (struct obstack *obstack,
*** 1770,1776 ****
#ifdef LINK_EH_SPEC
"%{shared:"
"%{shared-libgcc:", shared_name, "}"
! "%{!shared-libgcc:", static_name, "}"
"}"
#else
"%{shared:", shared_name, "}"
--- 1790,1800 ----
#ifdef LINK_EH_SPEC
"%{shared:"
"%{shared-libgcc:", shared_name, "}"
! "%{!shared-libgcc:", static_name,
! #ifdef LIBGCC_PICSUFFIX
! LIBGCC_PICSUFFIX,
! #endif
! "}"
"}"
#else
"%{shared:", shared_name, "}"
*************** process_command (int argc, const char **
*** 3629,3634 ****
--- 3653,3662 ----
/* 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);
*************** process_command (int argc, const char **
*** 3638,3643 ****
--- 3666,3672 ----
if (gcc_exec_prefix)
xputenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
}
+ #endif
else
{
/* make_relative_prefix requires a program name, but
*************** main (int argc, char **argv)
*** 6938,6943 ****
--- 6967,6973 ----
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)
*************** main (int argc, char **argv)
*** 6948,6953 ****
--- 6978,6984 ----
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. */
*************** main (int argc, char **argv)
*** 7085,7090 ****
--- 7116,7122 ----
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)
*************** main (int argc, char **argv)
*** 7095,7100 ****
--- 7127,7133 ----
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
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/gcc.h gcc4/gcc/gcc.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/gcc.h Sun Jan 3 09:03:38 2010
--- gcc4/gcc/gcc.h Sun Jan 9 11:57:54 2011
*************** struct spec_function
*** 50,55 ****
--- 50,56 ----
|| !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") \
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genemit.c gcc4/gcc/genemit.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genemit.c Fri Nov 27 03:37:06 2009
--- gcc4/gcc/genemit.c Sun Jan 9 11:59:40 2011
*************** gen_exp (rtx x, enum rtx_code subroutine
*** 250,258 ****
printf ("const_true_rtx");
else
{
! printf ("GEN_INT (");
! printf (HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
! printf (")");
}
return;
--- 250,258 ----
printf ("const_true_rtx");
else
{
! printf ("GEN_INT (HOST_WIDE_INT_CONSTANT (");
! printf (HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
! printf ("))");
}
return;
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genmultilib gcc4/gcc/genmultilib
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genmultilib Thu Jul 26 01:37:01 2007
--- gcc4/gcc/genmultilib Sun Jan 9 12:02:21 2011
*************** cd ./tmpmultilib.$$ || exit 1
*** 136,143 ****
# 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
# 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
--- 136,145 ----
# 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 <>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
*************** combinations=`initial=/ ./tmpmultilib ${
*** 172,179 ****
# If there exceptions, weed them out now
if [ -n "${exceptions}" ]; then
! cat >tmpmultilib2 <<\EOF
! #!/bin/sh
# 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.
--- 174,183 ----
# If there exceptions, weed them out now
if [ -n "${exceptions}" ]; then
! cat >tmpmultilib2 <>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.
*************** fi
*** 271,278 ****
# opt1/opt2 nopt1 nopt2
# In other words, we must output all combinations of matches.
rm -f tmpmultilib2
! cat >tmpmultilib2 <<\EOF
! #!/bin/sh
# The positional parameters are a list of matches to consider.
# ${dirout} is the directory name and ${optout} is the current list of
# options.
--- 275,284 ----
# opt1/opt2 nopt1 nopt2
# In other words, we must output all combinations of matches.
rm -f tmpmultilib2
! cat >tmpmultilib2 <>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.
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genrecog.c gcc4/gcc/genrecog.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/genrecog.c Mon Jun 22 03:29:13 2009
--- gcc4/gcc/genrecog.c Sun Jan 9 12:03:54 2011
*************** write_afterward (struct decision *start,
*** 1849,1859 ****
static void
print_host_wide_int (HOST_WIDE_INT val)
{
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);
else
! printf (HOST_WIDE_INT_PRINT_DEC_C, val);
}
/* Emit a switch statement, if possible, for an initial sequence of
--- 1849,1861 ----
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_CONSTANT (" HOST_WIDE_INT_PRINT_DEC ")-1)",
! val + 1);
else
! printf ("HOST_WIDE_INT_CONSTANT (" HOST_WIDE_INT_PRINT_DEC")", val);
}
/* Emit a switch statement, if possible, for an initial sequence of
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/ginclude/stddef.h gcc4/gcc/ginclude/stddef.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/ginclude/stddef.h Thu Apr 9 08:00:19 2009
--- gcc4/gcc/ginclude/stddef.h Sun Jan 9 17:34:15 2011
*************** see the files COPYING3 and COPYING.RUNTI
*** 52,59 ****
--- 52,61 ----
/* 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
#endif
+ #endif
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/hwint.h gcc4/gcc/hwint.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/hwint.h Wed Nov 25 02:55:54 2009
--- gcc4/gcc/hwint.h Sun Jan 9 12:06:38 2011
*************** extern char sizeof_long_long_must_be_8[s
*** 78,83 ****
--- 78,84 ----
#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
*************** extern char sizeof_long_long_must_be_8[s
*** 90,95 ****
--- 91,97 ----
#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"
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/libgcc2.c gcc4/gcc/libgcc2.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/libgcc2.c Thu Sep 24 12:02:44 2009
--- gcc4/gcc/libgcc2.c Sun Jan 9 12:11:09 2011
*************** NAME (TYPE x, int m)
*** 1802,1816 ****
--- 1802,1820 ----
#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
*************** CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b,
*** 1841,1846 ****
--- 1845,1851 ----
x = ac - bd;
y = ad + bc;
+ #ifdef INFINITY
if (isnan (x) && isnan (y))
{
/* Recover infinities that computed as NaN + iNaN. */
*************** CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b,
*** 1882,1887 ****
--- 1887,1893 ----
y = INFINITY * (a * d + b * c);
}
}
+ #endif
__real__ res = x;
__imag__ res = y;
*************** CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b,
*** 1917,1922 ****
--- 1923,1929 ----
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))
*************** CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b,
*** 1941,1946 ****
--- 1948,1954 ----
y = 0.0 * (b * c - a * d);
}
}
+ #endif
__real__ res = x;
__imag__ res = y;
*************** CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b,
*** 1948,1953 ****
--- 1956,1962 ----
}
#endif /* complex divide */
+ #undef INFINITY
#endif /* all complex float routines */
/* From here on down, the routines use normal data types. */
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/tree-cfg.c gcc4/gcc/tree-cfg.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/gcc/tree-cfg.c Fri Jul 2 02:59:19 2010
--- gcc4/gcc/tree-cfg.c Sun Jan 9 12:14:26 2011
*************** execute_warn_function_return (void)
*** 7091,7096 ****
--- 7091,7097 ----
}
if (location == UNKNOWN_LOCATION)
location = cfun->function_end_locus;
+ if (warn_missing_noreturn)
warning_at (location, 0, "% function does return");
}
*************** struct gimple_opt_pass pass_warn_unused_
*** 7293,7296 ****
0, /* todo_flags_finish */
}
};
-
--- 7294,7296 ----
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/Makefile.in gcc4/libcpp/Makefile.in
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/Makefile.in Sat Jul 31 02:34:58 2010
--- gcc4/libcpp/Makefile.in Sun Jan 9 17:34:49 2011
*************** $(srcdir)/config.in: @MAINT@ $(srcdir)/c
*** 141,147 ****
localedir.h: localedir.hs; @true
localedir.hs: Makefile
echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
! $(srcdir)/../move-if-change localedir.new localedir.h
echo timestamp > localedir.hs
# Installation rules and other phony targets
--- 141,147 ----
localedir.h: localedir.hs; @true
localedir.hs: Makefile
echo "#define LOCALEDIR \"$(localedir)\"" > localedir.new
! $(SHELL) $(srcdir)/../move-if-change localedir.new localedir.h
echo timestamp > localedir.hs
# Installation rules and other phony targets
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/files.c gcc4/libcpp/files.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/files.c Tue Sep 22 01:37:31 2009
--- gcc4/libcpp/files.c Sun Jan 9 18:39:54 2011
*************** along with this program; see the file CO
*** 30,35 ****
--- 30,36 ----
#include "obstack.h"
#include "hashtab.h"
#include "md5.h"
+ #include "../gcc/defaults.h"
#include
/* Variable length record files on VMS will have a stat size that includes
*************** static bool check_file_against_entries (
*** 219,238 ****
static bool
open_file (_cpp_file *file)
{
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);
if (file->fd != -1)
{
if (fstat (file->fd, &file->st) == 0)
{
if (!S_ISDIR (file->st.st_mode))
{
file->err_no = 0;
return true;
}
--- 220,251 ----
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
! | (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;
}
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/include/cpplib.h gcc4/libcpp/include/cpplib.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/include/cpplib.h Fri Nov 20 00:18:16 2009
--- gcc4/libcpp/include/cpplib.h Sun Jan 9 17:43:09 2011
*************** extern void cpp_set_lang (cpp_reader *,
*** 674,679 ****
--- 674,682 ----
/* 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
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/init.c gcc4/libcpp/init.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/init.c Thu Feb 11 11:49:17 2010
--- gcc4/libcpp/init.c Sun Jan 9 17:38:23 2011
*************** along with this program; see the file CO
*** 25,31 ****
--- 25,33 ----
#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);
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/internal.h gcc4/libcpp/internal.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/internal.h Mon Mar 29 13:07:29 2010
--- gcc4/libcpp/internal.h Sun Jan 9 17:39:22 2011
*************** struct lexer_state
*** 179,184 ****
--- 179,187 ----
/* 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. */
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/lex.c gcc4/libcpp/lex.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/lex.c Tue Apr 6 00:02:40 2010
--- gcc4/libcpp/lex.c Sun Jan 9 17:40:43 2011
*************** save_comment (cpp_reader *pfile, cpp_tok
*** 1090,1095 ****
--- 1090,1097 ----
{
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 '/'. */
*************** save_comment (cpp_reader *pfile, cpp_tok
*** 1104,1110 ****
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;
buffer = _cpp_unaligned_alloc (pfile, clen);
--- 1106,1112 ----
Note that the only time we encounter a directive here is
when we are saving comments in a "#define". */
! clen = convert_to_c ? len + 2 : len;
buffer = _cpp_unaligned_alloc (pfile, clen);
*************** save_comment (cpp_reader *pfile, cpp_tok
*** 1116,1122 ****
memcpy (buffer + 1, from, len - 1);
/* Finish conversion to a C comment, if necessary. */
! if (pfile->state.in_directive && type == '/')
{
buffer[1] = '*';
buffer[clen - 2] = '*';
--- 1118,1124 ----
memcpy (buffer + 1, from, len - 1);
/* Finish conversion to a C comment, if necessary. */
! if (convert_to_c)
{
buffer[1] = '*';
buffer[clen - 2] = '*';
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/macro.c gcc4/libcpp/macro.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libcpp/macro.c Fri Nov 20 00:18:16 2009
--- gcc4/libcpp/macro.c Sun Jan 9 18:39:14 2011
*************** static const char * const monthnames[] =
*** 111,116 ****
--- 111,171 ----
"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 *
*************** _cpp_builtin_macro_text (cpp_reader *pfi
*** 170,175 ****
--- 225,231 ----
{
unsigned int len;
const char *name;
+ char *tmp_name;
uchar *buf;
map = linemap_lookup (pfile->line_table, pfile->line_table->highest_line);
*************** _cpp_builtin_macro_text (cpp_reader *pfi
*** 177,188 ****
while (! MAIN_FILE_P (map))
map = INCLUDED_FROM (pfile->line_table, map);
! name = map->to_file;
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);
*buf++ = '"';
*buf = '\0';
}
--- 233,246 ----
while (! MAIN_FILE_P (map))
map = INCLUDED_FROM (pfile->line_table, map);
! 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';
}
*************** collect_args (cpp_reader *pfile, const c
*** 607,612 ****
--- 665,671 ----
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
*************** collect_args (cpp_reader *pfile, const c
*** 721,726 ****
--- 780,786 ----
}
}
while (token->type != CPP_CLOSE_PAREN && token->type != CPP_EOF);
+ pfile->state.collecting_args = 0;
if (token->type == CPP_EOF)
{
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libiberty/floatformat.c gcc4/libiberty/floatformat.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libiberty/floatformat.c Mon Nov 12 16:37:43 2007
--- gcc4/libiberty/floatformat.c Sun Jan 9 17:43:44 2011
*************** floatformat_to_double (const struct floa
*** 473,479 ****
--- 473,483 ----
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;
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libiberty/strerror.c gcc4/libiberty/strerror.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libiberty/strerror.c Sun Mar 27 17:28:01 2005
--- gcc4/libiberty/strerror.c Sun Jan 9 17:44:36 2011
*************** static const struct error_info error_tab
*** 347,353 ****
ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
#endif
#if defined (ENOPROTOOPT)
! ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
#endif
#if defined (EPROTONOSUPPORT)
ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
--- 347,353 ----
ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
#endif
#if defined (ENOPROTOOPT)
! ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"),
#endif
#if defined (EPROTONOSUPPORT)
ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/doc: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/doc/api: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/examples: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/external: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/external/jsr166: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/external/relaxngDatatype: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/external/sax: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/external/w3c_dom: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/gnu/classpath: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/gnu/java/locale: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/gnu/java/security: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/gnu/test: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/include: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/java/util: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/lib: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/fdlibm: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jawt: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/classpath: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/gconf-peer: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/gtk-peer: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/java-io: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/java-lang: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/java-net: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/java-nio: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/java-util: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/midi-alsa: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/midi-dssi: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/native-lib: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/qt-peer: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/jni/xmlj: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/native/plugin: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/resource: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/resource/META-INF/services: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/scripts: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/tools: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/vm: .cvsignore
Only in /home/mrg/gcc-update/gcc/gcc-4.5.1/libjava/classpath/vm/reference: .cvsignore
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libobjc/hash.c gcc4/libobjc/hash.c
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libobjc/hash.c Thu Apr 9 08:00:19 2009
--- gcc4/libobjc/hash.c Sun Jan 9 17:48:14 2011
*************** objc_hash_add (cache_ptr *cachep, const
*** 151,158 ****
(*cachep)->hash_func,
(*cachep)->compare_func);
! DEBUG_PRINTF ("Expanding cache %#x from %d to %d\n",
! (int) *cachep, (*cachep)->size, new->size);
/* Copy the nodes from the first hash table to the new one. */
while ((node1 = objc_hash_next (*cachep, node1)))
--- 151,158 ----
(*cachep)->hash_func,
(*cachep)->compare_func);
! 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)))
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h Thu Apr 9 08:00:19 2009
--- gcc4/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h Sun Jan 9 18:00:26 2011
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 42,58 ****
// NB: Offsets into ctype::_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;
};
_GLIBCXX_END_NAMESPACE
--- 42,58 ----
// NB: Offsets into ctype::_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 = _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
diff -rbwpc /home/mrg/gcc-update/gcc/gcc-4.5.1/libstdc++-v3/crossconfig.m4 gcc4/libstdc++-v3/crossconfig.m4
*** /home/mrg/gcc-update/gcc/gcc-4.5.1/libstdc++-v3/crossconfig.m4 Tue Jun 2 12:15:03 2009
--- gcc4/libstdc++-v3/crossconfig.m4 Sun Jan 9 17:59:02 2011
*************** case "${host}" in
*** 159,172 ****
--- 159,209 ----
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)