Hi Alex,

PicoLisp compiles and runs on beaglebone (arm cortex8) without problems
after applying the patch below.

It seems to work fine.  What is the best way to test it comprehensibly?
There are some tests in the test directory, but how do I execute them
all at once?

Thank you,

Tomas

diff --git a/src/Makefile b/src/Makefile
index 1a69906..86eebca 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,7 +7,13 @@ lib = ../lib
 
 picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c
 
-CFLAGS = -c -O2 -m32 -pipe \
+ifeq ($(shell uname -m), armv7l)
+M32 =
+else
+M32 = -m32
+endif
+
+CFLAGS = -c -O2 $(M32) -pipe \
        -falign-functions -fomit-frame-pointer -fno-strict-aliasing \
        -W -Wimplicit -Wreturn-type -Wunused -Wformat \
        -Wuninitialized -Wstrict-prototypes \
@@ -16,37 +22,37 @@ CFLAGS = -c -O2 -m32 -pipe \
 
 ifeq ($(shell uname), Linux)
        OS = Linux
-       PICOLISP-FLAGS = -m32 -rdynamic
+       PICOLISP-FLAGS = $(M32) -rdynamic
        LIB-FLAGS = -lc -lm -ldl
-       DYNAMIC-LIB-FLAGS = -m32 -shared -export-dynamic
+       DYNAMIC-LIB-FLAGS = $(M32) -shared -export-dynamic
        STRIP = strip
 else
 ifeq ($(shell uname), OpenBSD)
        OS = OpenBSD
-       PICOLISP-FLAGS = -m32 -rdynamic -Wl,-E
+       PICOLISP-FLAGS = $(M32) -rdynamic -Wl,-E
        LIB-FLAGS = -lc -lm
        DYNAMIC-LIB-FLAGS = -Wl,-E -Wl,-shared
        STRIP = strip
 else
 ifeq ($(shell uname), FreeBSD)
        OS = FreeBSD
-       PICOLISP-FLAGS = -m32 -rdynamic
+       PICOLISP-FLAGS = $(M32) -rdynamic
        LIB-FLAGS = -lc -lm
-       DYNAMIC-LIB-FLAGS = -m32 -shared -export-dynamic
+       DYNAMIC-LIB-FLAGS = $(M32) -shared -export-dynamic
        STRIP = strip
 else
 ifeq ($(shell uname), NetBSD)
        OS = NetBSD
-       PICOLISP-FLAGS = -m32 -rdynamic
+       PICOLISP-FLAGS = $(M32) -rdynamic
        LIB-FLAGS = -lc -lm
-       DYNAMIC-LIB-FLAGS = -m32 -shared -export-dynamic
+       DYNAMIC-LIB-FLAGS = $(M32) -shared -export-dynamic
        STRIP = strip
 else
 ifeq ($(shell uname), Darwin)
        OS = Darwin
-       PICOLISP-FLAGS = -m32
+       PICOLISP-FLAGS = $(M32)
        LIB-FLAGS = -lc -lm -ldl
-       DYNAMIC-LIB-FLAGS = -m32 -dynamiclib -undefined dynamic_lookup
+       DYNAMIC-LIB-FLAGS = $(M32) -dynamiclib -undefined dynamic_lookup
        STRIP = :
 else
 ifeq ($(shell uname -o), Cygwin)
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to