From 316aafc04d844936bbeeecb649d4d7eb52d5e71c Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Wed, 28 Aug 2019 07:49:57 -0600 Subject: [PATCH] tools/mkexport.sh: The export of gnu-elf.ld at least is required to build ELF loadable binaries. Option to link system into different memory locations (boot, application after boot-loader, RAM) without need to rebuild/reexport NuttX is useful as well. --- tools/mkexport.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/mkexport.sh b/tools/mkexport.sh index bf0bcb7d91..c61b62d073 100755 --- a/tools/mkexport.sh +++ b/tools/mkexport.sh @@ -196,6 +196,13 @@ if [ "X${USRONLY}" != "Xy" ]; then cp -p "${LDPATH}" "${EXPORTDIR}/build/." || \ { echo "MK: cp ${LDPATH} failed"; exit 1; } + + # Copy addtional ld scripts + + LDDIR="$(dirname "${LDPATH}")" + for f in "${LDDIR}"/*.ld ; do + [ -f "${f}" ] && cp -f "${f}" "${EXPORTDIR}/build/." + done fi fi