From: John Marino Date: Sat, 17 Mar 2012 10:45:02 +0000 (+0100) Subject: crtstuff: Move 6 identical sed patterns to variable X-Git-Tag: v3.2.0~1223 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/2816d07c9fbb8eb5c2113fe5b98864d6683d43c4 crtstuff: Move 6 identical sed patterns to variable This note.ABI-tag pattern will be changed in an upcoming commit. Taken from: FreeBSD SVN 232832 (2012-03-11) --- diff --git a/lib/csu/Makefile b/lib/csu/Makefile index 723a7a471b..b5a5c26ef3 100644 --- a/lib/csu/Makefile +++ b/lib/csu/Makefile @@ -1,4 +1,5 @@ CSUDIR= ${.CURDIR}/${MACHINE_ARCH} +SED_FIX_NOTE= -i "" -e '/\.note\.ABI-tag/s/progbits/note/' .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.csu" diff --git a/lib/csu/i386/Makefile.csu b/lib/csu/i386/Makefile.csu index 6342d1c979..a54a747a60 100644 --- a/lib/csu/i386/Makefile.csu +++ b/lib/csu/i386/Makefile.csu @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/csu/i386-elf/Makefile SVN 217375 2011/01/13 dim $ +# $FreeBSD: src/lib/csu/i386-elf/Makefile SVN 232832 2012/03/11 kib $ SRCS= crti.S crtn.S OBJS+= gcrt1.o crt1.o Scrt1.o @@ -18,7 +18,7 @@ CFLAGS+= -I${CSUDIR}/../common \ gcrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1_c.o: gcrt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s @@ -28,7 +28,7 @@ gcrt1.o: gcrt1_c.o crt1_s.o crt1_c.s: crt1_c.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${CSUDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1_c.o: crt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s @@ -39,7 +39,7 @@ crt1.o: crt1_c.o crt1_s.o Scrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1_c.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1_c.o: Scrt1_c.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s diff --git a/lib/csu/x86_64/Makefile.csu b/lib/csu/x86_64/Makefile.csu index c5b2103214..6540faa885 100644 --- a/lib/csu/x86_64/Makefile.csu +++ b/lib/csu/x86_64/Makefile.csu @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/csu/amd64/Makefile SVN 217375 2011/01/13 dim $ +# $FreeBSD: src/lib/csu/amd64/Makefile SVN 232832 2012/03/11 kib $ SRCS= crt1.c crti.S crtn.S OBJS+= Scrt1.o gcrt1.o @@ -18,21 +18,21 @@ CFLAGS+= -fno-omit-frame-pointer crt1.s: crt1.c ${CC} ${CFLAGS} -S -o ${.TARGET} ${CSUDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} crt1.o: crt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} gcrt1.o: gcrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c - sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + sed ${SED_FIX_NOTE} ${.TARGET} Scrt1.o: Scrt1.s ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s