-
Notifications
You must be signed in to change notification settings - Fork 396
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
/usr/include/stdio.h:253: too many errors #31
Comments
This is because of |
Could you please introduce the steps more detail? I don't know how to operate. Thanks! |
diff --git a/etc/linux.c b/etc/linux.c
index 5df6059..e9e4a82 100755
--- a/etc/linux.c
+++ b/etc/linux.c
@@ -12,23 +12,23 @@ char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
char inputs[256] = "";
char *cpp[] = { LCCDIR "gcc/cpp",
"-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__",
- "-Dunix", "-Di386", "-Dlinux",
+ "-Dunix", "-Di386", "-Dlinux", "-D__restrict=", "-std=c89", "-Drestrict=",
"-D__unix__", "-D__i386__", "-D__linux__", "-D__signed__=signed",
"$1", "$2", "$3", 0 };
char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include", 0 }; You have to modify the build.sh to keep it from resetting lcc. diff --git a/build.sh b/build.sh
index a5daed1..a38669c 100755
--- a/build.sh
+++ b/build.sh
@@ -3,8 +3,8 @@
set -v
# grab the frontend
[ ! -d "lcc" ] && git clone https://github.com/drh/lcc
-cd lcc && git reset --hard 3b3f01b4103cd7b519ae84bd1122c9b03233e687 && cd -
+# cd lcc && git reset --hard 3b3f01b4103cd7b519ae84bd1122c9b03233e687 && cd -
# create a build directory
export BUILDDIR=`pwd`/build |
I've tried to operate as you said, but the problem still exists. However, when I use |
diff --git a/etc/lcc.c b/etc/lcc.c
index 95b621a..04a80c3 100755
--- a/etc/lcc.c
+++ b/etc/lcc.c
@@ -100,6 +100,8 @@ main(int argc, char *argv[]) {
exit(0);
}
plist = append("-D__LCC__", 0);
+ plist = append("-D__restrict=", 0);
+ plist = append("-Drestrict=", 0);
initinputs();
if (getenv("LCCDIR"))
option(stringf("-lccdir=%s", getenv("LCCDIR"))); |
OK, it works! Thank you very much! |
Having this error still. After issue #19 was resolved, if I follow the steps here to fix this error, any binary built with movcc segfaults. Before #19 was fixed, I could follow the steps here and get a working compiler, but I just couldn't use --no-mov-flow. Now, even when not using --no-mov-flow, I'm just getting segfaults with anything I try and compile. |
I've tried to fix this, but I can't find the files for the DIFF you're referencing. |
@ThePlasmaRailgun They are in the lcc/ subfolder, except for build.sh which is in the top folder. |
Ok, I found them, they're in |
host info
running build.sh
The text was updated successfully, but these errors were encountered: