quickjs: actually properly fix libatomic stuff

this was not visible for cross because qjsc is called from host
This commit is contained in:
q66 2021-04-17 06:07:59 +02:00
parent 533399e07e
commit c638f5a249
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--- qjsc.c
+++ qjsc.c
@@ -452,6 +452,9 @@ static int output_executable(const char *out_filename, const char *cfilename,
*arg++ = "-lm";
*arg++ = "-ldl";
*arg++ = "-lpthread";
+#ifdef LINK_ATOMIC
+ *arg++ = "-latomic";
+#endif
*arg = NULL;
if (verbose) {

View File

@ -1,7 +1,7 @@
# Template file for 'quickjs'
pkgname=quickjs
version=2021.03.27
revision=1
revision=2
wrksrc="${pkgname}-${version//./-}"
build_style=gnu-makefile
make_use_env=true
@ -21,6 +21,7 @@ fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
CFLAGS+=" -DLINK_ATOMIC"
export EXTRA_LIBS="-latomic"
fi