Add --no-warn-mismatch to ld(1) when linking binary files into

ELF files. On ia64 the ELF header contains information about
characteristics of the machine code and ld(1) needs that to
determine whether input files are compatible for linking. To
this end non-ELF files are not supported by binutils on ia64.
However, the resulting ELF file seems to be correct despite the
warnings and the non-supportedness of non-ELF files and it
appears enough to unbreak the build of firmware(9) files on ia64
by simply supressing the warning.

Ran into by: gallatin@
Approved by: re (hrs)
Looks good to me: mlaier@
This commit is contained in:
marcel 2007-07-11 01:20:37 +00:00
parent c4fed016e6
commit e39e25e87b

View File

@ -145,12 +145,12 @@ CLEANFILES+= ${KMOD:S/$/.c/}
${_firmw:C/\:.*$/.fwo/}: ${_firmw:C/\:.*$//} ${_firmw:C/\:.*$/.fwo/}: ${_firmw:C/\:.*$//}
@${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}}
@if [ -e ${_firmw:C/\:.*$//} ]; then \ @if [ -e ${_firmw:C/\:.*$//} ]; then \
${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} \ ${LD} -b binary --no-warn-mismatch ${LDFLAGS} \
${_firmw:C/\:.*$//}; \ -r -d -o ${.TARGET} ${_firmw:C/\:.*$//}; \
else \ else \
ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \
${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} \ ${LD} -b binary --no-warn-mismatch ${LDFLAGS} \
${_firmw:C/\:.*$//}; \ -r -d -o ${.TARGET} ${_firmw:C/\:.*$//}; \
rm ${_firmw:C/\:.*$//}; \ rm ${_firmw:C/\:.*$//}; \
fi fi