Skip to content

rhash 1.4.6 erroneously detects sse4 and sha1/sha-ni on old x86-64-v1 cpu on FreeBSD 14.5 #312

Open

Description

@transpetaflops

While compiling rhash on FreeBSD 14.5-RELEASE on an old x86-64-v1 cpu, the configure script detects sha1 and enables both -msse4 and -msha during compilation - instructions that are missing on that particular microarchitecture level and causes CMake to crash with Illegal operation on every Port that nneds it.

===> Configuring for rhash-1.4.6
Checking for sources ... RHash 1.4.6
Checking for target OS ... FreeBSD
Checking for cc version ... clang 21.1.8
Checking for linker support for dlopen ... yes
Checking for sha1 intrinsics ... yes

The cpu in question does have sse3 and ssse3 though which is part of the x86-64-v2 microarchitecture level. Perhaps this is related to the faulty detection?

CPU: Intel(R) Atom(TM) CPU D525 @ 1.80GHz (1800.09-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x106ca Family=0x6 Model=0x1c Stepping=10
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x40e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE>
AMD Features=0x20100800<SYSCALL,NX,LM>
AMD Features2=0x1
TSC: P-state invariant, performance statistics

I have tested the patch in 2852673 which was referenced in the similar issue #308 but it still detects the non existing instructions. Please let me know if I can provide further information or perform other test.

Regards
Morgan Wesström

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions