Bug 117322 - [patch] devel/arm-elf-gcc295 lvalue required
Summary: [patch] devel/arm-elf-gcc295 lvalue required
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 14:40 UTC by Pietro Cerutti
Modified: 2007-11-06 10:23 UTC (History)
0 users

See Also:


Attachments
file.diff (159 bytes, patch)
2007-10-19 14:40 UTC, Pietro Cerutti
no flags Details | Diff
file.diff (303 bytes, patch)
2007-10-19 14:40 UTC, Pietro Cerutti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti 2007-10-19 14:40:00 UTC
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.

Fix: *****************************
* Patch to Makefile:
*****************************
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:
*****************************
/* 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:
*****************************


-  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)
     {--ybKzG6RdUgvDTaDdreUFo6yYnQRS5HNnu3BK5gVjIR7gcMuu
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       2007-10-19 15:21:21.000000000 +0200
+++ Makefile    2007-10-19 15:24:50.000000000 +0200
@@ -55,7 +55,9 @@
How-To-Repeat: cd  /usr/ports/devel/arm-elf-gcc295 && make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-19 23:04:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Pietro Cerutti 2007-10-30 13:24:01 UTC
Note: this issue is only present with GCC > 4.1.

Maintainer feedback should arrive later this week.

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2007-11-04 22:43:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2007-11-06 10:23:20 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!