From 383316f20052bb3cafeb58365f537328556af004 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 11 Jan 2014 00:18:15 +0000 Subject: [PATCH] Using ${LD} -x screws up BE arm. Use ${OBJCOPY} ${OBJCOPYLIBFLAGS} instead so the $a/$t/$d symbols are preserved. --- lib/csu/common/Makefile.inc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/csu/common/Makefile.inc b/lib/csu/common/Makefile.inc index dac26bd1f324..a9da6bec614d 100644 --- a/lib/csu/common/Makefile.inc +++ b/lib/csu/common/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.23 2013/11/17 11:16:09 martin Exp $ +# $NetBSD: Makefile.inc,v 1.24 2014/01/11 00:18:15 matt Exp $ .include @@ -42,7 +42,7 @@ crtbegin.o: crtbegin.c crtbegin.h ${_MKTARGET_COMPILE} ${COMPILE.c} ${CFLAGS.crtbegin.c} ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o .endif - ${LD} -x -r -o ${.TARGET} ${.TARGET}.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} rm -f ${.TARGET}.o .if ${MKSTRIPIDENT} != "no" ${OBJCOPY} -R .ident ${.TARGET} @@ -57,7 +57,7 @@ crtbeginS.o: crtbegin.c crtbegin.h ${_MKTARGET_COMPILE} ${COMPILE.c} ${PICFLAGS} -DSHARED ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o .endif - ${LD} -x -r -o ${.TARGET} ${.TARGET}.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} rm -f ${.TARGET}.o .if ${MKSTRIPIDENT} != "no" ${OBJCOPY} -R .ident ${.TARGET} @@ -66,7 +66,7 @@ crtbeginS.o: crtbegin.c crtbegin.h crtend.o: crtend.S ${_MKTARGET_COMPILE} ${COMPILE.S} ${ARCHDIR}/crtend.S -o ${.TARGET}.o - ${LD} -x -r -o ${.TARGET} ${.TARGET}.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} rm -f ${.TARGET}.o .if ${MKSTRIPIDENT} != "no" ${OBJCOPY} -R .ident ${.TARGET} @@ -82,8 +82,9 @@ crt0.o: crt0.S crt0-common.c ${_MKTARGET_COMPILE} ${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o ${COMPILE.c} ${MY_PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o - ${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o - rm -f ${.TARGET}.S.o ${.TARGET}.c.o + ${LD} -r -o ${.TARGET}.o ${.TARGET}.S.o ${.TARGET}.c.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} + rm -f ${.TARGET}.S.o ${.TARGET}.c.o ${.TARGET}.o .if ${MKSTRIPIDENT} != "no" ${OBJCOPY} -R .ident ${.TARGET} .endif @@ -92,8 +93,9 @@ gcrt0.o: crt0.S crt0-common.c ${_MKTARGET_COMPILE} ${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o ${COMPILE.c} ${MY_PICFLAGS} -DMCRT0 ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o - ${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o - rm -f ${.TARGET}.S.o ${.TARGET}.c.o + ${LD} -r -o ${.TARGET}.o ${.TARGET}.S.o ${.TARGET}.c.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} + rm -f ${.TARGET}.S.o ${.TARGET}.c.o ${.TARGET}.o .if ${MKSTRIPIDENT} != "no" ${OBJCOPY} -R .ident ${.TARGET} .endif @@ -103,7 +105,7 @@ gcrt0.o: crt0.S crt0-common.c crtfm.o: crtfm.c ${_MKTARGET_COMPILE} ${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o - ${LD} -x -r -o ${.TARGET} ${.TARGET}.o + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.o ${.TARGET} rm -f ${.TARGET}.o .endif