diff -u gcc-4.7-4.7.3/debian/rules.parameters gcc-4.7-4.7.3/debian/rules.parameters --- gcc-4.7-4.7.3/debian/rules.parameters +++ gcc-4.7-4.7.3/debian/rules.parameters @@ -2,15 +2,15 @@ GCC_VERSION := 4.7.3 NEXT_GCC_VERSION := 4.7.4 BASE_VERSION := 4.7 -SOURCE_VERSION := 4.7.3-1ubuntu1~12.04.1 -DEB_VERSION := 4.7.3-1ubuntu1~12.04.1 -DEB_EVERSION := 1:4.7.3-1ubuntu1~12.04.1 +SOURCE_VERSION := 4.7.3-2ubuntu1~12.04 +DEB_VERSION := 4.7.3-2ubuntu1~12.04 +DEB_EVERSION := 1:4.7.3-2ubuntu1~12.04 GDC_BASE_VERSION := DEB_GDC_VERSION := DEB_SOVERSION := 4.7 DEB_SOEVERSION := 1:4.7 DEB_LIBGCC_SOVERSION := -DEB_LIBGCC_VERSION := 1:4.7.3-1ubuntu1~12.04.1 +DEB_LIBGCC_VERSION := 1:4.7.3-2ubuntu1~12.04 DEB_STDCXX_SOVERSION := 4.7 DEB_GCJ_SOVERSION := 4.7 PKG_GCJ_EXT := 13 diff -u gcc-4.7-4.7.3/debian/rules.conf gcc-4.7-4.7.3/debian/rules.conf --- gcc-4.7-4.7.3/debian/rules.conf +++ gcc-4.7-4.7.3/debian/rules.conf @@ -314,6 +314,8 @@ ifneq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty)) GMP_BUILD_DEP = libgmp3-dev | libgmp-dev (>= 2:5.0.1~), MPFR_BUILD_DEP = libmpfr-dev, + GMP_BUILD_DEP = libgmp-dev (>= 2:5.0.1~), + MPFR_BUILD_DEP = libmpfr-dev (>= 3.0.0-9~), else GMP_BUILD_DEP = libgmp-dev (>= 2:5.0.1~), MPFR_BUILD_DEP = libmpfr-dev (>= 3.0.0-9~), diff -u gcc-4.7-4.7.3/debian/changelog gcc-4.7-4.7.3/debian/changelog --- gcc-4.7-4.7.3/debian/changelog +++ gcc-4.7-4.7.3/debian/changelog @@ -1,10 +1,30 @@ -gcc-4.7 (4.7.3-1ubuntu1~12.04.1) precise; urgency=low +gcc-4.7 (4.7.3-2ubuntu1~12.04) precise; urgency=low - * Upload for precise. + * PPA upload. + + -- Matthias Klose Sun, 21 Apr 2013 19:53:11 +0200 + +gcc-4.7 (4.7.3-2ubuntu1) raring; urgency=low + + * Merge with Debian; remaining changes: + - Build from upstream source. + * Re-enable Linaro changes which were reverted in 4.7.3-1ubuntu1. + + -- Matthias Klose Sun, 21 Apr 2013 19:24:42 +0200 + +gcc-4.7 (4.7.3-2) experimental; urgency=low + + * Update to SVN 20130421 (r198115) from the gcc-4_7-branch. + - Fix PR libstdc++/54847, PR debug/53453, PR target/56890 (sparc), + PR target/55487 (parisc), PR c++/56388, PR fortran/56994, + PR middle-end/56848, PR middle-end/56077, PR tree-optimization/48189. + * Use target specific names for libstdc++ baseline files. LP: #1168267. * Fix control file for builds without the x32 multilibs - * Don't build packages now built by gcc-4.8. + * Ignore the return value for dh_shlibdeps for builds on precise/ARM. + * In gnatlink, pass the options and libraries after objects to the + linker to avoid link failures with --as-needed. Addresses: #680292. - -- Matthias Klose Mon, 15 Apr 2013 19:20:43 +0200 + -- Matthias Klose Sun, 21 Apr 2013 14:54:57 +0200 gcc-4.7 (4.7.3-1ubuntu1) raring; urgency=low diff -u gcc-4.7-4.7.3/debian/rules.patch gcc-4.7-4.7.3/debian/rules.patch --- gcc-4.7-4.7.3/debian/rules.patch +++ gcc-4.7-4.7.3/debian/rules.patch @@ -14,7 +14,7 @@ debian_patches = \ $(if $(with_linaro_branch),gcc-linaro) \ - $(if $(with_linaro_branch),gcc-linaro-revert-vec) \ + svn-updates \ hjl-x32-gcc-4_7-branch \ # svn-updates$(if $(with_linaro_branch),-linaro) \ @@ -160,6 +160,8 @@ ada-s-taprop-gnu.adb endif + debian_patches += \ + ada-link-shlib endif ifeq (0,1) diff -u gcc-4.7-4.7.3/debian/rules.defs gcc-4.7-4.7.3/debian/rules.defs --- gcc-4.7-4.7.3/debian/rules.defs +++ gcc-4.7-4.7.3/debian/rules.defs @@ -340,8 +340,8 @@ # XXX: should with_common_libs be "yes" only if this is the default compiler # version on the targeted arch? -# currently, Debian experimental has gcc-4.8 too -ifeq ($(distribution),Debian) +# currently, Debian experimental has gcc-4.8 too (identifying as wheezy) +ifeq (,$(filter $(distrelease),etch lenny squeeze)) with_common_pkgs := with_common_libs := else ifeq (,$(filter $(distrelease),dapper hardy jaunty karmic lucid maverick oneiric precise quantal raring)) @@ -1600,6 +1600,12 @@ endef define cross_mangle_substvars endef + # precise's dh_shlibdeps doesn't work well for ARM multilibs + ifneq (,$(filter $(distrelease),precise)) + ifneq (,$(filter $(DEB_TARGET_ARCH), armel armhf)) + ignshld = - + endif + endif endif # takes a *list* of package names as $1, the multilib dirname as $2 diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libobjc.mk gcc-4.7-4.7.3/debian/rules.d/binary-libobjc.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libobjc.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libobjc.mk @@ -70,7 +70,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) -Xlibobjc_gc.so $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,$(subst objc$(OBJC_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) $(call cross_mangle_substvars,$(p_l)) $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \ diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libgomp.mk gcc-4.7-4.7.3/debian/rules.d/binary-libgomp.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libgomp.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libgomp.mk @@ -35,7 +35,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,$(subst gomp$(GOMP_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) $(call cross_mangle_substvars,$(p_l)) $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \ diff -u gcc-4.7-4.7.3/debian/rules.d/binary-snapshot.mk gcc-4.7-4.7.3/debian/rules.d/binary-snapshot.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-snapshot.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-snapshot.mk @@ -210,7 +210,7 @@ echo 'libgnarl-$(GNAT_SONAME) 1 ${p_snap} (>= $(DEB_VERSION))'; \ ) > debian/shlibs.local - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) \ dh_shlibdeps -p$(p_snap) -l$(CURDIR)/$(d_snap)/$(PF)/lib:$(CURDIR)/$(d_snap)/$(PF)/$(if $(filter $(DEB_TARGET_ARCH),amd64 ppc64),lib32,lib64):/usr/$(DEB_TARGET_GNU_TYPE)/lib -Xlibgcj-tools -Xlibmudflap -sed -i -e 's/$(p_snap)[^,]*, //g' debian/$(p_snap).substvars diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libgcc.mk gcc-4.7-4.7.3/debian/rules.d/binary-libgcc.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libgcc.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libgcc.mk @@ -264,7 +264,7 @@ ) $(if $(DEB_STAGE),, - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,,$(2)) ) $(call cross_mangle_substvars,$(p_l)) diff -u gcc-4.7-4.7.3/debian/rules.d/binary-go.mk gcc-4.7-4.7.3/debian/rules.d/binary-go.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-go.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-go.mk @@ -104,7 +104,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) - $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,$(subst go$(GO_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) $(call cross_mangle_substvars,$(p_l)) $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \ diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libmudflap.mk gcc-4.7-4.7.3/debian/rules.d/binary-libmudflap.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libmudflap.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libmudflap.mk @@ -46,7 +46,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) -V '$(p_l) (>= $(DEB_SOVERSION))' $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,,$(2)) $(call cross_mangle_substvars,$(p_l)) $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \ diff -u gcc-4.7-4.7.3/debian/rules.d/binary-fortran.mk gcc-4.7-4.7.3/debian/rules.d/binary-fortran.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-fortran.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-fortran.mk @@ -102,7 +102,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search, \ $(subst gfortran$(FORTRAN_SONAME),gcc$(GCC_SONAME),$(p_l)) \ $(subst gfortran$(FORTRAN_SONAME),gcc$(QUADMATH_SONAME),$(p_l)) \ diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libstdcxx.mk gcc-4.7-4.7.3/debian/rules.d/binary-libstdcxx.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libstdcxx.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libstdcxx.mk @@ -198,7 +198,7 @@ $(cross_makeshlibs) dh_makeshlibs -p$(p_l) || echo FIXME: libstdc++ symbols $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) $(call cross_mangle_substvars,$(p_l)) @@ -240,7 +240,7 @@ rm -f $(d_d)/$(usr_lib$(2))/debug/libstdc++_pic.a ) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_d) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_d) \ $(call shlibdirs_to_search,$(subst $(pkg_ver),,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l))),$(2)) $(call cross_mangle_substvars,$(p_d)) @@ -442,11 +442,11 @@ dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg) # XXX: what about biarchn32? #ifeq ($(biarch64),yes) -# DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib64 +# $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib64 #else -# DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib32/debug +# $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib32/debug #endif - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) $(call cross_mangle_substvars,$(p_dbg)) $(cross_gencontrol) dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \ -- -v$(DEB_VERSION) $(common_substvars) diff -u gcc-4.7-4.7.3/debian/rules.d/binary-libitm.mk gcc-4.7-4.7.3/debian/rules.d/binary-libitm.mk --- gcc-4.7-4.7.3/debian/rules.d/binary-libitm.mk +++ gcc-4.7-4.7.3/debian/rules.d/binary-libitm.mk @@ -35,7 +35,7 @@ dh_fixperms -p$(p_l) -p$(p_d) $(cross_makeshlibs) dh_makeshlibs -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) - DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ + $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,,$(2)) $(call cross_mangle_substvars,$(p_l)) $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \ reverted: --- gcc-4.7-4.7.3/debian/patches/gcc-linaro-revert-vec.diff +++ gcc-4.7-4.7.3.orig/debian/patches/gcc-linaro-revert-vec.diff @@ -1,288 +0,0 @@ -# DP: # Revert the partial backport Vectorizer Cost Model for ARM. - ---- a/src/ChangeLog.linaro.orig 2013-04-11 14:16:51.000000000 +0200 -+++ b/src/ChangeLog.linaro 2013-04-11 15:21:17.888948595 +0200 -@@ -59,21 +59,6 @@ - - Merge from FSF GCC 4.7.3 (svn branches/gcc-4_7-branch 197188). - --2013-04-03 Christophe Lyon -- -- Partial backport from mainline r195977: -- 2013-02-12 Christophe Lyon -- -- * config/arm/arm-protos.h (struct cpu_vec_costs): New struct type. -- (struct tune_params): Add vec_costs field. -- * config/arm/arm.c (arm_builtin_vectorization_cost): New function. -- (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Define. -- (arm_default_vec_cost): New struct of type cpu_vec_costs. -- (arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune) -- (arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune) -- (arm_cortex_a15_tune, arm_cortex_a5_tune, arm_cortex_a9_tune) -- (arm_v6m_tune, arm_fa726te_tune): Define new vec_costs field. -- - 2013-04-02 Christophe Lyon - - Backport from mainline r196876: ---- a/src/gcc/config/arm/arm.c.orig 2013-04-11 14:30:23.000000000 +0200 -+++ b/src/gcc/config/arm/arm.c 2013-04-11 15:20:31.324637033 +0200 -@@ -274,11 +274,6 @@ - static bool arm_vectorize_vec_perm_const_ok (enum machine_mode vmode, - const unsigned char *sel); - -- --static int arm_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, -- tree vectype, -- int misalign ATTRIBUTE_UNUSED); -- - - /* Table of machine attributes. */ - static const struct attribute_spec arm_attribute_table[] = -@@ -632,10 +627,6 @@ - #define TARGET_VECTORIZE_VEC_PERM_CONST_OK \ - arm_vectorize_vec_perm_const_ok - --#undef TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST --#define TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST \ -- arm_builtin_vectorization_cost -- - struct gcc_target targetm = TARGET_INITIALIZER; - - /* Obstack for minipool constant handling. */ -@@ -886,23 +877,6 @@ - l1_size, \ - l1_line_size - --/* arm generic vectorizer costs. */ --static const --struct cpu_vec_costs arm_default_vec_cost = { -- 1, /* scalar_stmt_cost. */ -- 1, /* scalar load_cost. */ -- 1, /* scalar_store_cost. */ -- 1, /* vec_stmt_cost. */ -- 1, /* vec_to_scalar_cost. */ -- 1, /* scalar_to_vec_cost. */ -- 1, /* vec_align_load_cost. */ -- 1, /* vec_unalign_load_cost. */ -- 1, /* vec_unalign_store_cost. */ -- 1, /* vec_store_cost. */ -- 3, /* cond_taken_branch_cost. */ -- 1, /* cond_not_taken_branch_cost. */ --}; -- - const struct tune_params arm_slowmul_tune = - { - arm_slowmul_rtx_costs, -@@ -912,9 +886,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_fastmul_tune = -@@ -926,9 +899,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - /* StrongARM has early execution of branches, so a sequence that is worth -@@ -943,9 +915,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_xscale_tune = -@@ -957,9 +928,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_9e_tune = -@@ -971,9 +941,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_v6t2_tune = -@@ -985,9 +954,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - false, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - /* Generic Cortex tuning. Use more specific tunings if appropriate. */ -@@ -1000,9 +968,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - false, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - /* Branches can be dual-issued on Cortex-A5, so conditional execution is -@@ -1017,9 +984,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - false, /* Prefer constant pool. */ - arm_cortex_a5_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_cortex_a9_tune = -@@ -1031,9 +997,8 @@ - ARM_PREFETCH_BENEFICIAL(4,32,32), - false, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - const struct tune_params arm_fa726te_tune = -@@ -1045,9 +1010,8 @@ - ARM_PREFETCH_NOT_BENEFICIAL, - true, /* Prefer constant pool. */ - arm_default_branch_cost, -- false, /* Prefer Neon for -+ false /* Prefer Neon for - 64-bits bitops. */ -- &arm_default_vec_cost, /* Vectorizer costs. */ - }; - - -@@ -8740,63 +8704,6 @@ - } - - --/* Vectorizer cost model implementation. */ -- --/* Implement targetm.vectorize.builtin_vectorization_cost. */ --static int --arm_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, -- tree vectype, -- int misalign ATTRIBUTE_UNUSED) --{ -- unsigned elements; -- -- switch (type_of_cost) -- { -- case scalar_stmt: -- return current_tune->vec_costs->scalar_stmt_cost; -- -- case scalar_load: -- return current_tune->vec_costs->scalar_load_cost; -- -- case scalar_store: -- return current_tune->vec_costs->scalar_store_cost; -- -- case vector_stmt: -- return current_tune->vec_costs->vec_stmt_cost; -- -- case vector_load: -- return current_tune->vec_costs->vec_align_load_cost; -- -- case vector_store: -- return current_tune->vec_costs->vec_store_cost; -- -- case vec_to_scalar: -- return current_tune->vec_costs->vec_to_scalar_cost; -- -- case scalar_to_vec: -- return current_tune->vec_costs->scalar_to_vec_cost; -- -- case unaligned_load: -- return current_tune->vec_costs->vec_unalign_load_cost; -- -- case unaligned_store: -- return current_tune->vec_costs->vec_unalign_store_cost; -- -- case cond_branch_taken: -- return current_tune->vec_costs->cond_taken_branch_cost; -- -- case cond_branch_not_taken: -- return current_tune->vec_costs->cond_not_taken_branch_cost; -- -- case vec_perm: -- case vec_promote_demote: -- return current_tune->vec_costs->vec_stmt_cost; -- -- default: -- gcc_unreachable (); -- } --} -- - /* Return true if and only if this insn can dual-issue only as older. */ - static bool - cortexa7_older_only (rtx insn) ---- a/src/gcc/config/arm/arm-protos.h.orig 2013-04-11 14:16:51.415157268 +0200 -+++ b/src/gcc/config/arm/arm-protos.h 2013-04-11 15:20:31.320637006 +0200 -@@ -225,27 +225,6 @@ - - extern void arm_order_regs_for_local_alloc (void); - --/* Vectorizer cost model implementation. */ --struct cpu_vec_costs { -- const int scalar_stmt_cost; /* Cost of any scalar operation, excluding -- load and store. */ -- const int scalar_load_cost; /* Cost of scalar load. */ -- const int scalar_store_cost; /* Cost of scalar store. */ -- const int vec_stmt_cost; /* Cost of any vector operation, excluding -- load, store, vector-to-scalar and -- scalar-to-vector operation. */ -- const int vec_to_scalar_cost; /* Cost of vect-to-scalar operation. */ -- const int scalar_to_vec_cost; /* Cost of scalar-to-vector operation. */ -- const int vec_align_load_cost; /* Cost of aligned vector load. */ -- const int vec_unalign_load_cost; /* Cost of unaligned vector load. */ -- const int vec_unalign_store_cost; /* Cost of unaligned vector load. */ -- const int vec_store_cost; /* Cost of vector store. */ -- const int cond_taken_branch_cost; /* Cost of taken branch for vectorizer -- cost model. */ -- const int cond_not_taken_branch_cost;/* Cost of not taken branch for -- vectorizer cost model. */ --}; -- - #ifdef RTX_CODE - /* This needs to be here because we need RTX_CODE and similar. */ - -@@ -264,8 +243,6 @@ - int (*branch_cost) (bool, bool); - /* Prefer Neon for 64-bit bitops. */ - bool prefer_neon_for_64bits; -- /* Vectorizer costs. */ -- const struct cpu_vec_costs* vec_costs; - }; - - extern const struct tune_params *current_tune; diff -u gcc-4.7-4.7.3/debian/patches/svn-updates.diff gcc-4.7-4.7.3/debian/patches/svn-updates.diff --- gcc-4.7-4.7.3/debian/patches/svn-updates.diff +++ gcc-4.7-4.7.3/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 4.7 branch upto 20130404 (r197476). +# DP: updates from the 4.7 branch upto 20130421 (r198115). last_updated() { cat > ${dir}LAST_UPDATED < ++ ++ Backport from mainline ++ ++ 2012-10-10 Jack Howarth ++ Jonathan Wakely ++ ++ PR libstdc++/54847 ++ * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP ++ and _GLIBCXX_USE_SCHED_YIELD. ++ * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment. ++ ++2013-04-15 Rainer Orth ++ ++ * testsuite/30_threads/condition_variable/members/53841.cc: Add ++ -std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../branches/gcc-4_7-branch) +@@ -1,5 +1,5 @@ + // { dg-do compile } +-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } } ++// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } } + // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } + // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } + // { dg-require-cstdint "" } +Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h +=================================================================== +--- a/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../branches/gcc-4_7-branch) +@@ -42,4 +42,9 @@ + // Static initializer macro is buggy in darwin, see libstdc++/51906 + #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC + ++// Configure checks for nanosleep fail on Darwin, but nanosleep and ++// sched_yield are always available, so use them. ++#define _GLIBCXX_USE_NANOSLEEP 1 ++#define _GLIBCXX_USE_SCHED_YIELD 1 ++ + #endif +Index: libstdc++-v3/acinclude.m4 +=================================================================== +--- a/src/libstdc++-v3/acinclude.m4 (.../tags/gcc_4_7_3_release) ++++ b/src/libstdc++-v3/acinclude.m4 (.../branches/gcc-4_7-branch) +@@ -1132,6 +1132,11 @@ + dnl --disable-libstdcxx-time + dnl disables the checks completely + dnl ++dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX ++dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test ++dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in ++dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD. ++dnl + AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ + + AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) +Index: libgcc/ChangeLog +=================================================================== +--- a/src/libgcc/ChangeLog (.../tags/gcc_4_7_3_release) ++++ b/src/libgcc/ChangeLog (.../branches/gcc-4_7-branch) +@@ -1,3 +1,10 @@ ++2013-04-11 Julian Brown ++ ++ * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS) ++ (SUBWORD_TEST_AND_SET): Use signed char/short types instead of ++ unsigned char/unsigned short. ++ (__sync_val_compare_and_swap_{1,2}): Handle signed argument. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: libgcc/config/arm/linux-atomic.c +=================================================================== +--- a/src/libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) ++++ b/src/libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) +@@ -97,19 +97,19 @@ + return (RETURN & mask) >> shift; \ + } + +-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval) ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) + +-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval) ++SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval) + + #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ + int HIDDEN \ +@@ -132,19 +132,19 @@ + OP_AND_FETCH_WORD (xor, , ^) + OP_AND_FETCH_WORD (nand, ~, &) + +-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval) ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) + +-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval) +-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval) ++SUBWORD_SYNC_OP (add, , +, signed char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, signed char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, signed char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval) + + int HIDDEN + __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) +@@ -181,7 +181,7 @@ + actual_oldval = *wordptr; \ + \ + if (__builtin_expect (((actual_oldval & mask) >> shift) != \ +- (unsigned int) oldval, 0)) \ ++ ((unsigned int) oldval & MASK_##WIDTH), 0)) \ + return (actual_oldval & mask) >> shift; \ + \ + actual_newval = (actual_oldval & ~mask) \ +@@ -195,8 +195,8 @@ + } \ + } + +-SUBWORD_VAL_CAS (unsigned short, 2) +-SUBWORD_VAL_CAS (unsigned char, 1) ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (signed char, 1) + + typedef unsigned char bool; + +@@ -217,8 +217,8 @@ + return (oldval == actual_oldval); \ + } + +-SUBWORD_BOOL_CAS (unsigned short, 2) +-SUBWORD_BOOL_CAS (unsigned char, 1) ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (signed char, 1) + + void HIDDEN + __sync_synchronize (void) +@@ -260,8 +260,8 @@ + return (oldval & mask) >> shift; \ + } + +-SUBWORD_TEST_AND_SET (unsigned short, 2) +-SUBWORD_TEST_AND_SET (unsigned char, 1) ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (signed char, 1) + + #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ + void HIDDEN \ +Index: gcc/target.def +=================================================================== +--- a/src/gcc/target.def (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/target.def (.../branches/gcc-4_7-branch) +@@ -2758,6 +2758,13 @@ + bool, false) + + DEFHOOKPOD ++(force_at_comp_dir, ++ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \ ++ compilation unit. This attribute is required for the darwin linker \ ++ to emit debug information.", ++ bool, false) ++ ++DEFHOOKPOD + (delay_sched2, "True if sched2 is not to be run at its normal place. \ + This usually means it will be run as part of machine-specific reorg.", + bool, false) +Index: gcc/DATESTAMP +=================================================================== +--- a/src/gcc/DATESTAMP (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch) +@@ -1 +1 @@ +-20130411 ++20130421 +Index: gcc/ChangeLog +=================================================================== +--- a/src/gcc/ChangeLog (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/ChangeLog (.../branches/gcc-4_7-branch) +@@ -1,3 +1,75 @@ ++2013-04-21 Eric Botcazou ++ ++ * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism. ++ ++2013-04-19 Matthias Klose ++ ++ PR middle-end/56848 ++ Re-apply ++ 2013-04-01 Andrey Belevantsev ++ ++ Backport from mainline ++ 2013-02-25 Andrey Belevantsev ++ Alexander Monakov ++ ++ PR middle-end/56077 ++ * sched-deps.c (sched_analyze_insn): When reg_pending_barrier, ++ flush pending lists also on non-jumps. Adjust comment. ++ ++ Backport from 4.8: ++ 2012-08-27 Maxim Kuvyrkov ++ ++ * sched-deps.c (add_dependence_list_and_free): Simplify. ++ (flush_pending_list_and_free): Fix a hack that was fixing a hack. Free ++ lists when add_dependence_list_and_free doesn't free them. ++ ++2013-04-19 Marek Polacek ++ ++ Backport from mainline ++ 2013-01-08 Steven Bosscher ++ Jakub Jelinek ++ ++ PR tree-optimization/48189 ++ * predict.c (predict_loops): If max is 0, don't call compare_tree_int. ++ If nitercst is 0, don't predict the exit edge. ++ ++2013-04-16 Jack Howarth ++ ++ Backport from mainline ++ 2012-05-29 Jack Howarth ++ * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o ++ on Darwin >= 12. ++ (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12. ++ ++ ++ 2012-05-29 Jack Howarth ++ PR debug/53453 ++ * doc/tm.texi: Update. ++ * doc/tm.texi.in (SDB and DWARF) : Add @hook. ++ * target.def (force_at_comp_dir): New hook. ++ * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define. ++ * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir. ++ ++2013-04-15 Eric Botcazou ++ ++ PR target/56890 ++ * config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value. ++ (S_MODES): Set H_MODE bit. ++ (SF_MODES): Set only S_MODE and SF_MODE bits. ++ (DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits. ++ (sparc_init_modes) : Set H_MODE bit for sub-word modes. ++ : Do not set SF_MODE for sub-word modes. ++ : Likewise. ++ ++2013-04-13 John David Anglin ++ ++ Backport from mainline: ++ 2013-04-06 John David Anglin ++ ++ PR target/55487 ++ * config/pa/pa.c (legitimize_pic_address): Before incrementing label ++ nuses, make sure we have a label. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: gcc/testsuite/gcc.dg/pr56890-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr56890-2.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.dg/pr56890-2.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,19 @@ ++/* PR target/56890 */ ++/* Reported by Rainer Jung */ ++ ++/* { dg-do assemble } */ ++/* { dg-options "-O" } */ ++ ++unsigned int buggy(unsigned int min, unsigned int max) ++{ ++ unsigned int number; ++ if (max < 16384) { ++ unsigned short num16; ++ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); ++ return num16; ++ } ++ else { ++ (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0))); ++ } ++ return number; ++} +Index: gcc/testsuite/gcc.dg/pr48189.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr48189.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.dg/pr48189.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,13 @@ ++/* PR tree-optimization/48189 */ ++/* { dg-do compile } */ ++/* { dg-options "-O --param max-predicted-iterations=0" } */ ++ ++struct S { int s[8]; }; ++ ++void ++foo (int *x, struct S *y) ++{ ++ int i; ++ for (i = 0; y[i].s[i]; i++) ++ *x++ = y[i].s[i]; ++} +Index: gcc/testsuite/gcc.dg/torture/pr53922.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/torture/pr53922.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.dg/torture/pr53922.c (.../branches/gcc-4_7-branch) +@@ -1,6 +1,7 @@ + /* { dg-do run } */ + /* { dg-require-weak "" } */ +-/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */ ++/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */ ++/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */ + + int x(int a) + { +Index: gcc/testsuite/gcc.dg/pr56890-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr56890-1.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/gcc.dg/pr56890-1.c (.../branches/gcc-4_7-branch) +@@ -0,0 +1,15 @@ ++/* PR target/56890 */ ++/* Reported by Rainer Jung */ ++ ++/* { dg-do assemble } */ ++/* { dg-options "-O2" } */ ++ ++unsigned int buggy(unsigned int min, unsigned int max) ++{ ++ if (max < 16384) { ++ unsigned short num16 = 0; ++ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); ++ return num16; ++ } ++ return 0; ++} +Index: gcc/testsuite/ChangeLog +=================================================================== +--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) +@@ -1,3 +1,22 @@ ++2013-04-19 Marek Polacek ++ ++ Backport from mainline ++ 2013-01-08 Steven Bosscher ++ Jakub Jelinek ++ ++ PR tree-optimization/48189 ++ * gcc.dg/pr48189.c: New test. ++ ++2013-04-15 Rainer Orth ++ ++ * gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*. ++ Remove dg-skip-if default args. ++ ++2013-04-15 Eric Botcazou ++ ++ * gcc.dg/pr56890-1.c: New test. ++ * gcc.dg/pr56890-2.c: Likewise. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../branches/gcc-4_7-branch) +@@ -0,0 +1,14 @@ ++// PR c++/56388 ++// { dg-require-effective-target c++11 } ++ ++int main() ++{ ++ bool /*const*/ condition = false; ++ ++ [&]{ ++ try{} ++ catch(...){ ++ if(condition){} ++ } ++ }(); ++} +Index: gcc/cp/ChangeLog +=================================================================== +--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) +@@ -1,3 +1,13 @@ ++2013-04-21 Eric Botcazou ++ ++ * parser.c (cp_parser_late_return_type_opt): Fix C++ism. ++ ++2013-04-15 Jason Merrill ++ ++ PR c++/56388 ++ * semantics.c (insert_capture_proxy): Just use index 1 in the ++ stmt_list_stack. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: gcc/cp/semantics.c +=================================================================== +--- a/src/gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/semantics.c (.../branches/gcc-4_7-branch) +@@ -8959,13 +8959,12 @@ + insert_capture_proxy (tree var) + { + cp_binding_level *b; +- int skip; + tree stmt_list; + + /* Put the capture proxy in the extra body block so that it won't clash + with a later local variable. */ + b = current_binding_level; +- for (skip = 0; ; ++skip) ++ for (;;) + { + cp_binding_level *n = b->level_chain; + if (n->kind == sk_function_parms) +@@ -8976,8 +8975,7 @@ + + /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ + var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); +- stmt_list = VEC_index (tree, stmt_list_stack, +- VEC_length (tree, stmt_list_stack) - 1 - skip); ++ stmt_list = VEC_index (tree, stmt_list_stack, 1); + gcc_assert (stmt_list); + append_to_statement_list_force (var, &stmt_list); + } +Index: gcc/cp/parser.c +=================================================================== +--- a/src/gcc/cp/parser.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cp/parser.c (.../branches/gcc-4_7-branch) +@@ -16691,7 +16691,7 @@ + cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) + { + cp_token *token; +- tree type; ++ tree type, save_ccp, save_ccr; + + /* Peek at the next token. */ + token = cp_lexer_peek_token (parser->lexer); +@@ -16702,8 +16702,8 @@ + /* Consume the ->. */ + cp_lexer_consume_token (parser->lexer); + +- tree save_ccp = current_class_ptr; +- tree save_ccr = current_class_ref; ++ save_ccp = current_class_ptr; ++ save_ccr = current_class_ref; + if (quals >= 0) + { + /* DR 1207: 'this' is in scope in the trailing return type. */ +Index: gcc/dwarf2out.c +=================================================================== +--- a/src/gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/dwarf2out.c (.../branches/gcc-4_7-branch) +@@ -22538,7 +22538,7 @@ + /* Add the name for the main input file now. We delayed this from + dwarf2out_init to avoid complications with PCH. */ + add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); +- if (!IS_ABSOLUTE_PATH (filename)) ++ if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) + add_comp_dir_attribute (comp_unit_die ()); + else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) + { +Index: gcc/predict.c +=================================================================== +--- a/src/gcc/predict.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/predict.c (.../branches/gcc-4_7-branch) +@@ -983,7 +983,8 @@ + if (TREE_CODE (niter) == INTEGER_CST) + { + if (host_integerp (niter, 1) +- && compare_tree_int (niter, max-1) == -1) ++ && max ++ && compare_tree_int (niter, max - 1) == -1) + nitercst = tree_low_cst (niter, 1) + 1; + else + nitercst = max; +@@ -1005,6 +1006,11 @@ + else + continue; + ++ /* If the prediction for number of iterations is zero, do not ++ predict the exit edges. */ ++ if (nitercst == 0) ++ continue; ++ + probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst); + predict_edge (ex, predictor, probability); + } +Index: gcc/fortran/ChangeLog +=================================================================== +--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) +@@ -1,3 +1,8 @@ ++2013-04-18 Tobias Burnus ++ ++ PR fortran/56994 ++ * invoke.texi (NEAREST): S argument is not optional. ++ + 2013-04-11 Release Manager + + * GCC 4.7.3 released. +Index: gcc/cfgexpand.c +=================================================================== +--- a/src/gcc/cfgexpand.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/cfgexpand.c (.../branches/gcc-4_7-branch) +@@ -3646,6 +3646,8 @@ + avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth) + { + rtx exp = *exp_p; ++ const char *format_ptr; ++ int i, j; + + if (exp == NULL_RTX) + return; +@@ -3668,8 +3670,7 @@ + return; + } + +- const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); +- int i, j; ++ format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); + for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) + switch (*format_ptr++) + { +Index: gcc/sched-deps.c +=================================================================== +--- a/src/gcc/sched-deps.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/sched-deps.c (.../branches/gcc-4_7-branch) +@@ -1563,24 +1563,15 @@ + add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp, + int uncond, enum reg_note dep_type) + { +- rtx list, next; ++ add_dependence_list (insn, *listp, uncond, dep_type); + + /* We don't want to short-circuit dependencies involving debug + insns, because they may cause actual dependencies to be + disregarded. */ + if (deps->readonly || DEBUG_INSN_P (insn)) +- { +- add_dependence_list (insn, *listp, uncond, dep_type); +- return; +- } ++ return; + +- for (list = *listp, *listp = NULL; list ; list = next) +- { +- next = XEXP (list, 1); +- if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0))) +- add_dependence (insn, XEXP (list, 0), dep_type); +- free_INSN_LIST_node (list); +- } ++ free_INSN_LIST_list (listp); + } + + /* Remove all occurences of INSN from LIST. Return the number of +@@ -1764,6 +1755,15 @@ + add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1, + REG_DEP_ANTI); + ++ if (DEBUG_INSN_P (insn)) ++ { ++ if (for_write) ++ free_INSN_LIST_list (&deps->pending_read_insns); ++ free_INSN_LIST_list (&deps->pending_write_insns); ++ free_INSN_LIST_list (&deps->last_pending_memory_flush); ++ free_INSN_LIST_list (&deps->pending_jump_insns); ++ } ++ + if (!deps->readonly) + { + free_EXPR_LIST_list (&deps->pending_write_mems); +@@ -3262,9 +3262,9 @@ + SET_REGNO_REG_SET (&deps->reg_last_in_use, i); + } + +- /* Flush pending lists on jumps, but not on speculative checks. */ +- if (JUMP_P (insn) && !(sel_sched_p () +- && sel_insn_is_speculation_check (insn))) ++ /* Don't flush pending lists on speculative checks for ++ selective scheduling. */ ++ if (!sel_sched_p () || !sel_insn_is_speculation_check (insn)) + flush_pending_lists (deps, insn, true, true); + + reg_pending_barrier = NOT_A_BARRIER; +Index: gcc/config/sparc/sparc.c +=================================================================== +--- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-4_7-branch) +@@ -4207,13 +4207,14 @@ + mapped into one sparc_mode_class mode. */ + + enum sparc_mode_class { +- S_MODE, D_MODE, T_MODE, O_MODE, ++ H_MODE, S_MODE, D_MODE, T_MODE, O_MODE, + SF_MODE, DF_MODE, TF_MODE, OF_MODE, + CC_MODE, CCFP_MODE + }; + + /* Modes for single-word and smaller quantities. */ +-#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) ++#define S_MODES \ ++ ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE)) + + /* Modes for double-word and smaller quantities. */ + #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) +@@ -4224,13 +4225,11 @@ + /* Modes for 8-word and smaller quantities. */ + #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE)) + +-/* Modes for single-float quantities. We must allow any single word or +- smaller quantity. This is because the fix/float conversion instructions +- take integer inputs/outputs from the float registers. */ +-#define SF_MODES (S_MODES) ++/* Modes for single-float quantities. */ ++#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) + + /* Modes for double-float and smaller quantities. */ +-#define DF_MODES (D_MODES) ++#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) + + /* Modes for quad-float and smaller quantities. */ + #define TF_MODES (DF_MODES | (1 << (int) TF_MODE)) +@@ -4326,7 +4325,9 @@ + case MODE_INT: + case MODE_PARTIAL_INT: + case MODE_COMPLEX_INT: +- if (GET_MODE_SIZE (i) <= 4) ++ if (GET_MODE_SIZE (i) < 4) ++ sparc_mode_class[i] = 1 << (int) H_MODE; ++ else if (GET_MODE_SIZE (i) == 4) + sparc_mode_class[i] = 1 << (int) S_MODE; + else if (GET_MODE_SIZE (i) == 8) + sparc_mode_class[i] = 1 << (int) D_MODE; +@@ -4338,14 +4339,16 @@ + sparc_mode_class[i] = 0; + break; + case MODE_VECTOR_INT: +- if (GET_MODE_SIZE (i) <= 4) +- sparc_mode_class[i] = 1 << (int)SF_MODE; ++ if (GET_MODE_SIZE (i) == 4) ++ sparc_mode_class[i] = 1 << (int) SF_MODE; + else if (GET_MODE_SIZE (i) == 8) +- sparc_mode_class[i] = 1 << (int)DF_MODE; ++ sparc_mode_class[i] = 1 << (int) DF_MODE; ++ else ++ sparc_mode_class[i] = 0; + break; + case MODE_FLOAT: + case MODE_COMPLEX_FLOAT: +- if (GET_MODE_SIZE (i) <= 4) ++ if (GET_MODE_SIZE (i) == 4) + sparc_mode_class[i] = 1 << (int) SF_MODE; + else if (GET_MODE_SIZE (i) == 8) + sparc_mode_class[i] = 1 << (int) DF_MODE; +Index: gcc/config/darwin.h +=================================================================== +--- a/src/gcc/config/darwin.h (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/darwin.h (.../branches/gcc-4_7-branch) +@@ -356,7 +356,9 @@ + %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ + %{!static:%{object:-lgcrt0.o} \ + %{!object:%{preload:-lgcrt0.o} \ +- %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \ ++ %{!preload:-lgcrt1.o \ ++ %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \ ++ %(darwin_crt2)}}}} \ + %{!pg:%{static:-lcrt0.o} \ + %{!static:%{object:-lcrt0.o} \ + %{!object:%{preload:-lcrt0.o} \ +@@ -379,7 +381,7 @@ + #define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \ ++ %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \ + %{fgnu-tm: -lcrttms.o}" + + /* Default Darwin ASM_SPEC, very simple. */ +@@ -414,6 +416,8 @@ + + #define TARGET_WANT_DEBUG_PUB_SECTIONS true + ++#define TARGET_FORCE_AT_COMP_DIR true ++ + /* When generating stabs debugging, use N_BINCL entries. */ + + #define DBX_USE_BINCL +Index: gcc/config/pa/pa.c +=================================================================== +--- a/src/gcc/config/pa/pa.c (.../tags/gcc_4_7_3_release) ++++ b/src/gcc/config/pa/pa.c (.../branches/gcc-4_7-branch) +@@ -790,7 +790,9 @@ + /* Extract CODE_LABEL. */ + orig = XEXP (orig, 0); + add_reg_note (insn, REG_LABEL_OPERAND, orig); +- LABEL_NUSES (orig)++; ++ /* Make sure we have label and not a note. */ ++ if (LABEL_P (orig)) ++ LABEL_NUSES (orig)++; + } + crtl->uses_pic_offset_table = 1; + return reg; only in patch2: unchanged: --- gcc-4.7-4.7.3.orig/debian/patches/ada-link-shlib.diff +++ gcc-4.7-4.7.3/debian/patches/ada-link-shlib.diff @@ -0,0 +1,85 @@ +# DP: In gnatlink, pass the options and libraries after objects to the +# DP: linker to avoid link failures with --as-needed. Closes: #680292. + +--- a/src/gcc/ada/mlib-tgt-specific-linux.adb ++++ b/src/gcc/ada/mlib-tgt-specific-linux.adb +@@ -81,19 +81,54 @@ + Version_Arg : String_Access; + Symbolic_Link_Needed : Boolean := False; + ++ N_Options : Argument_List := Options; ++ Options_Last : Natural := N_Options'Last; ++ -- After moving -lxxx to Options_2, N_Options up to index Options_Last ++ -- will contain the Options to pass to MLib.Utl.Gcc. ++ ++ Real_Options_2 : Argument_List (1 .. Options'Length); ++ Real_Options_2_Last : Natural := 0; ++ -- Real_Options_2 up to index Real_Options_2_Last will contain the ++ -- Options_2 to pass to MLib.Utl.Gcc. ++ + begin + if Opt.Verbose_Mode then + Write_Str ("building relocatable shared library "); + Write_Line (Lib_Path); + end if; + ++ -- Move all -lxxx to Options_2 ++ ++ declare ++ Index : Natural := N_Options'First; ++ Arg : String_Access; ++ ++ begin ++ while Index <= Options_Last loop ++ Arg := N_Options (Index); ++ ++ if Arg'Length > 2 ++ and then Arg (Arg'First .. Arg'First + 1) = "-l" ++ then ++ Real_Options_2_Last := Real_Options_2_Last + 1; ++ Real_Options_2 (Real_Options_2_Last) := Arg; ++ N_Options (Index .. Options_Last - 1) := ++ N_Options (Index + 1 .. Options_Last); ++ Options_Last := Options_Last - 1; ++ ++ else ++ Index := Index + 1; ++ end if; ++ end loop; ++ end; ++ + if Lib_Version = "" then + Utl.Gcc + (Output_File => Lib_Path, + Objects => Ofiles, +- Options => Options, ++ Options => N_Options (N_Options'First .. Options_Last), + Driver_Name => Driver_Name, +- Options_2 => No_Argument_List); ++ Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); + + else + declare +@@ -111,18 +146,18 @@ + Utl.Gcc + (Output_File => Lib_Version, + Objects => Ofiles, +- Options => Options & Version_Arg, ++ Options => N_Options (N_Options'First .. Options_Last) & Version_Arg, + Driver_Name => Driver_Name, +- Options_2 => No_Argument_List); ++ Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); + Symbolic_Link_Needed := Lib_Version /= Lib_Path; + + else + Utl.Gcc + (Output_File => Lib_Dir & Directory_Separator & Lib_Version, + Objects => Ofiles, +- Options => Options & Version_Arg, ++ Options => N_Options (N_Options'First .. Options_Last) & Version_Arg, + Driver_Name => Driver_Name, +- Options_2 => No_Argument_List); ++ Options_2 => Real_Options_2 (1 .. Real_Options_2_Last)); + Symbolic_Link_Needed := + Lib_Dir & Directory_Separator & Lib_Version /= Lib_Path; + end if;