mkexport: Allow boards to supply custom gnu-elf.ld.

Allows boards to supply their own gnu-elf linker script, used when building Nuttx applications and CONFIG_BUILD_KERNEL.

This is useful when building fully-linked applications (see #9395).
This commit is contained in:
Stuart Ianna 2023-06-26 16:17:23 +10:00 committed by Xiang Xiao
parent b64c029080
commit 160e1a965d
1 changed files with 6 additions and 2 deletions

View File

@ -180,9 +180,13 @@ fi
cp "${TOPDIR}/tools/mkdeps.c" "${EXPORTDIR}/tools/."
cp "${TOPDIR}/tools/incdir.c" "${EXPORTDIR}/tools/."
# Copy the default linker script
# Copy the board specific linker if found, or use the default when not.
cp -f "${TOPDIR}/binfmt/libelf/gnu-elf.ld" "${EXPORTDIR}/scripts/."
if [ -f "${BOARDDIR}/scripts/gnu-elf.ld" ]; then
cp -f "${BOARDDIR}/scripts/gnu-elf.ld" "${EXPORTDIR}/scripts/."
else
cp -f "${TOPDIR}/binfmt/libelf/gnu-elf.ld" "${EXPORTDIR}/scripts/."
fi
# Copy the board config script