Date: Sun, 10 Jan 2016 23:41:31 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293648 - head/lib/csu/arm Message-ID: <201601102341.u0ANfVO2011571@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601102341.u0ANfVO2011571>