Nick: PaulePanter E-mail: none Board: unknown Contents: $ clang -v -fuse-ld=lld -nostdlib -r -o build/smm/smm.o -Wl,--whole-archive,--start-group build/smm/mainboard/emulation/qemu-q35/static.o build/smm/acpi/acpi_pm.o build/smm/arch/x86/memcpy.o build/smm/arch/x86/memmove_32.o build/smm/arch/x86/memset.o build/smm/arch/x86/mmap_boot.o build/smm/commonlib/bsd/cbfs_mcache.o build/smm/commonlib/bsd/cbfs_private.o build/smm/commonlib/bsd/elog.o build/smm/commonlib/iobuf.o build/smm/commonlib/mem_pool.o build/smm/commonlib/region.o build/smm/console/die.o build/smm/console/post.o build/smm/cpu/x86/pae/pgtbl.o build/smm/cpu/x86/smi_trigger.o build/smm/cpu/x86/smm/save_state.o build/smm/cpu/x86/smm/smm_module_handler.o build/smm/cpu/x86/tsc/delay_tsc.o build/smm/device/device_const.o build/smm/device/pci_ops.o build/smm/drivers/pc80/pc/i8254.o build/smm/drivers/pc80/rtc/mc146818rtc.o build/smm/lib/boot_device.o build/smm/lib/cbfs.o build/smm/lib/crc_byte.o build/smm/lib/delay.o build/smm/lib/fmap.o build/smm/lib/halt.o build/smm/lib/hexdump.o build/smm/lib/memcmp.o build/smm/lib/reset.o build/smm/lib/string.o build/smm/lib/version.o build/smm/mainboard/emulation/qemu-q35/memmap.o build/smm/mainboard/emulation/qemu-q35/smi.o build/smm/southbridge/intel/common/gpio.o build/smm/southbridge/intel/common/pmbase.o build/smm/southbridge/intel/common/pmutil.o build/smm/southbridge/intel/common/smihandler.o build/smm/southbridge/intel/i82801ix/smihandler.o -Wl,--no-whole-archive /usr/lib/gcc/x86_64-linux-gnu/12/32/libgcc.a -Wl,--end-group,--oformat=elf32-i386 Debian clang version 14.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 "/usr/bin/ld.lld" --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o build/smm/smm.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/12 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib -r --whole-archive --start-group build/smm/mainboard/emulation/qemu-q35/static.o build/smm/acpi/acpi_pm.o build/smm/arch/x86/memcpy.o build/smm/arch/x86/memmove_32.o build/smm/arch/x86/memset.o build/smm/arch/x86/mmap_boot.o build/smm/commonlib/bsd/cbfs_mcache.o build/smm/commonlib/bsd/cbfs_private.o build/smm/commonlib/bsd/elog.o build/smm/commonlib/iobuf.o build/smm/commonlib/mem_pool.o build/smm/commonlib/region.o build/smm/console/die.o build/smm/console/post.o build/smm/cpu/x86/pae/pgtbl.o build/smm/cpu/x86/smi_trigger.o build/smm/cpu/x86/smm/save_state.o build/smm/cpu/x86/smm/smm_module_handler.o build/smm/cpu/x86/tsc/delay_tsc.o build/smm/device/device_const.o build/smm/device/pci_ops.o build/smm/drivers/pc80/pc/i8254.o build/smm/drivers/pc80/rtc/mc146818rtc.o build/smm/lib/boot_device.o build/smm/lib/cbfs.o build/smm/lib/crc_byte.o build/smm/lib/delay.o build/smm/lib/fmap.o build/smm/lib/halt.o build/smm/lib/hexdump.o build/smm/lib/memcmp.o build/smm/lib/reset.o build/smm/lib/string.o build/smm/lib/version.o build/smm/mainboard/emulation/qemu-q35/memmap.o build/smm/mainboard/emulation/qemu-q35/smi.o build/smm/southbridge/intel/common/gpio.o build/smm/southbridge/intel/common/pmbase.o build/smm/southbridge/intel/common/pmutil.o build/smm/southbridge/intel/common/smihandler.o build/smm/southbridge/intel/i82801ix/smihandler.o --no-whole-archive /usr/lib/gcc/x86_64-linux-gnu/12/32/libgcc.a --end-group --oformat=elf32-i386 ld.lld: error: build/smm/mainboard/emulation/qemu-q35/static.o is incompatible with elf_x86_64 ld.lld: error: build/smm/acpi/acpi_pm.o is incompatible with elf_x86_64 ld.lld: error: build/smm/arch/x86/memcpy.o is incompatible with elf_x86_64 ld.lld: error: build/smm/arch/x86/memmove_32.o is incompatible with elf_x86_64 ld.lld: error: build/smm/arch/x86/memset.o is incompatible with elf_x86_64 ld.lld: error: build/smm/arch/x86/mmap_boot.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/bsd/cbfs_mcache.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/bsd/cbfs_private.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/bsd/elog.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/iobuf.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/mem_pool.o is incompatible with elf_x86_64 ld.lld: error: build/smm/commonlib/region.o is incompatible with elf_x86_64 ld.lld: error: build/smm/console/die.o is incompatible with elf_x86_64 ld.lld: error: build/smm/console/post.o is incompatible with elf_x86_64 ld.lld: error: build/smm/cpu/x86/pae/pgtbl.o is incompatible with elf_x86_64 ld.lld: error: build/smm/cpu/x86/smi_trigger.o is incompatible with elf_x86_64 ld.lld: error: build/smm/cpu/x86/smm/save_state.o is incompatible with elf_x86_64 ld.lld: error: build/smm/cpu/x86/smm/smm_module_handler.o is incompatible with elf_x86_64 ld.lld: error: build/smm/cpu/x86/tsc/delay_tsc.o is incompatible with elf_x86_64 ld.lld: error: build/smm/device/device_const.o is incompatible with elf_x86_64 ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) clang: error: linker command failed with exit code 1 (use -v to see invocation) # Manually without `-m elf_x86_64`: $ "/usr/bin/ld.lld" --hash-style=both --build-id --eh-frame-hdr -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o build/smm/smm.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/12 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib -r --whole-archive --start-group build/smm/mainboard/emulation/qemu-q35/static.o build/smm/acpi/acpi_pm.o build/smm/arch/x86/memcpy.o build/smm/arch/x86/memmove_32.o build/smm/arch/x86/memset.o build/smm/arch/x86/mmap_boot.o build/smm/commonlib/bsd/cbfs_mcache.o build/smm/commonlib/bsd/cbfs_private.o build/smm/commonlib/bsd/elog.o build/smm/commonlib/iobuf.o build/smm/commonlib/mem_pool.o build/smm/commonlib/region.o build/smm/console/die.o build/smm/console/post.o build/smm/cpu/x86/pae/pgtbl.o build/smm/cpu/x86/smi_trigger.o build/smm/cpu/x86/smm/save_state.o build/smm/cpu/x86/smm/smm_module_handler.o build/smm/cpu/x86/tsc/delay_tsc.o build/smm/device/device_const.o build/smm/device/pci_ops.o build/smm/drivers/pc80/pc/i8254.o build/smm/drivers/pc80/rtc/mc146818rtc.o build/smm/lib/boot_device.o build/smm/lib/cbfs.o build/smm/lib/crc_byte.o build/smm/lib/delay.o build/smm/lib/fmap.o build/smm/lib/halt.o build/smm/lib/hexdump.o build/smm/lib/memcmp.o build/smm/lib/reset.o build/smm/lib/string.o build/smm/lib/version.o build/smm/mainboard/emulation/qemu-q35/memmap.o build/smm/mainboard/emulation/qemu-q35/smi.o build/smm/southbridge/intel/common/gpio.o build/smm/southbridge/intel/common/pmbase.o build/smm/southbridge/intel/common/pmutil.o build/smm/southbridge/intel/common/smihandler.o build/smm/southbridge/intel/i82801ix/smihandler.o --no-whole-archive /usr/lib/gcc/x86_64-linux-gnu/12/32/libgcc.a --end-group