ports/117322: [patch] devel/arm-elf-gcc-295 lvalue required
Pietro Cerutti
gahr at gahr.ch
Fri Oct 19 13:40:01 UTC 2007
>Number: 117322
>Category: ports
>Synopsis: [patch] devel/arm-elf-gcc-295 lvalue required
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 19 13:40:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release: 6.2-STABLE
>Organization:
Bern University of Applied Sciences
>Environment:
FreeBSD gahrtop.localhost 6.2-STABLE FreeBSD 6.2-STABLE #36: Mon Oct 8 14:09:32 CEST 2007 root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 i386
>Description:
In gcc/config/arm/arm.c:530 the following instruction
arm_prog_mode = TARGET_APCS_32 ? PROG_MODE_PROG32 : PROG_MODE_PROG26;
fails to compile because arm_prog_mode is defined as
#define arm_prog_mode ((enum attr_prog_mode) arm_prgmode)
in gcc/config/arm/arm.h:426
This patch, together with ports/117320, brings back the port to a compilable state.
>How-To-Repeat:
cd /usr/ports/devel/arm-elf-gcc295 && make
>Fix:
*****************************
* Patch to Makefile:
*****************************
--- Makefile.orig 2007-10-19 15:21:21.000000000 +0200
+++ Makefile 2007-10-19 15:24:50.000000000 +0200
@@ -55,7 +55,9 @@
post-patch:
@(cd ${PATCH_WRKSRC} && ${PATCH} < ${PATCHDIR}/libiberty-strerror.c && \
- ${PATCH} < ${PATCHDIR}/libiberty-strsignal.c)
+ ${PATCH} < ${PATCHDIR}/libiberty-strsignal.c && \
+ ${PATCH} < ${PATCHDIR}/gcc-config-arm-arm.h && \
+ ${PATCH} < ${PATCHDIR}/gcc-config-arm-arm.c)
post-configure:
${REINPLACE_CMD} -Ee 's,^(TARGET_CONFIGDIRS\s*=),\1#,' \
*****************************
* files/gcc-config-arm-arm.h:
*****************************
--- gcc/config/arm/arm.h.orig 2007-10-19 15:18:18.000000000 +0200
+++ gcc/config/arm/arm.h 2007-10-19 15:18:35.000000000 +0200
@@ -423,7 +423,7 @@
};
/* Recast the program mode class to be the prog_mode attribute */
-#define arm_prog_mode ((enum attr_prog_mode) arm_prgmode)
+#define arm_prog_mode arm_prgmode
extern enum prog_mode_type arm_prgmode;
*****************************
* files/gcc-config-arm-arm.c:
*****************************
--- gcc/config/arm/arm.c.orig 2007-10-19 15:15:52.000000000 +0200
+++ gcc/config/arm/arm.c 2007-10-19 15:18:48.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_prog_mode = (enum attr_prog_mode) (TARGET_APCS_32 ? PROG_MODE_PROG32 : PROG_MODE_PROG26);
if (structure_size_string != NULL)
{
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list