aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/gcc/APKBUILD12
-rw-r--r--main/gcc/pr64037.patch83
2 files changed, 91 insertions, 4 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index ae0d5fff0b..33f19a88b2 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -8,7 +8,7 @@ _cross=""
&& _cross="-$CTARGET"
pkgname="$pkgname$_cross"
-pkgrel=2
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
@@ -16,7 +16,7 @@ license="GPL LGPL"
_gccrel=$pkgver-r$pkgrel
depends="binutils$_cross"
makedepends_build="paxctl bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev cloog-dev"
-makedepends_host="gmp-dev mpfr-dev mpc1-dev zlib-dev cloog-dev !libiconv-dev !gettext-dev"
+makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev cloog-dev !libiconv-dev !gettext-dev"
makedepends="$makedepends_build $makedepends_host"
subpackages=" "
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_cross"
@@ -178,6 +178,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
fix-gcj-iconv-musl.patch
musl-posix_memalign-c++.patch
pr63740.patch
+ pr64037.patch
gcc-4.8-build-args.patch
fix-cxxflags-passing.patch
@@ -604,7 +605,7 @@ gfortran() {
}
libgnat() {
- pkgdesc="GNU Ada 95 runtime shared libraries"
+ pkgdesc="GNU Ada runtime shared libraries"
depends=
CARCH="$CTARGET_ARCH"
@@ -613,7 +614,7 @@ libgnat() {
}
gnat() {
- pkgdesc="Ada 95 support for GCC"
+ pkgdesc="Ada support for GCC"
depends="gcc=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
@@ -662,6 +663,7 @@ a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch
e17bbb0fe802974e20645b4182b4c410 fix-gcj-iconv-musl.patch
4ec9d6c3ed7734811d9a8996dbc4884f musl-posix_memalign-c++.patch
c8968669baced4afc2550147a5e18cc6 pr63740.patch
+a89e2d822654beb96a4fe79099827a51 pr64037.patch
0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch
4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch
87684048ecaaf0e046983bc2782292dd fix-cxxflags-for-target.patch
@@ -708,6 +710,7 @@ f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.pat
51782c972ab828eb4ccb3ca3570341d025b2ae9a8e8fd8188cefb29c5f87401b fix-gcj-iconv-musl.patch
24d8dbbb7eb4cbf1bc9aa215c94482f76258d5ea67892a491de21f49eb68c028 musl-posix_memalign-c++.patch
eedd8697f42a3b01e6957676343cce486b16fe8b2e4d1f2926c43db391c743c1 pr63740.patch
+c1044420a06a6559ed9e575d9bb76b13ea4585a9ba23147aecb39e4aaf1e8915 pr64037.patch
bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch
a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch
a5678380e887dbf600c59273d382e81c10f89d28e422238a617d0a43ad5c5a69 fix-cxxflags-for-target.patch
@@ -754,6 +757,7 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
+efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
diff --git a/main/gcc/pr64037.patch b/main/gcc/pr64037.patch
new file mode 100644
index 0000000000..6b08a51172
--- /dev/null
+++ b/main/gcc/pr64037.patch
@@ -0,0 +1,83 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
+(changelog changes removed)
+
+From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun, 14 Dec 2014 16:07:03 +0000
+Subject: [PATCH] Pass unpromoted argument to promote_function_mode
+
+This patch updates setup_incoming_promotions in combine.c to match what
+is actually passed in assign_parm_setup_reg in function.c.
+
+Backported from mainline:
+
+gcc/
+
+ PR rtl-optimization/64037
+ * combine.c (setup_incoming_promotions): Pass the argument
+ before any promotions happen to promote_function_mode.
+
+gcc/testsuite/
+
+ PR rtl-optimization/64037
+ * g++.dg/pr64037.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/combine.c | 4 ++--
+ gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
+ 4 files changed, 46 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/pr64037.C
+
+diff --git a/gcc/combine.c b/gcc/combine.c
+index 7c00452..adea2c1 100644
+--- a/gcc/combine.c
++++ b/gcc/combine.c
+@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
+ uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
+
+ /* The mode and signedness of the argument as it is actually passed,
+- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
+- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
++ see assign_parm_setup_reg in function.c. */
++ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
+ TREE_TYPE (cfun->decl), 0);
+
+ /* The mode of the register in which the argument is being passed. */
+diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
+new file mode 100644
+index 0000000..e5cd0e2
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/pr64037.C
+@@ -0,0 +1,27 @@
++// { dg-do run { target i?86-*-* x86_64-*-* } }
++// { dg-options "-std=c++11 -Os" }
++
++enum class X : unsigned char {
++ V = 2,
++};
++
++static void
++__attribute__((noinline,noclone))
++foo(unsigned &out, unsigned a, X b)
++{
++ out = static_cast<unsigned>(b);
++}
++
++int main()
++{
++ unsigned deadbeef = 0xDEADBEEF;
++ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
++
++ unsigned out;
++ foo(out, 2, X::V);
++
++ if (out != 2)
++ __builtin_abort ();
++
++ return 0;
++}
+--
+1.7.1
+