diff --git a/gnu/usr.bin/binutils/as/Makefile b/gnu/usr.bin/binutils/as/Makefile index 8c2f8987e85..4de352e3d2f 100644 --- a/gnu/usr.bin/binutils/as/Makefile +++ b/gnu/usr.bin/binutils/as/Makefile @@ -5,6 +5,7 @@ .include "${.CURDIR}/../Makefile.inc0" GASES= ${BINUTIL_ARCH} +FORMATS= freebsd # Only build the cross tools when not cross-compiling. __MA!=/sbin/sysctl -b hw.machine_arch @@ -17,19 +18,21 @@ GASES+=$(_g) .endif .endfor .endif +.if defined(CROSS_FORMATS) +.for _f in ${CROSS_FORMATS} +.if (${FORMATS:R:M${_f:R}} == "") +FORMATS+=$(_f) +.endif +.endfor +.endif .endif .for _g in ${GASES} -.if exists(${.CURDIR}/as_${_g}) -SUBDIR+= as_${_g} -.endif -.if defined(CROSS_FORMATS) -.for _f in ${CROSS_FORMATS} +.for _f in ${FORMATS} .if exists(${.CURDIR}/${_g}-${_f}) SUBDIR+= ${_g}-${_f} .endif .endfor -.endif .endfor .include