diff --git a/external/gpl3/gcc/lib/libgcc/Makefile.inc b/external/gpl3/gcc/lib/libgcc/Makefile.inc index 48199142bba0..8b4751a8e65d 100644 --- a/external/gpl3/gcc/lib/libgcc/Makefile.inc +++ b/external/gpl3/gcc/lib/libgcc/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.28 2014/06/01 19:51:01 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.29 2014/08/21 08:52:23 christos Exp $ LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/} @@ -149,19 +149,22 @@ ${LIB1ASMFUNCS}: ${.CURDIR}/Makefile printf '#define L${.PREFIX}\n#include <${G_LIB1ASMSRC}>\n' >${.TARGET} .endif -${LIB2_EH:.c=.o}: +# Use dynamic sources to arrange for the C file to be the first dependency +# so ${.IMPSRC} will work. + +${LIB2_EH:.c=.o}: $(.PREFIX).c ${_MKTARGET_COMPILE} ${COMPILE.c} -fexceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC} -${LIB2_EH:.c=.pico}: +${LIB2_EH:.c=.pico}: $(.PREFIX).c ${_MKTARGET_COMPILE} ${COMPILE.c} ${CPICFLAGS} -fexceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC} -${G_LIB2_DIVMOD_FUNCS:=.o}: +${G_LIB2_DIVMOD_FUNCS:=.o}: $(.PREFIX).c ${_MKTARGET_COMPILE} ${COMPILE.c} -fexceptions -fnon-call-exceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC} -${G_LIB2_DIVMOD_FUNCS:=.pico}: +${G_LIB2_DIVMOD_FUNCS:=.pico}: $(.PREFIX).c ${_MKTARGET_COMPILE} ${COMPILE.c} ${CPICFLAGS} -fexceptions -fnon-call-exceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}