bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird workaround necessary for mescc-lib on ARM


From: Danny Milosavljevic
Subject: Weird workaround necessary for mescc-lib on ARM
Date: Sun, 14 Jun 2020 00:21:04 +0200

Hi,

I've merged almost everything required for ARM to mes master,
except for the following two things:

(1) ntoab: Handle LONG_MIN case.

(2) This:

diff --git a/src/reader.c b/src/reader.c
index c8ecea4..8304b1f 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -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);
 }

This is horrible, but without it, none of the mescc-lib tests pass.

How can I best isolate what is wrong?

According to the build log, reader.c is compiled by gcc:

$ /gnu/store/wlkzcpb7gkcim0gk49amyd3l6jvhvp3l-profile/bin/gcc -c -D 
HAVE_CONFIG_H=1 -I lib -I include -I include -I include/linux/arm -static 
-nostdinc -nostdlib -fno-builtin -marm -static -g -o reader.o src/reader.c
$ /gnu/store/wlkzcpb7gkcim0gk49amyd3l6jvhvp3l-profile/bin/gcc -static -nostdinc 
-nostdlib -fno-builtin -marm -static -g -L . -static -nostdlib -L gcc-lib 
-static -g -o bin/mes-gcc crt1.o gc.o hash.o lib.o math.o mes.o module.o 
posix.o reader.o string.o struct.o vector.o -lc -lmescc
$ cat ./lib/tests/scaffold/01-return-0.log
${HOME}/src/mes/scripts/mescc: line 65:  5083 Segmentation fault      (core 
dumped) ${SCHEME-$MES} --no-auto-compile -e main -L 
/usr/local/share/guile/site/2.2 -C /usr/local/lib/guile/2.2/site-ccache 
$bindir/mescc.scm $sep "$@"

Also, how come the *mescc-lib* tests fail when I don't apply this workaround?

I would understand if the *gcc-lib* tests had failed, but why the mescc-lib 
tests? O_o

Attachment: pgpcI6b4kcCBU.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]