react-ssd1306 icon indicating copy to clipboard operation
react-ssd1306 copied to clipboard

Compiling QuickJS

Open doodlewind opened this issue 6 years ago • 0 comments

If you have trouble compiling QuickJS on Raspberry Pi, just link the atomic lib as seem in this discussion, this following patch should work:

diff --git a/Makefile b/Makefile
index efd3a32..3150f80 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,10 @@ CONFIG_LTO=y
 #CONFIG_WERROR=y
 # force 32 bit build for some utilities
 #CONFIG_M32=y
+# compilation on ARM Linux
+ifeq ($(shell uname -m),armv7l)
+CONFIG_ARMV7=y
+endif
 ifdef CONFIG_DARWIN
 # use clang instead of gcc

@@ -167,6 +171,9 @@ LIBS=-lm
 ifndef CONFIG_WIN32
 LIBS+=-ldl
 endif
+ifdef CONFIG_ARMV7
+LIBS+=-latomic
+endif
 $(OBJDIR):
 	mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests

You can also simply change LIBS=-lm to LIBS=-lm -latomic in makefile :D

doodlewind avatar Nov 02 '19 06:11 doodlewind