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