configure --enable-64bit=aarch64 broken
$ ./configure --enable-64bit=aarch64 ... $ make ... In file included from tclWin32Dll.c:16: cpuid.h:14:2: error: this header is for x86 only #error this header is for x86 only
This should tell enough about what's the problem.
The problem arises from [this] commit
59a525eb93(cherry-pick): Simplification for [d58e315172] version -> 8.6.17 for futher development check-in2025-01-08 11:28:361dd56a242c(cherry-pick): Simplification for [d58e315172] check-in2025-01-08 08:36:244e87493367Simplification for [d58e315172] check-in2025-01-07 15:42:151c27785451Simplification for [d58e315172] check-in2025-01-05 20:38:40
Which toolchain do you use exactly?
I cannot reproduce it by this cross-compile (ARM64 mode) with gcc 8.1.0..14.2.0 (or with clang 19.1.1), neither from mingw nor from linux (aarch64-w64-mingw32-gcc). Any of them was built successfully.
This was also another goal of the fix, since cpuid.h supports more targets than it was provided by inlined asm codes of tclWin32Dll.
But seems to need a checker on configure phase now (to disable it with something like ifdef __arm__ or HAVE_CPUID would be too heavy in my opinion, since my toolchains compile it without any issue).
clang version 14.0.0 (https://github.com/llvm/llvm-project.git f5f0bd8e3d972d040827c88adf1a9880ebcb821e) Target: aarch64-w64-windows-gnu Thread model: posix
I hope [2ca317244b985938] will fix it. Can you please confirm, Jan?
[this] works. --enable-64bit=arm64 and --enable-64bit=aarch64 should be synonymes, which still didn't work correctly. That should be fixed now too.
Thanks!
Looks like that was another cross-compile issue, but...
Let's close it then.
Many thanks for the fix!
Looking again at it, I think the handling of __cpuid can be simplified a lot more for 8.7 and 9.0 (but not for 8.6). We now only support MSVC 2015+, which means that intrinsics are always available. And we only support compilers with C11, which - I guess - all have <cpuid.h>. If not, not supplying __cpuid wouldn't be noticed by anyone.
Here is my proposal for further simplifications: https://core.tcl-lang.org/tcl/timeline?r=bug-d58e315172