rpm-software-management / rpm

The RPM package manager
http://rpm.org
Other
504 stars 364 forks source link

is_pentium3 is_pentium4 return bogus values on modern CPUs #2147

Open brjsp opened 2 years ago

brjsp commented 2 years ago

The function is_pentium3 is_pentium4 in lib/rpmrc.c return false on modern (x64) or non-Intel CPUs, preventing building or installation of RPMs tagged with such an architecture.

I'm guessing that, to be useful, the pentium3 RPM architecture should correspond to the presence of SSE extensions, and pentium4 to SSE2 (as it does with GCC, for instance), instead of hardcoding specific CPU models.

I also assume that geode is 3dNow and athlon is Pentium3 with 3dNow — in which case it's incorrect to make athlon packages installable on x86_64, as not all 64-bit CPUs have 3dNow (while all have SSE2, for comparison)

pmatilai commented 2 years ago

Yup, the assembly fubar just needed to die 10+ years ago.

brjsp commented 2 years ago

More like 20. SSE2 was introduced in 2000.

While Linux distros have a long tradition of maintaining support for ancient / weird hardware, it would be really nice to be able to mark a specific package as requiring SSE or SSE2 because of hand-written assembly (the specific example i have in mind is Chromium). You can't do this rn and have to settle for “BuildArch: i686” to ensure it will install also on AMD/VIA/whatever.

Note also that while SUSE still supports the original i586, but the Fedora “i686” port is actually Pentium4 these days…

mimi1vx commented 2 years ago

Note also that while SUSE still supports the original i586, but the Fedora “i686” port is actually Pentium4 these days…

no SUSE don't support any 32bit x86, openSUSE still supports i586 only on Tumbleweed and only because is still buildable :D