Date: Mon, 16 Apr 2012 21:36:56 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc Message-ID: <201204162136.q3GLaurU051667@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Mon Apr 16 21:36:55 2012 New Revision: 234356 URL: http://svn.freebsd.org/changeset/base/234356 Log: Work around an issue on 32-bit PowerPC, where clang executable can get too big, causing 'relocation truncated to fit' errors at link time. Reviewed by: nwhitehorn Modified: head/gnu/lib/csu/Makefile head/lib/clang/clang.build.mk head/lib/csu/powerpc/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Mon Apr 16 21:28:04 2012 (r234355) +++ head/gnu/lib/csu/Makefile Mon Apr 16 21:36:55 2012 (r234356) @@ -34,6 +34,7 @@ CFLAGS+= -include osreldate.h .if ${MACHINE_CPUARCH} == "powerpc" TGTOBJS= crtsavres.o SRCS+= crtsavres.asm +CFLAGS+= -mlongcall .endif .if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Apr 16 21:28:04 2012 (r234355) +++ head/lib/clang/clang.build.mk Mon Apr 16 21:36:55 2012 (r234356) @@ -11,6 +11,12 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG # LLVM is not strict aliasing safe as of 12/31/2011 CFLAGS+= -fno-strict-aliasing +# Work around an issue on 32-bit PowerPC, where the clang executable can get +# too big, causing 'relocation truncated to fit' errors at link time. +.if ${MACHINE_ARCH} == "powerpc" +CFLAGS+=-mlongcall +.endif + TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Mon Apr 16 21:28:04 2012 (r234355) +++ head/lib/csu/powerpc/Makefile Mon Apr 16 21:36:55 2012 (r234356) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204162136.q3GLaurU051667>