> An option would be to enable the HWSHA2 flag on amd64 only and leave up to 
> the users to specify -hw or not, depending on the machine at hand.

Sounds good. I don’t have a i386 available anymore, so I could not test that - 
sorry!

> On Mittwoch, Mai 03, 2023 at 6:12 PM, Omar Polo <[email protected] 
> (mailto:[email protected])> wrote:
> On 2023/05/02 21:32:52 +0200, tux0r <[email protected]> wrote:
> > zpaqfranz 58.2 fixes (among others) the HWSHA2 flag on OpenBSD/amd64.
>
> `zpaqfranz autotest -hw -all' crashes on i386 from SIGILL (illegal
> instruction) in sha256_transform_x86(). Glancing at the code hidden
> behind #ifdef HWSHA2 it seems like it tries to support x86 but not
> always.
>
> it's also confusing since it claims in some comments that there's no
> cpuid check "for performance" but in fact there is a cpuid check used
> in some parts... it's a bit of a mess.
>
> I guess that the rufus code (where it crashes on i386) is amd64 only
> since it has a leading
>
> RUFUS_ENABLE_GCC_ARCH("ssse3,sse4.1,sha")
> i.e.
> __attribute__((target ("ssse3,sse4.1,sha")))
>
> on the other hand, the cpuid check seems to work "somehow" and so only
> manually specifying -hw leads to a crash. `zpaqfranz autotest -all'
> on i386 works fine.
>
> An option would be to enable the HWSHA2 flag on amd64 only and leave
> up to the users to specify -hw or not, depending on the machine at
> hand.
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/archivers/zpaqfranz/Makefile,v
> retrieving revision 1.16
> diff -u -p -r1.16 Makefile
> --- Makefile 26 Apr 2023 08:36:39 -0000 1.16
> +++ Makefile 3 May 2023 14:35:05 -0000
> @@ -4,7 +4,7 @@ COMMENT = journaling archiver for increm
>
> GH_ACCOUNT = fcorbelli
> GH_PROJECT = zpaqfranz
> -GH_TAGNAME = 58.1
> +GH_TAGNAME = 58.2
>
> CATEGORIES = archivers
> MAINTAINER = tux0r <[email protected]>
> @@ -18,9 +18,14 @@ WANTLIB = ${COMPILER_LIBCXX} c m
>
> USE_WXNEEDED = Yes
>
> +CPPFLAGS += -Dunix
> +.if ${MACHINE_ARCH:Mamd64}
> +CPPFLAGS += -DHWSHA2
> +.endif
> +
> do-build:
> cd ${WRKSRC} && ${SET_ENV} ${MAKE_ENV} \
> - ${CXX} ${CXXFLAGS} -Dunix -o zpaqfranz zpaqfranz.cpp -lm -lpthread
> + ${CXX} ${CXXFLAGS} ${CPPFLAGS} -o zpaqfranz zpaqfranz.cpp -lm -lpthread
>
> do-install:
> ${INSTALL_PROGRAM} ${WRKSRC}/zpaqfranz ${PREFIX}/bin/
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/archivers/zpaqfranz/distinfo,v
> retrieving revision 1.13
> diff -u -p -r1.13 distinfo
> --- distinfo 26 Apr 2023 08:36:39 -0000 1.13
> +++ distinfo 3 May 2023 10:29:41 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (zpaqfranz-58.1.tar.gz) = Gtg2hMIVZsDTmhKm5VfY+A0qGSdJxL/l5MOZ7hbR3hY=
> -SIZE (zpaqfranz-58.1.tar.gz) = 5274310
> +SHA256 (zpaqfranz-58.2.tar.gz) = e2bJS7Iv8DIFd3wL4OcHR6D3747/m5nisaw4SqSVl38=
> +SIZE (zpaqfranz-58.2.tar.gz) = 5284676

Reply via email to