Are there any way for building x86_64 arch target rpm on a 32 bit rpmbuild build system?
$ rpmbuild -ba --target=x86_64 kernel64.spec
Building target platforms: x86_64
Building for target x86_64
error: No compatible architectures found for build
I have also tried setarch.
$ setarch x86_64 rpmbuild -ba --target=x86_64 kernel64.spec
setarch: x86_64: Unrecognized architecture
You can set up an x86_64 chroot (assuming the cpu can do both x86_64/ix86), or you can attempt a cross compiler to build x86_64 on ix86.
The issue is often that ix86 gcc tools do not support x86_64.