doodlewind / doodlewind/react-ssd1306

Compiling QuickJS

Open
#2 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
C
Stars
385
Forks
25
PR merge metrics
No merged PRs in 30d

Description

If you have trouble compiling QuickJS on Raspberry Pi, just link the `atomic` lib as seem in this [discussion](https://mail.google.com/mail/u/0/#sent/QgrcJHsBnjjhZtGLMsQwzdnmtKLszmZnqnl), this following patch should work:

``` patch
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.