From c638f5a2499f6a70c84fa3f9cf4f99c261fad62c Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 17 Apr 2021 06:07:59 +0200 Subject: [PATCH] quickjs: actually properly fix libatomic stuff this was not visible for cross because qjsc is called from host --- srcpkgs/quickjs/patches/atomic.patch | 12 ++++++++++++ srcpkgs/quickjs/template | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/quickjs/patches/atomic.patch diff --git a/srcpkgs/quickjs/patches/atomic.patch b/srcpkgs/quickjs/patches/atomic.patch new file mode 100644 index 00000000000..2e67bc6719a --- /dev/null +++ b/srcpkgs/quickjs/patches/atomic.patch @@ -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) { diff --git a/srcpkgs/quickjs/template b/srcpkgs/quickjs/template index 611c47bec88..a1c9f8d1c36 100644 --- a/srcpkgs/quickjs/template +++ b/srcpkgs/quickjs/template @@ -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