cmake: linker: ld: Use "-Map <mapfile>" for legacy compatibility

The build system currently generates mapfiles by invoking ld with the
"-Map=<mapfile>" command line argument. This variant of the flag was
introduced in GNU binutils 2.20.

To enable compatibility with legacy versions of the GNU ld, the argument
has been replaced with the "-Map <mapfile>" variant.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit is contained in:
Joel Holdsworth 2025-02-03 10:45:20 -08:00 committed by Anas Nashif
commit f2c8a5acc4

View file

@ -124,7 +124,7 @@ function(toolchain_ld_link_elf)
${TOOLCHAIN_LD_LINK_ELF_LINKER_SCRIPT}
${TOOLCHAIN_LD_LINK_ELF_LIBRARIES_POST_SCRIPT}
${LINKERFLAGPREFIX},-Map=${TOOLCHAIN_LD_LINK_ELF_OUTPUT_MAP}
${LINKERFLAGPREFIX},-Map,${TOOLCHAIN_LD_LINK_ELF_OUTPUT_MAP}
${LINKERFLAGPREFIX},--whole-archive
${WHOLE_ARCHIVE_LIBS}
${LINKERFLAGPREFIX},--no-whole-archive