This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Fwd: [Cegcc-devel] Patches for cegcc on osx-powerpc (again, now cleaner)]
- From: Danny Backx <danny dot backx at scarlet dot be>
- To: binutils <binutils at sourceware dot org>
- Date: Sat, 18 Apr 2009 07:29:44 +0200
- Subject: [Fwd: [Cegcc-devel] Patches for cegcc on osx-powerpc (again, now cleaner)]
- Reply-to: danny dot backx at scarlet dot be
Hi,
Included below is the relevant part of a patch I received.
A new version of MacOS X introduces the STACKSIZE symbol, this breaks
the build of binutils/ld.
My suggestion was to use #ifdef to keep STACKSIZE as a symbol except on
the platform that breaks it. That may not be possible (bison/yacc
restriction ?).
What would be the best approach ?
I'll get the patch tested in cegcc and feed back to you.
Danny
-------- Forwarded Message --------
> From: Ismail Khatib <ikhatib@imail.de>
> To: cegcc-devel@lists.sourceforge.net
> Subject: [Cegcc-devel] Patches for cegcc on osx-powerpc (again, now
> cleaner)
> Date: Wed, 15 Apr 2009 23:33:33 +0200
>
> (I'm compiling the current CeGCC SVN-trunk on Mac OSX Leopard 10.5.6
> (PowerPC) )
>
>
>
>
> Index: src/binutils/ld/deffilep.y
> ===================================================================
> --- src/binutils/ld/deffilep.y (revision 1238)
> +++ src/binutils/ld/deffilep.y (working copy)
> @@ -104,7 +104,8 @@
> int number;
> };
>
> -%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATAU DATAL
> +/* %token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATAU
> DATAL */
> +%token NAME LIBRARY DESCRIPTION HEAPSIZE CODE DATAU DATAL
> %token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANTU CONSTANTL
> %token PRIVATEU PRIVATEL
> %token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE
> @@ -124,7 +125,7 @@
> NAME opt_name opt_base { def_image_name ($2, $3, 0); }
> | LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
> | DESCRIPTION ID { def_description ($2);}
> - | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
> +/* | STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);} */
> | HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
> | CODE attr_list { def_section ("CODE", $2);}
> | DATAU attr_list { def_section ("DATA", $2);}
>
>
>
>
> Without this patch, I get the following when compiling:
>
>
> gcc -DHAVE_CONFIG_H -I. -I/Users/cerial/sources/cegcc/src/binutils/ld
> -I. -I. -I/Users/cerial/sources/cegcc/src/binutils/ld -I../bfd
> -I/Users/cerial/sources/cegcc/src/binutils/ld/../bfd
> -I/Users/cerial/sources/cegcc/src/binutils/ld/../include -g -O2
> -DLOCALEDIR="\"/opt/cegcc/share/locale\"" -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c deffilep.c
> -Wno-error
> deffilep.c:204: error: syntax error before numeric constant
> deffilep.c:233:1: warning: "STACKSIZE" redefined
> In file included from /usr/include/machine/param.h:35,
> from /usr/include/sys/param.h:110,
>
> from /Users/cerial/sources/cegcc/src/binutils/ld/sysdep.h:56,
> from deffilep.y:23:
> /usr/include/ppc/param.h:61:1: warning: this is the location of the
> previous definition
> make[4]: *** [deffilep.o] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-ld] Error 2
> make: *** [all] Error 2
>
>
> -----------------------------
> I really don't know what's causing it, and what sideeffects my patch
> has. Until now, I had no problems with
> cegcc patched this way. If someone knows how to fix this safely,
> please help! Thanks!
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info