diff --git a/tools/mkexport.sh b/tools/mkexport.sh index 5ba8ace201fa0..2a354d38aed29 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[]*[^ ]+::') + # Save the compilation options echo "ARCHCFLAGS = ${ARCHCFLAGS}" >"${EXPORTDIR}/scripts/Make.defs"