--- a/mozjs102.SlackBuild 2023-02-01 05:00:40.072979358 +0000 +++ b/mozjs102.SlackBuild 2023-02-02 19:33:42.956444540 +0000 @@ -59,6 +59,12 @@ if [ "$ARCH" = "i586" ]; then elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "riscv64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" @@ -91,6 +97,10 @@ find . \ ( cd $CWD/autoconf ; ./autoconf.build ) PATH=$TMP/autoconf-tmp/usr/bin:$PATH +# Choose a compiler (gcc/g++ or clang/clang++): +export CC=${CC:-gcc} +export CXX=${CXX:-g++} + # Patches from Fedora: zcat $CWD/patches/fix-soname.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/patches/copy-headers.patch.gz | patch -p1 --verbose || exit 1