ARM: Workarounds for running mescc.

* module/mescc.scm (mescc:main): Oops, handle -std=STANDARD.
* build-aux/build.sh.in (CFLAGS): Add -std=gnu99.  Fixes compilation
with gcc-4.9.
* src/reader.c (reader_read_identifier_or_number): Ugly hack: exit at
EOF.  Fixes running mescc.
This commit is contained in:
Jan Nieuwenhuizen 2019-04-07 21:29:37 +00:00
parent 35c746043f
commit 4b40bdc0cb
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 9 additions and 4 deletions

View File

@ -49,10 +49,11 @@ if test -n "$GUILE" -a "$GUILE" != true; then
fi
debug=
#debug=-g
debug=-g
CFLAGS="
-static
-std=gnu99
$debug
"

View File

@ -143,10 +143,10 @@ General help using GNU software: <http://gnu.org/gethelp/>
"-nostartfiles"
"-nostdinc"
"-nostdlib"
"-static"
"-std"))
"-static"))
(args (map (lambda (o)
(if (member o single-dash-options) (string-append "-" o)
(if (or (member o single-dash-options)
(string-prefix? "-std=" o)) (string-append "-" o)
o))
args))
(args (append-map unclump-single args))

View File

@ -106,6 +106,10 @@ reader_read_identifier_or_number (int c)
}
unreadchar (c);
g_buf[i] = 0;
#if __arm__ // FIXME: workaround for mescc end of file bug
if (c == -1 && i == 1)
exit (0);
#endif
return cstring_to_symbol (g_buf);
}