diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build diff --git a/configure-linux.sh b/configure-linux.sh index b617567..85e75df 100755 --- a/configure-linux.sh +++ b/configure-linux.sh @@ -31,9 +31,9 @@ builddir=./build/gcc target=mapip progpref=mapip- -export CFLAGS='-O2 -pipe' -export CXXFLAGS='-O2 -pipe' -export LDFLAGS='-s' +export CFLAGS='-O2 -pipe -m32' +export CXXFLAGS='-O2 -pipe -m32' +export LDFLAGS='-s -m32' export DEBUG_FLAGS='' #--------------------------------------------------------------------------------- @@ -51,4 +51,6 @@ $SRCDIR/configure \ --target=$target \ --without-headers \ --program-prefix=$progpref -v \ + --build=i686-linux-gnu \ + --host=i686-linux-gnu \ 2>&1 | tee gcc_configure.log diff --git a/gcc-3.4.6/gcc/c-parse.y b/gcc-3.4.6/gcc/c-parse.y index 7f749f0..0a5d5a5 100644 --- a/gcc-3.4.6/gcc/c-parse.y +++ b/gcc-3.4.6/gcc/c-parse.y @@ -1647,7 +1647,8 @@ enum_head: structsp_attr: struct_head identifier '{' - { $$ = start_struct (RECORD_TYPE, $2); + /* { $$ = start_struct (RECORD_TYPE, $2); */ + { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute @@ -1658,7 +1659,8 @@ structsp_attr: nreverse ($3), chainon ($1, $5)); } | union_head identifier '{' - { $$ = start_struct (UNION_TYPE, $2); } + /* { $$ = start_struct (UNION_TYPE, $2); } */ + { $$ = start_struct (UNION_TYPE, $2); } component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, nreverse ($5), chainon ($1, $7)); } @@ -1667,12 +1669,14 @@ structsp_attr: nreverse ($3), chainon ($1, $5)); } | enum_head identifier '{' - { $$ = start_enum ($2); } + /* { $$ = start_enum ($2); } */ + { $$ = start_enum ($2); } enumlist maybecomma_warn '}' maybe_attribute { $$ = finish_enum ($4, nreverse ($5), chainon ($1, $8)); } | enum_head '{' - { $$ = start_enum (NULL_TREE); } + /* { $$ = start_enum (NULL_TREE); } */ + { $$ = start_enum (NULL_TREE); } enumlist maybecomma_warn '}' maybe_attribute { $$ = finish_enum ($3, nreverse ($4), chainon ($1, $7)); } diff --git a/gcc-3.4.6/gcc/config/mapip/mapip.c b/gcc-3.4.6/gcc/config/mapip/mapip.c index 856fffb..3e22eac 100644 --- a/gcc-3.4.6/gcc/config/mapip/mapip.c +++ b/gcc-3.4.6/gcc/config/mapip/mapip.c @@ -343,7 +343,7 @@ void mapip_output_mi_thunk( FILE *file, { fprintf (file, ";** MI THUNK BEGIN **\n"); - fprintf (file, "add i0,#0x%x\n", delta); + fprintf (file, "add i0,#0x%lx\n", delta); fprintf (file, "call &"); assemble_name (file, XSTR(XEXP(DECL_RTL(funcdecl),0),0)); diff --git a/install.sh b/install.sh index a59a351..5924525 100755 --- a/install.sh +++ b/install.sh @@ -1,16 +1,17 @@ #!/bin/bash -export MOSYNCDIR=~/mosync BIN=$MOSYNCDIR/bin +LIB=$MOSYNCDIR/libexec/gcc echo $BIN mkdir -p $BIN +mkdir -p $LIB cp build/gcc/gcc/xgcc $BIN cp build/gcc/gcc/cpp $BIN -cp build/gcc/gcc/cc1 $BIN -cp build/gcc/gcc/cc1plus $BIN +cp build/gcc/gcc/cc1 $LIB +cp build/gcc/gcc/cc1plus $LIB echo installation complete.