0694443744
- In override-as.mk, fabricate a "specs" file and use it to force gcc into execvp'ing the correct as(1). Apparently having it in $PATH is not enough. This only affects multimedia/mplayer and perhaps sysutils/memtest86. (The latter probably doesn't need binutils at all, at least on modern NetBSD, and should be revisited.)
27 lines
838 B
Makefile
27 lines
838 B
Makefile
# $NetBSD: override-as.mk,v 1.1 2008/03/24 23:40:37 tnn Exp $
|
|
|
|
# This Makefile fragment can be included by packages that wish to
|
|
# override the default selection of as(1) and use the one from devel/binutils
|
|
# instead.
|
|
|
|
GNU_PREFIX_CMD= ${PKG_INFO} -Q GNU_PROGRAM_PREFIX binutils 2>/dev/null \
|
|
|| { cd ${BUILDLINK_PKGSRCDIR.binutils} \
|
|
&& ${MAKE} ${MAKEFLAGS} show-var VARNAME=GNU_PROGRAM_PREFIX; }
|
|
|
|
PKG_AS= ${PREFIX}/bin/${:!${GNU_PREFIX_CMD}!}as
|
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
.if !empty(PKGSRC_COMPILER:Mgcc)
|
|
|
|
SPECS_AS= ${WRAPPER_DIR}/specs.as
|
|
WRAPPER_TARGETS+= ${SPECS_AS}
|
|
|
|
${SPECS_AS}:
|
|
@${ECHO} "*invoke_as:" > ${SPECS_AS}
|
|
@${ECHO} "%{!S:-o %|.s |" >> ${SPECS_AS}
|
|
@${ECHO} "${PKG_AS} %(asm_options) %m.s %A }" >> ${SPECS_AS}
|
|
|
|
_WRAP_EXTRA_ARGS.CC+= -specs ${SPECS_AS}
|
|
_WRAP_EXTRA_ARGS.CXX+= -specs ${SPECS_AS}
|
|
.endif
|