1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/quickjs/00-makefile.patch
2020-04-10 20:48:18 +03:00

41 lines
1,009 B
Diff

Source: Chloe "SpaceToast" Kudryavtsev <toast@toast.cafe>
Remove When: The default Makefile doesn't enforce 32 bit binaries and allows for static linking.
1. Make M32 mode conditional and not dependent on cross-compilation (off by default).
2. Fix up LIBS.
3. Allow for static linking.
--- a/Makefile 2019-09-04 19:14:04.134679886 -0400
+++ b/Makefile 2019-09-04 19:15:42.761338716 -0400
@@ -33,6 +33,7 @@
#CONFIG_WERROR=y
# force 32 bit build for some utilities
#CONFIG_M32=y
+#CONFIG_STATIC=y
ifdef CONFIG_DARWIN
# use clang instead of gcc
@@ -105,6 +106,9 @@
CFLAGS_OPT=$(CFLAGS) -O2
CFLAGS_NOLTO:=$(CFLAGS_OPT)
LDFLAGS=-g
+ifdef CONFIG_STATIC
+LDFLAGS+=-static
+endif
ifdef CONFIG_LTO
CFLAGS_SMALL+=-flto
CFLAGS_OPT+=-flto
@@ -118,11 +122,11 @@
CFLAGS+=-fsanitize=address
LDFLAGS+=-fsanitize=address
endif
-ifdef CONFIG_WIN32
-LDEXPORT=
-else
+ifndef CONFIG_WIN32
+ifndef CONFIG_STATIC
LDEXPORT=-rdynamic
endif
+endif
PROGS=qjs$(EXE) qjsc$(EXE) run-test262
ifneq ($(CROSS_PREFIX),)