Date: Sun, 4 Nov 2007 00:10:05 GMT From: "James E. Flemer" <jflemer@alum.rpi.edu> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/117320: [patch] devel/arm-elf-gcc295 Static declaration follows non-static declaration Message-ID: <200711040010.lA40A4gD013508@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/117320; it has been noted by GNATS. From: "James E. Flemer" <jflemer@alum.rpi.edu> To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/117320: [patch] devel/arm-elf-gcc295 Static declaration follows non-static declaration Date: Sat, 03 Nov 2007 10:46:35 -0600 This is a multi-part message in MIME format. --------------080002030005010806090404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Maintainer patch attached for ports/117320 and ports/117322. # # - Fix compile with GCC 4.2 # # PRs: ports/117320, ports/117322 # Based on patches by: Pietro Cerutti <gahr@gahr.ch> # Submitted by: James Flemer <jflemer@alum.rpi.edu> # Tested on FreeBSD 6.2 w/ GCC 4.2 and with GCC 3.4. Not tested on FreeBSD 7, though it was marked broken on 7 due to GCC 4.2 so I believe this should fix it there as well. NOTE to committer: This includes removal of two files, and addition of two files. Remove: devel/arm-elf-gcc295/files/libiberty-strerror.c Remove: devel/arm-elf-gcc295/files/libiberty-strsignal.c Add: devel/arm-elf-gcc295/files/patch-gcc::config::arm::arm.c Add: devel/arm-elf-gcc295/files/patch-libiberty::strerror.c --------------080002030005010806090404 Content-Type: text/plain; name="arm-elf-gcc295-patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="arm-elf-gcc295-patch.txt" # # - Fix compile with GCC 4.2 # # PRs: ports/117320, ports/117322 # Based on patches by: Pietro Cerutti <gahr@gahr.ch> # Submitted by: James Flemer <jflemer@alum.rpi.edu> # Index: Makefile =================================================================== RCS file: /home/ncvs/ports/devel/arm-elf-gcc295/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- Makefile 4 Oct 2007 08:12:48 -0000 1.24 +++ Makefile 3 Nov 2007 16:30:38 -0000 @@ -41,10 +41,6 @@ .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 @@ .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#,' \ Index: files/libiberty-strerror.c =================================================================== RCS file: /home/ncvs/ports/devel/arm-elf-gcc295/files/libiberty-strerror.c,v retrieving revision 1.1 diff -u -r1.1 libiberty-strerror.c --- files/libiberty-strerror.c 7 Dec 2003 23:11:49 -0000 1.1 +++ files/libiberty-strerror.c 3 Nov 2007 16:30:38 -0000 @@ -1,14 +0,0 @@ ---- libiberty/strerror.c.orig Sat Oct 25 06:08:26 2003 -+++ libiberty/strerror.c Sat Oct 25 06:08:35 2003 -@@ -460,11 +460,6 @@ - static int sys_nerr; - static const char **sys_errlist; - --#else -- --extern int sys_nerr; --extern char *sys_errlist[]; -- - #endif - - Index: files/libiberty-strsignal.c =================================================================== RCS file: /home/ncvs/ports/devel/arm-elf-gcc295/files/libiberty-strsignal.c,v retrieving revision 1.1 diff -u -r1.1 libiberty-strsignal.c --- files/libiberty-strsignal.c 7 Dec 2003 23:11:49 -0000 1.1 +++ files/libiberty-strsignal.c 3 Nov 2007 16:30:38 -0000 @@ -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; --- /dev/null Sat Nov 3 10:22:00 2007 +++ files/patch-gcc::config::arm::arm.c Fri Nov 2 20:37:30 2007 @@ -0,0 +1,21 @@ +# $FreeBSD$ +--- 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) + { --- /dev/null Sat Nov 3 10:22:00 2007 +++ files/patch-libiberty::strerror.c Fri Nov 2 20:37:30 2007 @@ -0,0 +1,15 @@ +# $FreeBSD$ +--- 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; + +-#else +- +-extern int sys_nerr; +-extern char *sys_errlist[]; +- + #endif + + --------------080002030005010806090404--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711040010.lA40A4gD013508>