Building secondary architectures for 32 bit support in x86_64 Haiku

For making https://review.haiku-os.org/c/haiku/+/2874 to work, 32 bit secondary archivecture binary packages are needed. How to build them? I tried ../configure --target-arch x86_64 --target-arch x86 --target-arch x86_gcc2 --distro-compatibility official, but it failed on both 32 and 64 bits.

On 32 bits:

Unsupported target architecture: "x86_64". Only native architectures of the host platform can be specified.

On 64 bits:

Unsupported target architecture: "x86". Only native architectures of the host platform can be specified.
Unsupported target architecture: "x86_gcc2". Only native architectures of the host platform can be specified.
1 Like

../configure --build-cross-tools x86_64 ../../buildtools --build-cross-tools x86 seems work, but build is not yet finished.

Now I get this error:

PreprocessSyscalls objects/haiku/x86/common/tools/gensyscalls/syscalls.h.pp.parsable 
In file included from ../headers/os/support/Errors.h:9,
                 from ../headers/os/support/SupportDefs.h:13,
                 from ../headers/os/storage/DiskDeviceDefs.h:9,
                 from ../headers/private/system/syscalls.h:10:
../headers/posix/limits.h:12:10: fatal error: float.h: No such file or directory
 #include <float.h>  /* for DBL_DIG, FLT_DIG, etc */
          ^~~~~~~~~
1 Like