[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin
From: |
Andy Wingo |
Subject: |
[Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin |
Date: |
Mon, 2 Jul 2018 05:14:42 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 4d0e4b32a11fc621671b4d622043b380d42e8ae7
Author: Paulo Andrade <address@hidden>
Date: Wed Sep 24 14:32:49 2014 -0300
x86: Build and pass all tests on 32 bit cygwin
* check/lightning.c: Add workaround to conflicting global
optind variable in cygwin binutils that have an internal
getopt* implementation.
* lib/jit_x86-cpu.c: Add a simple define ffsl ffs if building
for 32 bit and there is no ffsl function.
---
ChangeLog | 9 +++++++++
check/lightning.c | 10 ++++++++++
lib/jit_x86-cpu.c | 6 +++++-
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3e6e0db..059f0ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2014-09-24 Paulo Andrade <address@hidden>
+ * check/lightning.c: Add workaround to conflicting global
+ optind variable in cygwin binutils that have an internal
+ getopt* implementation.
+
+ * lib/jit_x86-cpu.c: Add a simple define ffsl ffs if building
+ for 32 bit and there is no ffsl function.
+
+2014-09-24 Paulo Andrade <address@hidden>
+
* check/lightning.c: Add a hopefully temporary kludge to not use
sprintf and sscanf returned by dlsym. This is required to pass
the varargs test.
diff --git a/check/lightning.c b/check/lightning.c
index 47e39a3..83b6ab7 100644
--- a/check/lightning.c
+++ b/check/lightning.c
@@ -3952,6 +3952,16 @@ main(int argc, char *argv[])
int opt_short;
char cmdline[8192];
+#if __WORDSIZE == 32 && defined(__CYGWIN__)
+ /* Cause a compile warning about redefinition without dllimport
+ * attribute, *but* cause correct linkage if liblightning.a is
+ * linked to binutils (that happens to have an internal
+ * getopt* implementation and an apparently conflicting
+ * optind global variable) */
+ extern int optind;
+ optind = 1;
+#endif
+
progname = argv[0];
init_jit(progname);
diff --git a/lib/jit_x86-cpu.c b/lib/jit_x86-cpu.c
index c24ad16..8a0ce11 100644
--- a/lib/jit_x86-cpu.c
+++ b/lib/jit_x86-cpu.c
@@ -639,8 +639,12 @@ static void _prolog(jit_state_t*, jit_node_t*);
static void _epilog(jit_state_t*, jit_node_t*);
# define patch_at(node, instr, label) _patch_at(_jit, node, instr, label)
static void _patch_at(jit_state_t*, jit_node_t*, jit_word_t, jit_word_t);
-# if __WORDSIZE == 64 && !defined(HAVE_FFSL)
+# if !defined(HAVE_FFSL)
+# if __WORDSIZE == 32
+# define ffsl(i) ffs(i)
+# else
static int ffsl(long);
+# endif
# endif
#endif
- [Guile-commits] 180/437: Correct C sequence point problem., (continued)
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02
- [Guile-commits] 437/437: Wire up lightning into libguile build, Andy Wingo, 2018/07/02
- [Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated, Andy Wingo, 2018/07/02
- [Guile-commits] 183/437: Correct qmul and qdiv in ppc., Andy Wingo, 2018/07/02
- [Guile-commits] 235/437: Correct build on FreeBSD/amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information., Andy Wingo, 2018/07/02
- [Guile-commits] 215/437: Add functional hppa port. All tests pass., Andy Wingo, 2018/07/02
- [Guile-commits] 369/437: Correct typo in x87.nodata test list, Andy Wingo, 2018/07/02
- [Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin,
Andy Wingo <=
- [Guile-commits] 401/437: Implement a correct generation of Fibonacci numbers., Andy Wingo, 2018/07/02
- [Guile-commits] 318/437: Add label predicates, Andy Wingo, 2018/07/02
- [Guile-commits] 373/437: Update copyright date, Andy Wingo, 2018/07/02
- [Guile-commits] 403/437: Correct wrong movr simplification, Andy Wingo, 2018/07/02
- [Guile-commits] 324/437: misc: Enable silent rules to make warnings stick out, Andy Wingo, 2018/07/02
- [Guile-commits] 175/437: Make JIT_RET, JIT_FRET and JIT_SP private., Andy Wingo, 2018/07/02
- [Guile-commits] 430/437: Remove special cflags for obsolete Lightning targets, Andy Wingo, 2018/07/02
- [Guile-commits] 375/437: Update the correct fp offset and add assertions, Andy Wingo, 2018/07/02
- [Guile-commits] 413/437: Correct logic error with jit_live in jit_retr, Andy Wingo, 2018/07/02
- [Guile-commits] 140/437: Add new test cases to exercise memory load/store., Andy Wingo, 2018/07/02