Bug#336057: gcc-2.95: FTBFS [arm] gcc/config/arm/arm.c:556: error: invalid lvalue in assignment
Package: gcc-2.95
Severity: serious
Tags: patch
Justification: no longer builds from source
Now that gcc 4.0 is the default system compiler, gcc-2.95 ftbfs on
arm due to an 'invalid lvalue in assignment'. The attached patch
fixes this issue.
-- System Information:
Debian Release: testing/unstable
APT prefers stable
APT policy: (500, 'stable')
Architecture: armeb (armv4b)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
--- gcc-2.95-2.95.4.ds15/debian/rules.patch.orig 2005-10-27 18:03:41.000000000 +0200
+++ gcc-2.95-2.95.4.ds15/debian/rules.patch 2005-10-27 18:06:42.000000000 +0200
@@ -140,11 +140,11 @@
ifeq ($(DEB_HOST_ARCH),arm)
debian_patches += arm-pic arm-nested-func arm-various arm-exception \
arm-const-double arm-tune arm-output-int libgcc-umodsi3 \
- arm-profile
+ arm-profile arm-gcc4-fix
endif
all_patches += arm-pic arm-nested-func arm-various arm-exception \
arm-const-double arm-tune arm-output-int libgcc-umodsi3 \
- arm-profile
+ arm-profile arm-gcc4-fix
ifeq ($(DEB_HOST_ARCH),m68k)
debian_patches += 68060-build gcc-m68k-pic m68k-md m68k-reload g77-m68k-pic
--- gcc-2.95-2.95.4.ds15/debian/patches/arm-gcc4-fix.dpatch.orig 2005-10-27 18:03:26.000000000 +0200
+++ gcc-2.95-2.95.4.ds15/debian/patches/arm-gcc4-fix.dpatch 2005-10-27 18:06:34.000000000 +0200
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+
+# DP: gcc4 build fix for arm (invalid lvalue in assignment)
+
+src=gcc
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ src=$3/gcc
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 --fuzz 10 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 --fuzz 10 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/config/arm/arm.c.orig 2001-01-25 20:39:56.000000000 +0100
++++ gcc/config/arm/arm.c 2005-10-27 18:00:57.000000000 +0200
+@@ -527,7 +527,7 @@
+ if ((TARGET_SOFT_FLOAT || arm_fpu != FP_HARD) && (tune_flags & FL_MODE32) == 0)
+ flag_schedule_insns = flag_schedule_insns_after_reload = 0;
+
+- arm_prog_mode = TARGET_APCS_32 ? PROG_MODE_PROG32 : PROG_MODE_PROG26;
++ arm_prgmode = TARGET_APCS_32 ? PROG_MODE_PROG32 : PROG_MODE_PROG26;
+
+ if (structure_size_string != NULL)
+ {
Reply to: