Skip to content

Commit

Permalink
plutolang: defer uname detection
Browse files Browse the repository at this point in the history
  • Loading branch information
mbekkomo committed Apr 7, 2024
1 parent 7b7c21a commit 4fdbbef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/plutolang/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ termux_step_pre_configure() {
CXXFLAGS+=" -std=c++17"
export MYCFLAGS="-fPIC $CXXFLAGS $CPPFLAGS"
export MYLDFLAGS="$LDFLAGS"
export TERMUX_ARCH

TERMUX_PKG_EXTRA_MAKE_ARGS+=" CXX=$(command -v $CXX)"
}
17 changes: 17 additions & 0 deletions packages/plutolang/defer-uname-detection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/vendor/Soup/Intrin/Makefile b/src/vendor/Soup/Intrin/Makefile
index 5accbf7..2035c8f 100644
--- a/src/vendor/Soup/Intrin/Makefile
+++ b/src/vendor/Soup/Intrin/Makefile
@@ -1,10 +1,10 @@
CXX=g++ -std=c++17 -O3 -flto -fvisibility=hidden -fPIC
CFLAGS=-c -Wall

-ifeq ($(shell uname -m),x86_64)
+ifeq ($(TERMUX_ARCH),x86_64)
CFLAGS+= -maes -mpclmul -mrdrnd -mrdseed -msha -msse4.1
endif
-ifeq ($(shell uname -m),aarch64)
+ifeq ($(TERMUX_ARCH),aarch64)
CFLAGS+= -march=armv8-a+crypto+crc
endif

0 comments on commit 4fdbbef

Please sign in to comment.