Index: head/lib/csu/aarch64/Makefile =================================================================== --- head/lib/csu/aarch64/Makefile +++ head/lib/csu/aarch64/Makefile @@ -24,15 +24,15 @@ ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Index: head/lib/csu/arm/Makefile =================================================================== --- head/lib/csu/arm/Makefile +++ head/lib/csu/arm/Makefile @@ -24,18 +24,18 @@ ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include Index: head/lib/csu/i386/Makefile =================================================================== --- head/lib/csu/i386/Makefile +++ head/lib/csu/i386/Makefile @@ -24,17 +24,17 @@ ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} ${OBJCOPY} --localize-symbol _start1 Scrt1.o .include Index: head/lib/csu/riscv/Makefile =================================================================== --- head/lib/csu/riscv/Makefile +++ head/lib/csu/riscv/Makefile @@ -24,15 +24,15 @@ ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .include