aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/aarch64
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-04-07 19:53:14 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-04-07 19:53:14 +0000
commit5944f899a2519c6321bac3c17cc076418643a088 (patch)
tree9997116628a46f2c1599eb830e46215cd46024b8 /lib/csu/aarch64
parent25585679843c7d18599c8e537752dbfbd923c3d1 (diff)
downloadsrc-5944f899a2519c6321bac3c17cc076418643a088.tar.gz
src-5944f899a2519c6321bac3c17cc076418643a088.zip
Rework r234502 to include a modified CFLAGS along with ACFLAGS.
On most architectures crt objects are compiled in a multiple-step process so that sed can be run on the generated assembly. As the final step, the C compiler generates an object file from the modified assembly output. Currently this last step uses $CC with only $ACFLAGS. However, for other uses in the tree, $ACFLAGS is meant to include assembly-specific compiler flags that are in addition to $CFLAGS (see default .S.o rules bsd.suffixes.mk). In particular, external toolchains may require additional flags to select a non-default target which will be present in CFLAGS but not ACFLAGS. To support this while still mitigating the issue with CFLAGS described in r234502, include a modified CFLAGS that excludes "-g" when assembling the modified assembly files. Note that normally an assembler ($AS) is used to assemble .s flags to object files (see bsd.suffixes.mk). However, llvm-based toolchains do not currently have a stand-alone assembler. Reviewed by: imp Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10085
Notes
Notes: svn path=/head/; revision=316620
Diffstat (limited to 'lib/csu/aarch64')
-rw-r--r--lib/csu/aarch64/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/csu/aarch64/Makefile b/lib/csu/aarch64/Makefile
index cd04b54b62f8..3f34ff351623 100644
--- a/lib/csu/aarch64/Makefile
+++ b/lib/csu/aarch64/Makefile
@@ -27,20 +27,20 @@ crt1.s: crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
crt1.o: crt1.s
- ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
+ ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s
gcrt1.s: crt1.c
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
gcrt1.o: gcrt1.s
- ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
+ ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
Scrt1.s: crt1.c
${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
Scrt1.o: Scrt1.s
- ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
+ ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
.include <bsd.lib.mk>