Re: Compiling for Shared Libraries
trevor <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
On 05/02/14 20:11, Kevan Hashemi wrote: > Is there an easier way to add a compiler option to the build process, > other than editing the Makefile produced by the GCC_3.4.6 configure > script? (For example, can I pass a compiler option into the configure > script or into the makefile.) try make CFLAGS = -g -O2 -fPIC pascal.install-with-gcc Is your version of bison later than 2.3? For me, later versions of bison produce errors on the unmodified gpc-20070904 sources. I've attached a patch taken from here ---> http://www.microchip.com/forums/m416697-print.aspx to fix this. --Trevor// (contributor, gpc rpms on openSuSE build service) _______________________________________________ Gpc mailing list [email protected] https://www.g-n-u.de/mailman/listinfo/gpc
gpc-fix_bison.patch
(text/x-patch, 1.2 KB)
--- gcc-3.4.6/gcc/c-parse.in.orig 2004-10-15 00:12:53.000000000 +0100
+++ gcc-3.4.6/gcc/c-parse.in 2012-02-20 18:03:31.000000000 +0000
@@ -1730,7 +1730,7 @@
structsp_attr:
struct_head identifier '{'
- { $$ = start_struct (RECORD_TYPE, $2);
+ { $<ttype>$ = start_struct (RECORD_TYPE, $2);
/* Start scope of tag before parsing components. */
}
component_decl_list '}' maybe_attribute
@@ -1741,7 +1741,7 @@
nreverse ($3), chainon ($1, $5));
}
| union_head identifier '{'
- { $$ = start_struct (UNION_TYPE, $2); }
+ { $<ttype>$ = start_struct (UNION_TYPE, $2); }
component_decl_list '}' maybe_attribute
{ $$ = finish_struct ($<ttype>4, nreverse ($5),
chainon ($1, $7)); }
@@ -1750,12 +1750,12 @@
nreverse ($3), chainon ($1, $5));
}
| enum_head identifier '{'
- { $$ = start_enum ($2); }
+ { $<ttype>$ = start_enum ($2); }
enumlist maybecomma_warn '}' maybe_attribute
{ $$ = finish_enum ($<ttype>4, nreverse ($5),
chainon ($1, $8)); }
| enum_head '{'
- { $$ = start_enum (NULL_TREE); }
+ { $<ttype>$ = start_enum (NULL_TREE); }
enumlist maybecomma_warn '}' maybe_attribute
{ $$ = finish_enum ($<ttype>3, nreverse ($4),
chainon ($1, $7)); }