- Fix build with gcc 4.2

PR:		117320
		117322
Submitted by:	Pietro Cerutti <gahr@gahr.ch>
		James E. Flemer <jflemer@alum.rpi.edu> (maintainer)
Approved by:	portmgr (pav)
This commit is contained in:
Martin Wilke 2007-11-06 10:23:03 +00:00
parent f9c0753735
commit 8f21fec38e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202539
4 changed files with 23 additions and 19 deletions

View file

@ -41,10 +41,6 @@ MAN1= ${PKGNAMEPREFIX}g++.1 ${PKGNAMEPREFIX}gcc.1 cccp.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 700042
BROKEN= Does not compile with GCC 4.2
.endif
.if !defined(DEFAULT_CPU)
pre-extract:
@${ECHO}
@ -54,8 +50,7 @@ pre-extract:
.endif
post-patch:
@(cd ${PATCH_WRKSRC} && ${PATCH} < ${PATCHDIR}/libiberty-strerror.c && \
${PATCH} < ${PATCHDIR}/libiberty-strsignal.c)
${REINPLACE_CMD} -e 's/sys_nsig/iberty_sys_nsig/g' ${WRKSRC}/libiberty/strsignal.c
post-configure:
${REINPLACE_CMD} -Ee 's,^(TARGET_CONFIGDIRS\s*=),\1#,' \

View file

@ -1,11 +0,0 @@
--- libiberty/strsignal.c.orig Sat Oct 25 06:10:58 2003
+++ libiberty/strsignal.c Sat Oct 25 06:13:09 2003
@@ -244,7 +244,7 @@
#else
#ifdef NSIG
-static int sys_nsig = NSIG;
+static __const int sys_nsig = NSIG;
#else
#ifdef _NSIG
static int sys_nsig = _NSIG;

View file

@ -0,0 +1,20 @@
--- gcc/config/arm/arm.c.orig Thu Jan 25 07:03:24 2001
+++ gcc/config/arm/arm.c Fri Nov 2 20:35:20 2007
@@ -281,7 +281,7 @@
if (ptr->string != NULL && ptr->string[0] != '\0')
{
- struct processors * sel;
+ const struct processors * sel;
for (sel = ptr->processors; sel->name != NULL; sel ++)
if (streq (ptr->string, sel->name))
@@ -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)
{

View file

@ -1,5 +1,5 @@
--- libiberty/strerror.c.orig Sat Oct 25 06:08:26 2003
+++ libiberty/strerror.c Sat Oct 25 06:08:35 2003
--- libiberty/strerror.c.orig Fri May 15 17:42:41 1998
+++ libiberty/strerror.c Fri Nov 2 20:24:39 2007
@@ -460,11 +460,6 @@
static int sys_nerr;
static const char **sys_errlist;