diff --git a/tools/mkexport.sh b/tools/mkexport.sh index 5ba8ace201fa0..d3ffa50e4b978 100755 --- a/tools/mkexport.sh +++ b/tools/mkexport.sh @@ -231,6 +231,10 @@ if [ "X${USRONLY}" != "Xy" ]; then done fi +# Drop kernel folder linkscript as the exported one should suffice + +LDELFFLAGS=$(echo "$LDELFFLAGS" | sed -e 's:-T.*ld::') + # Save the compilation options echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/scripts/Make.defs"