* [guile-vm] [patch] Building guile-vm on amd64 Ubuntu
@ 2008-08-26 11:23 C. K. Jester-Young
2008-08-26 13:22 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: C. K. Jester-Young @ 2008-08-26 11:23 UTC (permalink / raw)
To: guile-devel
Hi there,
I'm posting a bunch of small patches to improve the building of guile-vm
on Ubuntu amd64. I haven't tested _running_ the programs so far; perhaps
I'll have more patches to send after playing with it a bit.
Dale Smith mentioned on IRC that I may need to have copyright assignment
papers sorted out first. I have begun this process, but am still sending
these patches in hope that they will come in useful (and/or that they're
trivial enough not to require full assignment).
The patches are in ``git diff'' order. I'm commenting on them separately
so maintainers can decide what to include or not.
Cheers!
---Chris K.
* * *
This patch suppresses the ``WARNING: $ac_file_inputs seems to ignore the
--datarootdir setting'' message.
diff --git a/guile-tools.in b/guile-tools.in
index a4db08f..a0255b5 100644
--- a/guile-tools.in
+++ b/guile-tools.in
@@ -43,7 +43,7 @@ EOF
}
prefix="@prefix@"
-pkgdatadir="@datadir@/@PACKAGE@"
+pkgdatadir="@datarootdir@/@PACKAGE@"
guileversion="@GUILE_EFFECTIVE_VERSION@"
default_scriptsdir=$pkgdatadir/$guileversion/scripts
* * *
This removes the assumption that a fixnum fits in an int. Looking at the
code, the limits of fixnums seem to depend on the size of scm_t_bits, so
I'll use this here. The SYNC_REGISTER line is a tab-vs-space consistency
fix.
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index e1c0dbd..43dd3a5 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -223,11 +223,11 @@ VM_DEFINE_FUNCTION (ge, "ge?", 2)
ARGS2 (x, y); \
if (SCM_I_INUMP (x) && SCM_I_INUMP (y)) \
{ \
- int n = SCM_I_INUM (x) CFUNC SCM_I_INUM (y); \
+ scm_t_bits n = SCM_I_INUM (x) CFUNC SCM_I_INUM (y);\
if (SCM_FIXABLE (n)) \
RETURN (SCM_I_MAKINUM (n)); \
} \
- SYNC_REGISTER (); \
+ SYNC_REGISTER (); \
RETURN (SFUNC (x, y)); \
}
* * *
Pointers can't be cast to ints on amd64.
diff --git a/libguile/vm.c b/libguile/vm.c
index 5ec7d92..688e441 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -94,8 +94,8 @@ reinstate_vm_cont (struct scm_vm *vp, SCM cont)
abort ();
}
vp->ip = p->ip;
- vp->sp = vp->stack_limit - (int) p->sp;
- vp->fp = vp->stack_limit - (int) p->fp;
+ vp->sp = vp->stack_limit - (intptr_t) p->sp;
+ vp->fp = vp->stack_limit - (intptr_t) p->fp;
memcpy (vp->sp + 1, p->stack_base, p->stack_size * sizeof (SCM));
}
* * *
On the version of gnulib distributed with Ubuntu 8.04, the string module
is required for autoconf macros which use gl_HEADER_STRING_H_DEFAULTS to
work.
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index 5145d01..b49ccbb 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -19,7 +19,7 @@
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
-gl_MODULES([alloca extensions strcase])
+gl_MODULES([alloca extensions strcase string])
gl_AVOID([])
gl_SOURCE_BASE([lib])
gl_M4_BASE([m4])
* * *
Suppress warnings from aclocal about underquoting.
diff --git a/m4/labels-as-values.m4 b/m4/labels-as-values.m4
index eedfb55..3cf7320 100644
--- a/m4/labels-as-values.m4
+++ b/m4/labels-as-values.m4
@@ -1,5 +1,5 @@
dnl check for gcc's "labels as values" feature
-AC_DEFUN(AC_C_LABELS_AS_VALUES,
+AC_DEFUN([AC_C_LABELS_AS_VALUES],
[AC_CACHE_CHECK([labels as values], ac_cv_labels_as_values,
[AC_TRY_COMPILE([
int foo(int);
@@ -15,7 +15,7 @@ l2: return 2;
ac_cv_labels_as_values=yes,
ac_cv_labels_as_values=no)])
if test "$ac_cv_labels_as_values" = yes; then
-AC_DEFINE(HAVE_LABELS_AS_VALUES, [],
+AC_DEFINE([HAVE_LABELS_AS_VALUES], [],
[Define if compiler supports gcc's "labels as values" (aka computed goto)
feature, used to speed up instruction dispatch in the interpreter.])
fi
* * *
The (system vm core) module doesn't exist currently; instead, (system vm
objcode) contains the ``load-objcode'' procedure.
diff --git a/src/guile-disasm.in b/src/guile-disasm.in
index 08095f5..9c286f0 100644
--- a/src/guile-disasm.in
+++ b/src/guile-disasm.in
@@ -3,7 +3,7 @@
;; Obviously, this is -*- Scheme -*-.
-(use-modules (system vm core)
+(use-modules (system vm objcode)
(system vm disasm))
(for-each (lambda (file)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [guile-vm] [patch] Building guile-vm on amd64 Ubuntu
2008-08-26 11:23 [guile-vm] [patch] Building guile-vm on amd64 Ubuntu C. K. Jester-Young
@ 2008-08-26 13:22 ` Ludovic Courtès
2008-08-26 19:02 ` C. K. Jester-Young
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2008-08-26 13:22 UTC (permalink / raw)
To: guile-devel
Hi,
Just a couple of notes.
"C. K. Jester-Young" <cky944@gmail.com> writes:
> On the version of gnulib distributed with Ubuntu 8.04, the string module
> is required for autoconf macros which use gl_HEADER_STRING_H_DEFAULTS to
> work.
Supposedly `gnulib-tool' pulls all the needed dependencies, so it should
pull `string'. Anyway, on `master', Gnulib files are now part of the
repository so one doesn't have to fiddle with Gnulib.
> The (system vm core) module doesn't exist currently; instead, (system vm
> objcode) contains the ``load-objcode'' procedure.
It used to exist. ;-)
Thanks,
Ludovic.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [guile-vm] [patch] Building guile-vm on amd64 Ubuntu
2008-08-26 13:22 ` Ludovic Courtès
@ 2008-08-26 19:02 ` C. K. Jester-Young
2008-08-26 20:57 ` Andy Wingo
0 siblings, 1 reply; 4+ messages in thread
From: C. K. Jester-Young @ 2008-08-26 19:02 UTC (permalink / raw)
To: guile-devel
On Tue, Aug 26, 2008 at 03:22:08PM +0200, Ludovic_Courtès wrote:
> Supposedly `gnulib-tool' pulls all the needed dependencies, so it should
> pull `string'. Anyway, on `master', Gnulib files are now part of the
> repository so one doesn't have to fiddle with Gnulib.
Thanks for mentioning that. :-) Two things are now apparent to me:
1. The strcase.m4 on ``master'' doesn't have this problem.
2. The strcase.m4 that comes with Ubuntu 8.04 comes from a broken gnulib
snapshot. In specific, m4/strcase.m4 wants the ``string'' module, but
modules/strcase specifies a dependency on ``strings''.
So it's not guile-vm's problem, and since it's fixed on gnulib side now,
it's not really worth reporting.
> > The (system vm core) module doesn't exist currently; instead, (system vm
> > objcode) contains the ``load-objcode'' procedure.
>
> It used to exist. ;-)
I figured. :-P I grepped the code and guile-disasm seemed to be the only
place that mentioned it....
Cheers,
---Chris K.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [guile-vm] [patch] Building guile-vm on amd64 Ubuntu
2008-08-26 19:02 ` C. K. Jester-Young
@ 2008-08-26 20:57 ` Andy Wingo
0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2008-08-26 20:57 UTC (permalink / raw)
To: guile-devel
Hi Chris,
Thanks for the patches! All applied except for the Gnulib things. I've
merged up with master so now there's no need to invoke gnulib-tool any
more.
Cheers,
Andy
ps. Get cracking on that paperwork! :-)
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-26 20:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 11:23 [guile-vm] [patch] Building guile-vm on amd64 Ubuntu C. K. Jester-Young
2008-08-26 13:22 ` Ludovic Courtès
2008-08-26 19:02 ` C. K. Jester-Young
2008-08-26 20:57 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).