Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux support #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/build
8 changes: 5 additions & 3 deletions configure-linux.sh
Expand Up @@ -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=''

#---------------------------------------------------------------------------------
Expand All @@ -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
12 changes: 8 additions & 4 deletions gcc-3.4.6/gcc/c-parse.y
Expand Up @@ -1647,7 +1647,8 @@ enum_head:

structsp_attr:
struct_head identifier '{'
{ $$ = start_struct (RECORD_TYPE, $2);
/* { $$ = start_struct (RECORD_TYPE, $2); */
{ $<ttype>$ = start_struct (RECORD_TYPE, $2);
/* Start scope of tag before parsing components. */
}
component_decl_list '}' maybe_attribute
Expand All @@ -1658,7 +1659,8 @@ structsp_attr:
nreverse ($3), chainon ($1, $5));
}
| union_head identifier '{'
{ $$ = start_struct (UNION_TYPE, $2); }
/* { $$ = 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)); }
Expand All @@ -1667,12 +1669,14 @@ structsp_attr:
nreverse ($3), chainon ($1, $5));
}
| enum_head identifier '{'
{ $$ = start_enum ($2); }
/* { $$ = 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); }
/* { $$ = start_enum (NULL_TREE); } */
{ $<ttype>$ = start_enum (NULL_TREE); }
enumlist maybecomma_warn '}' maybe_attribute
{ $$ = finish_enum ($<ttype>3, nreverse ($4),
chainon ($1, $7)); }
Expand Down
2 changes: 1 addition & 1 deletion gcc-3.4.6/gcc/config/mapip/mapip.c
Expand Up @@ -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));
Expand Down
7 changes: 4 additions & 3 deletions 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.