Author: andrew
Date: Sun Jan 10 23:41:31 2016
New Revision: 293648
URL: https://svnweb.freebsd.org/changeset/base/293648
Log:
Use -mlong-calls to build crt1.o and gcrt1.o. This tells the compiler to
generate code to branch based on an address in a register. This allows us
to have binaries larger than the 32MiB limit of a branch instruction.
The main use of this is with clang. Clang 3.8.0 has been shown to be larger
than the above limit.
Modified:
head/lib/csu/arm/Makefile
Modified: head/lib/csu/arm/Makefile
==============================================================================
--- head/lib/csu/arm/Makefile Sun Jan 10 22:31:39 2016 (r293647)
+++ head/lib/csu/arm/Makefile Sun Jan 10 23:41:31 2016 (r293648)
@@ -7,6 +7,7 @@ OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o gcrt1.o
CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
+STATIC_CFLAGS+= -mlong-calls
FILES= ${OBJS}
FILESMODE= ${LIBMODE}
@@ -23,14 +24,14 @@ CLEANFILES+= crt1.s gcrt1.s Scrt1.s
# directly compiled to .o files.
crt1.s: crt1.c
- ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
+ ${CC} ${CFLAGS} ${STATIC_CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
crt1.o: crt1.s
${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
gcrt1.s: crt1.c
- ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
+ ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -S -o ${.TARGET}
${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
gcrt1.o: gcrt1.s
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"