* [PR PATCH] j: update to 901.d.
@ 2020-01-21 1:58 voidlinux-github
2020-01-21 13:23 ` [PR PATCH] [Updated] " voidlinux-github
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-21 1:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
There is a new pull request by xelxebar against master on the void-packages repository
https://github.com/xelxebar/void-packages package/j
https://github.com/void-linux/void-packages/pull/18441
j: update to 901.d.
A patch file from https://github.com/void-linux/void-packages/pull/18441.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-package/j-18441.patch --]
[-- Type: text/x-diff, Size: 1908 bytes --]
From d99c12fd22c7a70191b9be1e2cc62a9ed5581a2b Mon Sep 17 00:00:00 2001
From: "B. Wilson" <x@wilsonb.com>
Date: Tue, 21 Jan 2020 10:51:34 +0900
Subject: [PATCH] j: update to 901.d.
---
srcpkgs/j/patches/crossbuild-libj.patch | 19 ++++++++++++++++---
srcpkgs/j/template | 4 ++--
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/j/patches/crossbuild-libj.patch b/srcpkgs/j/patches/crossbuild-libj.patch
index 34a7786c82b..53b4498763a 100644
--- a/srcpkgs/j/patches/crossbuild-libj.patch
+++ b/srcpkgs/j/patches/crossbuild-libj.patch
@@ -1,9 +1,22 @@
---- make/build_libj.sh 2020-01-19 11:41:50.017038941 +0900
-+++ make/build_libj.sh 2020-01-19 11:47:52.455846176 +0900
-@@ -10,19 +10,20 @@
+--- make/build_libj.sh 2020-01-21 10:40:52.727723713 +0900
++++ make/build_libj.sh 2020-01-21 10:43:13.314100694 +0900
+@@ -10,32 +10,20 @@
# too early to move main linux release package to gcc 5
macmin="-mmacosx-version-min=10.6"
+-
+-if [ "x$CC" = x'' ] ; then
+-if [ -f "/usr/bin/cc" ]; then
+-CC=cc
+-else
+-if [ -f "/usr/bin/clang" ]; then
+-CC=clang
+-else
+-CC=gcc
+-fi
+-fi
+-export CC
+-fi
+ccver=$(${CC} --version)
USE_OPENMP="${USE_OPENMP:=0}"
diff --git a/srcpkgs/j/template b/srcpkgs/j/template
index d4dbec09909..b8e1504f9fe 100644
--- a/srcpkgs/j/template
+++ b/srcpkgs/j/template
@@ -1,7 +1,7 @@
# Template file for 'j'
pkgname=j
_vmaj=901
-_vmin=c
+_vmin=d
_vrel=${_vmaj}-release${_vmin:+-}${_vmin}
version=${_vmaj}.${_vmin}
revision=1
@@ -14,7 +14,7 @@ maintainer="B. Wilson <x@wilsonb.com>"
license="GPL-3.0-or-later"
homepage="https://jsoftware.com/"
distfiles="https://github.com/jsoftware/jsource/archive/j${_vrel}.tar.gz"
-checksum=3e7b7f9ea8e23bf055bee0761ea8928e7ff616131b7ab66918956404d8750252
+checksum=5d581c3587253566375f4229dd76ec4108f6eea80d7e4ccf5725328c9f8b408a
_jsz="j${XBPS_TARGET_WORDSIZE}"
_jtype="release"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] j: update to 901.d.
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
@ 2020-01-21 13:23 ` voidlinux-github
2020-01-21 13:25 ` voidlinux-github
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-21 13:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
There is an updated pull request by xelxebar against master on the void-packages repository
https://github.com/xelxebar/void-packages package/j
https://github.com/void-linux/void-packages/pull/18441
j: update to 901.d.
A patch file from https://github.com/void-linux/void-packages/pull/18441.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-package/j-18441.patch --]
[-- Type: text/x-diff, Size: 7765 bytes --]
From adcfac867a8fd9943e572e57e7f1be64fbde25a7 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <x@wilsonb.com>
Date: Tue, 21 Jan 2020 10:51:34 +0900
Subject: [PATCH] j: update to 901.d.
---
srcpkgs/j/patches/crossbuild-jconsole.patch | 19 ---
srcpkgs/j/patches/crossbuild-libj.patch | 25 ----
srcpkgs/j/template | 124 ++++++++++----------
3 files changed, 61 insertions(+), 107 deletions(-)
delete mode 100644 srcpkgs/j/patches/crossbuild-jconsole.patch
delete mode 100644 srcpkgs/j/patches/crossbuild-libj.patch
diff --git a/srcpkgs/j/patches/crossbuild-jconsole.patch b/srcpkgs/j/patches/crossbuild-jconsole.patch
deleted file mode 100644
index 00bda4ccd40..00000000000
--- a/srcpkgs/j/patches/crossbuild-jconsole.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- make/build_jconsole.sh 2019-12-17 18:25:11.713700768 +0900
-+++ make/build_jconsole.sh 2019-12-17 18:26:45.090341029 +0900
-@@ -5,6 +5,7 @@
- cd ~
-
- macmin="-mmacosx-version-min=10.6"
-+ccver=$(${CC} --version)
- USE_LINENOISE="${USE_LINENOISE:=1}"
-
- if [ "x$CC" = x'' ] ; then
-@@ -20,7 +21,7 @@
- export CC
- fi
-
--if [ $CC = "gcc" ] ; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- # gcc
- common=" -fPIC -O1 -fwrapv -fno-strict-aliasing -Wextra -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-sign-compare -Wno-clobbered -Wno-empty-body -Wno-unused-value -Wno-pointer-sign -Wno-parentheses"
- OVER_GCC_VER6=$(echo `$CC -dumpversion | cut -f1 -d.` \>= 6 | bc)
diff --git a/srcpkgs/j/patches/crossbuild-libj.patch b/srcpkgs/j/patches/crossbuild-libj.patch
deleted file mode 100644
index 34a7786c82b..00000000000
--- a/srcpkgs/j/patches/crossbuild-libj.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- make/build_libj.sh 2020-01-19 11:41:50.017038941 +0900
-+++ make/build_libj.sh 2020-01-19 11:47:52.455846176 +0900
-@@ -10,19 +10,20 @@
- # too early to move main linux release package to gcc 5
-
- macmin="-mmacosx-version-min=10.6"
-+ccver=$(${CC} --version)
-
- USE_OPENMP="${USE_OPENMP:=0}"
- if [ $USE_OPENMP -eq 1 ] ; then
- OPENMP=" -fopenmp "
- LDOPENMP=" -fopenmp "
--if [ -z "${$CCcc##*gcc*}" ] || [ -z "${CC##*gcc*}" ]; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- LDOPENMP32=" -l:libgomp.so.1 " # gcc
- else
- LDOPENMP32=" -l:libomp.so.5 " # clang
- fi
- fi
-
--if [ $CC = "gcc" ] ; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- # gcc
- common="$OPENMP -Werror -fPIC -O2 -fwrapv -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-clobbered -Wno-empty-body -Wno-unused-value -Wno-pointer-sign -Wno-parentheses -Wno-type-limits"
- GNUC_MAJOR=$(echo __GNUC__ | $CC -E -x c - | tail -n 1)
diff --git a/srcpkgs/j/template b/srcpkgs/j/template
index d4dbec09909..9313d02236f 100644
--- a/srcpkgs/j/template
+++ b/srcpkgs/j/template
@@ -1,7 +1,7 @@
# Template file for 'j'
pkgname=j
_vmaj=901
-_vmin=c
+_vmin=d
_vrel=${_vmaj}-release${_vmin:+-}${_vmin}
version=${_vmaj}.${_vmin}
revision=1
@@ -14,7 +14,7 @@ maintainer="B. Wilson <x@wilsonb.com>"
license="GPL-3.0-or-later"
homepage="https://jsoftware.com/"
distfiles="https://github.com/jsoftware/jsource/archive/j${_vrel}.tar.gz"
-checksum=3e7b7f9ea8e23bf055bee0761ea8928e7ff616131b7ab66918956404d8750252
+checksum=5d581c3587253566375f4229dd76ec4108f6eea80d7e4ccf5725328c9f8b408a
_jsz="j${XBPS_TARGET_WORDSIZE}"
_jtype="release"
@@ -25,8 +25,8 @@ _jetc="/etc/j"
_juser=".j"
case "${XBPS_TARGET_MACHINE}" in
-aarch64*) _jplatform="raspberry";;
-*) _jplatform="linux";;
+aarch64*) _jpl="raspberry";;
+*) _jpl="linux";;
esac
case "${XBPS_TARGET_MACHINE}" in
@@ -34,88 +34,86 @@ case "${XBPS_TARGET_MACHINE}" in
esac
-##
-# Crossbuilds do not distinguish between AVX- and non-AVX-enabled targets, so
-# here we build libraries for both cases.
-do_build() {
- sed "/jplatform/s@unknown@${_jplatform}@
+do_configure() {
+ sed "/jversion/s@${_vmaj}@${_vrel}@
+ /jplatform/s@unknown@${_jpl}@
/jtype/s@beta@${_jtype}@
/jbuilder/s@unknown@${_jbuilder}@" \
- jsrc/jversion-x.h > jsrc/jversion.h
-
- sed -i "/jgit=/s@~/git/jsource@${wrksrc}@
- /jbld=/s@~/jbld@${wrksrc}/build@
- /jplatform=/s@=.*\$@=${_jplatform}@
- /CC=/s@clang@${CC}@" \
- make/jvars.sh
+ jsrc/jversion-x.h > jsrc/jversion.h
sed -i "/^install=./s@/usr/share/j/[0-9.]\+@${_jshare}@
/^user=./s@home,userx@home,'/${_juser}'@" \
- jlibrary/bin/profile.ijs
+ jlibrary/bin/profile.ijs
+}
- mkdir -p build/${_jsz}/bin
- . make/jvars.sh
+##
+# Crossbuilds do not distinguish between AVX- and non-AVX targets, so instead
+# we build all applicable binaries.
+do_build() {
+ jplatform=${_jpl} j64x=${_jsz} make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz} make2/build_libj.sh
- make/build_jconsole.sh ${_jsz}
- make/build_libj.sh ${_jsz}
- make/build_libj.sh ${_jsz}nonavx
-}
+ if [ "${_jsz}" = 'j64' ]; then
+ jplatform=${_jpl} j64x=${_jsz}avx make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz}avx make2/build_libj.sh
-_runtestdir() {
- dir=${1}
- jc=${2}
- libj=${3}
-
- for f in "${dir}"/*.ijs; do
- printf '%s(%s): ' "${f}" "${libj}"
- if ${jc} -lib "${libj}" <"${f}" >/dev/null; then
- echo "PASS"
- else
- echo "FAIL"
- return 1
- fi
- done
+ jplatform=${_jpl} j64x=${_jsz}avx2 make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz}avx2 make2/build_libj.sh
+ fi
}
do_check() {
- ln -srf jlibrary/bin/* build/${_jsz}/bin/
- ln -srf jlibrary/{addons,system,tools} build/${_jsz}/
-
- # Test AVX-enabled library if all host CPUs have AVX flag set
- if sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
- _runtestdir ./test "build/${_jsz}/bin/jconsole" "libj.so"
+ if [ -d "${_jlib}/j64avx2" ] \
+ && sed -n '/^flags/{s/\<avx2\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx2'
+ elif [ -d "${_jlib}/j64avx" ] \
+ && sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx'
+ else
+ javx=''
fi
- _runtestdir ./test "build/${_jsz}/bin/jconsole" "libj-nonavx.so"
+
+ ln -srf jlibrary/bin/* bin/${_jpl}/${_jsz}${javx}/
+ ln -srf jlibrary/{addons,system,tools} bin/${_jpl}/
+
+ echo 'RECHO ddall' | "bin/${_jpl}/${_jsz}${javx}/jconsole" test/tsu.ijs
+}
+
+##
+# Script to detect AVX/AVX2 support and launch appropriate jconsole binary
+_jconsole_wrapper_script() {
+cat <<JC
+#!/usr/bin/env sh
+
+if [ -d "${_jlib}/j64avx2" ] \\
+ && sed -n '/^flags/{s/\<avx2\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx2'
+elif [ -d "${_jlib}/j64avx" ] \\
+ && sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx'
+elif [ -d "${_jlib}/j64" ]; then
+ javx=''
+else
+ >&2 echo "\${0}: Cannot find jconsole executable"
+ exit 1
+fi
+
+${_jlib}/${_jsz}\${javx}/jconsole -jprofile "${_jetc}/profile.ijs" "\${@}"
+JC
}
do_install() {
vmkdir "${_jshare}" 0755
- vcopy jlibrary/addons "${_jshare}"
vcopy jlibrary/system "${_jshare}"
vcopy jlibrary/tools "${_jshare}"
vmkdir "${_jlib}" 0755
- vinstall "build/${_jsz}/bin/jconsole" 755 "${_jlib}"
- vinstall "build/${_jsz}/bin/libj.so" 755 "${_jlib}"
- if [ -f "build/${_jsz}/bin/libj-nonavx.so" ]; then
- vinstall "build/${_jsz}/bin/libj-nonavx.so" 755 "${_jlib}"
- fi
+ vcopy "bin/${_jpl}/*" "${_jlib}"
vmkdir "${_jetc}" 0755
vinstall "${FILESDIR}/profilex_template.ijs" 644 "${_jetc}"
vinstall "jlibrary/bin/profile.ijs" 644 "${_jetc}"
- cat >build/${_jsz}/bin/jc.sh <<-JC
- #!/usr/bin/env sh
-
- if [ -f "${_jlib}/libj-nonavx.so" ] \\
- && ! sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
- lib='libj-nonavx.so'
- fi
-
- ${_jlib}/jconsole -lib "${_jlib}/\${lib:-libj.so}" \\
- -jprofile "${_jetc}/profile.ijs" \\
- "\${@}"
- JC
- vbin "build/${_jsz}/bin/jc.sh" jc
+ _jconsole_wrapper_script >bin/jc.sh
+ vbin "bin/jc.sh" jc
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: j: update to 901.d.
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
2020-01-21 13:23 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-01-21 13:25 ` voidlinux-github
2020-01-24 3:43 ` [PR PATCH] [Updated] " voidlinux-github
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-21 13:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
New comment by xelxebar on void-packages repository
https://github.com/void-linux/void-packages/pull/18441#issuecomment-576680306
Comment:
The force-push overhauls the entire package. Now we should have AVX2 support as well as no longer needing the patches to upstream.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] j: update to 901.d.
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
2020-01-21 13:23 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-21 13:25 ` voidlinux-github
@ 2020-01-24 3:43 ` voidlinux-github
2020-01-24 3:45 ` voidlinux-github
2020-01-24 9:19 ` [PR PATCH] [Merged]: " voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-24 3:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
There is an updated pull request by xelxebar against master on the void-packages repository
https://github.com/xelxebar/void-packages package/j
https://github.com/void-linux/void-packages/pull/18441
j: update to 901.d.
A patch file from https://github.com/void-linux/void-packages/pull/18441.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-package/j-18441.patch --]
[-- Type: text/x-diff, Size: 7817 bytes --]
From 70e19d5d06bd8e453d0cc88ea00fe54968b3a787 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <x@wilsonb.com>
Date: Tue, 21 Jan 2020 10:51:34 +0900
Subject: [PATCH] j: update to 901.d.
---
srcpkgs/j/patches/crossbuild-jconsole.patch | 19 ---
srcpkgs/j/patches/crossbuild-libj.patch | 25 ----
srcpkgs/j/template | 125 ++++++++++----------
3 files changed, 62 insertions(+), 107 deletions(-)
delete mode 100644 srcpkgs/j/patches/crossbuild-jconsole.patch
delete mode 100644 srcpkgs/j/patches/crossbuild-libj.patch
diff --git a/srcpkgs/j/patches/crossbuild-jconsole.patch b/srcpkgs/j/patches/crossbuild-jconsole.patch
deleted file mode 100644
index 00bda4ccd40..00000000000
--- a/srcpkgs/j/patches/crossbuild-jconsole.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- make/build_jconsole.sh 2019-12-17 18:25:11.713700768 +0900
-+++ make/build_jconsole.sh 2019-12-17 18:26:45.090341029 +0900
-@@ -5,6 +5,7 @@
- cd ~
-
- macmin="-mmacosx-version-min=10.6"
-+ccver=$(${CC} --version)
- USE_LINENOISE="${USE_LINENOISE:=1}"
-
- if [ "x$CC" = x'' ] ; then
-@@ -20,7 +21,7 @@
- export CC
- fi
-
--if [ $CC = "gcc" ] ; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- # gcc
- common=" -fPIC -O1 -fwrapv -fno-strict-aliasing -Wextra -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-sign-compare -Wno-clobbered -Wno-empty-body -Wno-unused-value -Wno-pointer-sign -Wno-parentheses"
- OVER_GCC_VER6=$(echo `$CC -dumpversion | cut -f1 -d.` \>= 6 | bc)
diff --git a/srcpkgs/j/patches/crossbuild-libj.patch b/srcpkgs/j/patches/crossbuild-libj.patch
deleted file mode 100644
index 34a7786c82b..00000000000
--- a/srcpkgs/j/patches/crossbuild-libj.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- make/build_libj.sh 2020-01-19 11:41:50.017038941 +0900
-+++ make/build_libj.sh 2020-01-19 11:47:52.455846176 +0900
-@@ -10,19 +10,20 @@
- # too early to move main linux release package to gcc 5
-
- macmin="-mmacosx-version-min=10.6"
-+ccver=$(${CC} --version)
-
- USE_OPENMP="${USE_OPENMP:=0}"
- if [ $USE_OPENMP -eq 1 ] ; then
- OPENMP=" -fopenmp "
- LDOPENMP=" -fopenmp "
--if [ -z "${$CCcc##*gcc*}" ] || [ -z "${CC##*gcc*}" ]; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- LDOPENMP32=" -l:libgomp.so.1 " # gcc
- else
- LDOPENMP32=" -l:libomp.so.5 " # clang
- fi
- fi
-
--if [ $CC = "gcc" ] ; then
-+if [ -z "${ccver##*(GCC)*}" ]; then
- # gcc
- common="$OPENMP -Werror -fPIC -O2 -fwrapv -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-clobbered -Wno-empty-body -Wno-unused-value -Wno-pointer-sign -Wno-parentheses -Wno-type-limits"
- GNUC_MAJOR=$(echo __GNUC__ | $CC -E -x c - | tail -n 1)
diff --git a/srcpkgs/j/template b/srcpkgs/j/template
index d4dbec09909..3874aa484ff 100644
--- a/srcpkgs/j/template
+++ b/srcpkgs/j/template
@@ -1,7 +1,7 @@
# Template file for 'j'
pkgname=j
_vmaj=901
-_vmin=c
+_vmin=d
_vrel=${_vmaj}-release${_vmin:+-}${_vmin}
version=${_vmaj}.${_vmin}
revision=1
@@ -14,7 +14,7 @@ maintainer="B. Wilson <x@wilsonb.com>"
license="GPL-3.0-or-later"
homepage="https://jsoftware.com/"
distfiles="https://github.com/jsoftware/jsource/archive/j${_vrel}.tar.gz"
-checksum=3e7b7f9ea8e23bf055bee0761ea8928e7ff616131b7ab66918956404d8750252
+checksum=5d581c3587253566375f4229dd76ec4108f6eea80d7e4ccf5725328c9f8b408a
_jsz="j${XBPS_TARGET_WORDSIZE}"
_jtype="release"
@@ -25,8 +25,8 @@ _jetc="/etc/j"
_juser=".j"
case "${XBPS_TARGET_MACHINE}" in
-aarch64*) _jplatform="raspberry";;
-*) _jplatform="linux";;
+aarch64*) _jpl="raspberry";;
+*) _jpl="linux";;
esac
case "${XBPS_TARGET_MACHINE}" in
@@ -34,88 +34,87 @@ case "${XBPS_TARGET_MACHINE}" in
esac
-##
-# Crossbuilds do not distinguish between AVX- and non-AVX-enabled targets, so
-# here we build libraries for both cases.
-do_build() {
- sed "/jplatform/s@unknown@${_jplatform}@
+do_configure() {
+ sed "/jversion/s@${_vmaj}@${_vrel}@
+ /jplatform/s@unknown@${_jpl}@
/jtype/s@beta@${_jtype}@
/jbuilder/s@unknown@${_jbuilder}@" \
- jsrc/jversion-x.h > jsrc/jversion.h
-
- sed -i "/jgit=/s@~/git/jsource@${wrksrc}@
- /jbld=/s@~/jbld@${wrksrc}/build@
- /jplatform=/s@=.*\$@=${_jplatform}@
- /CC=/s@clang@${CC}@" \
- make/jvars.sh
+ jsrc/jversion-x.h > jsrc/jversion.h
sed -i "/^install=./s@/usr/share/j/[0-9.]\+@${_jshare}@
/^user=./s@home,userx@home,'/${_juser}'@" \
- jlibrary/bin/profile.ijs
+ jlibrary/bin/profile.ijs
+}
- mkdir -p build/${_jsz}/bin
- . make/jvars.sh
+##
+# Crossbuilds do not distinguish between AVX- and non-AVX targets, so instead
+# we build all applicable binaries.
+do_build() {
+ jplatform=${_jpl} j64x=${_jsz} make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz} make2/build_libj.sh
- make/build_jconsole.sh ${_jsz}
- make/build_libj.sh ${_jsz}
- make/build_libj.sh ${_jsz}nonavx
-}
+ if [ "${_jsz}" = 'j64' ]; then
+ jplatform=${_jpl} j64x=${_jsz}avx make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz}avx make2/build_libj.sh
-_runtestdir() {
- dir=${1}
- jc=${2}
- libj=${3}
-
- for f in "${dir}"/*.ijs; do
- printf '%s(%s): ' "${f}" "${libj}"
- if ${jc} -lib "${libj}" <"${f}" >/dev/null; then
- echo "PASS"
- else
- echo "FAIL"
- return 1
- fi
- done
+ jplatform=${_jpl} j64x=${_jsz}avx2 make2/build_jconsole.sh
+ jplatform=${_jpl} j64x=${_jsz}avx2 make2/build_libj.sh
+ fi
}
do_check() {
- ln -srf jlibrary/bin/* build/${_jsz}/bin/
- ln -srf jlibrary/{addons,system,tools} build/${_jsz}/
-
- # Test AVX-enabled library if all host CPUs have AVX flag set
- if sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
- _runtestdir ./test "build/${_jsz}/bin/jconsole" "libj.so"
+ if [ -d "${_jlib}/j64avx2" ] \
+ && sed -n '/^flags/{s/\<avx2\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx2'
+ elif [ -d "${_jlib}/j64avx" ] \
+ && sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
+ javx='avx'
+ else
+ javx=''
fi
- _runtestdir ./test "build/${_jsz}/bin/jconsole" "libj-nonavx.so"
+
+ ln -srf jlibrary/bin/* bin/${_jpl}/${_jsz}${javx}/
+ ln -srf jlibrary/{addons,system,tools} bin/${_jpl}/
+
+ echo 'RECHO ddall' | "bin/${_jpl}/${_jsz}${javx}/jconsole" test/tsu.ijs
+}
+
+##
+# Script to detect AVX/AVX2 support and launch appropriate jconsole binary
+_jconsole_wrapper_script() {
+cat <<JC
+#!/usr/bin/env sh
+
+cpu_has_avx() { sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; }
+cpu_has_avx2() { sed -n '/^flags/{s/\<avx2\>//;t;q1}' /proc/cpuinfo; }
+
+if [ -d "${_jlib}/j64avx2" ] && cpu_has_avx2; then
+ javx='avx2'
+elif [ -d "${_jlib}/j64avx" ] && cpu_has_avx; then
+ javx='avx'
+elif [ -d "${_jlib}/j64" ]; then
+ javx=''
+else
+ >&2 echo "\${0}: Cannot find jconsole executable"
+ exit 1
+fi
+
+${_jlib}/${_jsz}\${javx}/jconsole -jprofile "${_jetc}/profile.ijs" "\${@}"
+JC
}
do_install() {
vmkdir "${_jshare}" 0755
- vcopy jlibrary/addons "${_jshare}"
vcopy jlibrary/system "${_jshare}"
vcopy jlibrary/tools "${_jshare}"
vmkdir "${_jlib}" 0755
- vinstall "build/${_jsz}/bin/jconsole" 755 "${_jlib}"
- vinstall "build/${_jsz}/bin/libj.so" 755 "${_jlib}"
- if [ -f "build/${_jsz}/bin/libj-nonavx.so" ]; then
- vinstall "build/${_jsz}/bin/libj-nonavx.so" 755 "${_jlib}"
- fi
+ vcopy "bin/${_jpl}/*" "${_jlib}"
vmkdir "${_jetc}" 0755
vinstall "${FILESDIR}/profilex_template.ijs" 644 "${_jetc}"
vinstall "jlibrary/bin/profile.ijs" 644 "${_jetc}"
- cat >build/${_jsz}/bin/jc.sh <<-JC
- #!/usr/bin/env sh
-
- if [ -f "${_jlib}/libj-nonavx.so" ] \\
- && ! sed -n '/^flags/{s/\<avx\>//;t;q1}' /proc/cpuinfo; then
- lib='libj-nonavx.so'
- fi
-
- ${_jlib}/jconsole -lib "${_jlib}/\${lib:-libj.so}" \\
- -jprofile "${_jetc}/profile.ijs" \\
- "\${@}"
- JC
- vbin "build/${_jsz}/bin/jc.sh" jc
+ _jconsole_wrapper_script >bin/jc.sh
+ vbin "bin/jc.sh" jc
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: j: update to 901.d.
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
` (2 preceding siblings ...)
2020-01-24 3:43 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-01-24 3:45 ` voidlinux-github
2020-01-24 9:19 ` [PR PATCH] [Merged]: " voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-24 3:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
New comment by xelxebar on void-packages repository
https://github.com/void-linux/void-packages/pull/18441#issuecomment-577979771
Comment:
Blah. Forgot to xlint.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Merged]: j: update to 901.d.
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
` (3 preceding siblings ...)
2020-01-24 3:45 ` voidlinux-github
@ 2020-01-24 9:19 ` voidlinux-github
4 siblings, 0 replies; 6+ messages in thread
From: voidlinux-github @ 2020-01-24 9:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
There's a merged pull request on the void-packages repository
j: update to 901.d.
https://github.com/void-linux/void-packages/pull/18441
Description:
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-24 9:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 1:58 [PR PATCH] j: update to 901.d voidlinux-github
2020-01-21 13:23 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-21 13:25 ` voidlinux-github
2020-01-24 3:43 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-24 3:45 ` voidlinux-github
2020-01-24 9:19 ` [PR PATCH] [Merged]: " voidlinux-github
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).