[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mes] mescc arm progress
From: |
Jan Nieuwenhuizen |
Subject: |
Re: [bug-mes] mescc arm progress |
Date: |
Wed, 10 Apr 2019 16:29:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Danny Milosavljevic writes:
Hi Danny,
> does wip+wip-arm work for you?
No...well sort-of...see below.
> I tried compiling using
>
> # guix-mes is
> $ ~/src/guix-mes/guix/pre-inst-env guix environment -s armhf-linux --pure mes
> --ad-hoc git less nano gdb
> [env]$ ./configure --with-courage
I did not notice your problem, because I configured: --with-courage
--with-cheating
> [env]$ make V=1
>
> And I eventually get
>
> ../pre-inst-env mescc -m 32 -c -D HAVE_CONFIG_H=1 -I include -I
> ../include -I ../include/linux/arm -static -std=gnu99 -g -nostdinc
> -nostdlib -fno-builtin -marm -o time.o ../lib/linux/time.c
> <stdin>:1: unresolved: "SYS_time"
Yes, I get that too when not using Guile. Using Guile (either
automagically with --with-cheating or like this):
--8<---------------cut here---------------start------------->8---
16:24:41 address@hidden:~/src/mes/wip-arm/mescc-lib [env]
$ SCHEME=guile ../pre-inst-env mescc -v -m 32 -c -D HAVE_CONFIG_H=1 -I include
-I ../include -I ../include/linux/arm -static -std=gnu99 -g -nostdinc -nostdlib
-fno-builtin -marm -o time.o ../lib/linux/time.c
parsing: input
compiling: input
:tm <t>
:timespec <t>
:time
dumping: time.s
inspect
--8<---------------cut here---------------end--------------->8---
> Furthermore, SYS_time is unsupported with the Linux system call
> interface we are using (but we #define it), therefore I'd like this
> patch (unpushed so far):
>
> diff --git a/include/linux/arm/syscall.h b/include/linux/arm/syscall.h
> index ce3b655c..fe99ab70 100644
> --- a/include/linux/arm/syscall.h
> +++ b/
> @@ -38,7 +38,6 @@
>
> // libc+tcc
> #define SYS_close 0x06
> -#define SYS_time 0x0d
> #define SYS_lseek 0x13
> #define SYS_unlink 0x0a
> #define SYS_rmdir 0x28
This looks fine.
> But then I get
>
> ../pre-inst-env mescc -m 32 -c -D HAVE_CONFIG_H=1 -I include -I
> ../include -I ../include/linux/arm -static -std=gnu99 -g -nostdinc
> -nostdlib -fno-builtin -marm -o time.o ../lib/linux/time.c
> <stdin>:1: unresolved: "SYS_gettimeofday"
>
> But SYS_gettimeofday is in include/linux/arm/syscall.h and has a value.
> What's up with it?
It looks like there a mes+nyacc bug somewhere, does this
--8<---------------cut here---------------start------------->8---
diff --git a/lib/linux/time.c b/lib/linux/time.c
index e33fe4832..910b5634f 100644
--- a/lib/linux/time.c
+++ b/lib/linux/time.c
@@ -22,7 +22,7 @@
#include <syscall.h>
#include <time.h>
-#if SYS_time
+#if defined (SYS_time)
time_t
time (time_t * result)
@@ -30,7 +30,7 @@ time (time_t * result)
return _sys_call1 (SYS_time, (long) result);
}
-#elif SYS_gettimeofday
+#elif defined (SYS_gettimeofday)
#include <sys/time.h>
--8<---------------cut here---------------end--------------->8---
fix it for you? If so, please just add to your commit!
It would be nice to find and fix this mes+nyacc bug...oh well :)
janneke
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com