From owner-freebsd-arm@freebsd.org Mon Jan 18 07:31:41 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE1CA87076 for ; Mon, 18 Jan 2016 07:31:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-4.reflexion.net [208.70.210.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E0F15A1 for ; Mon, 18 Jan 2016 07:31:39 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 9789 invoked from network); 18 Jan 2016 07:31:38 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 18 Jan 2016 07:31:38 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Mon, 18 Jan 2016 02:31:35 -0500 (EST) Received: (qmail 8934 invoked from network); 18 Jan 2016 07:31:34 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 18 Jan 2016 07:31:34 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id E9C381C43C3; Sun, 17 Jan 2016 23:31:30 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: make buildworld failed with error "relocation truncated to fit: R_ARM_JUMP24 against symbol `_fini'" Message-Id: <3E1CC674-D534-4C33-8C96-CA9E584931C0@dsl-only.net> Date: Sun, 17 Jan 2016 23:31:37 -0800 To: fehrist@codeghar.com, freebsd-arm Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2016 07:31:41 -0000 The jump distances involved in those cases are larger than the offset = encoding in the instructions can indicate. The compiler must be told to = do more than just set up for such "small" constant offsets plugged in to = instructions by the linker/loader. For arm the option used for this for static linking contexts is: = -mlong-calls (But mips can also have -mlong-calls.) However the -mlong-calls are all in place in base/head as of: -r294031 An explanation of why you hit a problem anyway might be that you have an = odd mix of paths in your note. For example: > /usr/local/raspbsd/src/common/lib/csu/arm/crt1.c is apparently not inside the tree starting at > /usr/src But your "steps" show /usr/src use: > # svnlite checkout svn://svn.freebsd.org/base/head /usr/src > . . . > # cd /usr/src > # svnlite update > . . . > # svnlite info > Path: . > Working Copy Root Path: /usr/src > . . . > # make buildworld May be something not shown from your /etc/src.conf or some place else = redirected things? May be you are picking up some old files from a prior = build? Notes about where -mlong-calls are used. . .=20 The clang 3.8.0 investigation ran into this for building clang and lldb. = A quick scan of materials checked out from that branch (my /usr/src is = bound to that branch) shows the following as far as what 4 Makefile* or = 2 *.mk files list the option someplace: > # find /usr/src/ -name .svn -prune -o -name 'Makefile*' -exec grep = mlong-calls {} \; -print > STATIC_CXXFLAGS+=3D -mlong-calls > /usr/src/lib/libc++/Makefile > STATIC_CFLAGS+=3D -mlong-calls > /usr/src/lib/csu/arm/Makefile > CFLAGS+=3D -mlong-calls > /usr/src/usr.bin/clang/lldb/Makefile > CFLAGS+=3D -mlong-calls > /usr/src/usr.bin/clang/clang/Makefile > # find /usr/src/ -name .svn -prune -o -name '*.mk' -exec grep = mlong-calls {} \; -print > STATIC_CXXFLAGS+=3D -mlong-calls > /usr/src/lib/clang/clang.lib.mk > CFLAGS+=3D -G0 -fno-pic -mno-abicalls -mlong-calls > /usr/src/sys/conf/kmod.mk (That last one is for mips instead of arm and has been around a long = time.) They all are in -r294031 on base/head . (One of the 5 arm specific ones = has been there a little longer: -r293648 .) In order to also show the usage of the flags with the STATIC_C prefixes: > # find /usr/src/ -name .svn -prune -o -name 'Makefile*' -exec grep -E = 'STATIC_C[XL]|mlong-calls' {} \; -print > STATIC_CXXFLAGS+=3D -mlong-calls > /usr/src/lib/libc++/Makefile > STATIC_CFLAGS+=3D -mlong-calls > /usr/src/lib/csu/arm/Makefile > CFLAGS+=3D -mlong-calls > /usr/src/usr.bin/clang/lldb/Makefile > CFLAGS+=3D -mlong-calls > /usr/src/usr.bin/clang/clang/Makefile > # find /usr/src/ -name .svn -prune -o -name '*.mk' -exec grep -E = 'STATIC_C[XL]|mlong-calls' {} \; -print > STATIC_CXXFLAGS+=3D -mlong-calls > /usr/src/lib/clang/clang.lib.mk > ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} > ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} = -o ${.TARGET} > ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o = ${.TARGET} > ${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c = ${.IMPSRC} -o ${.TARGET} > /usr/src/share/mk/bsd.lib.mk > CFLAGS+=3D -G0 -fno-pic -mno-abicalls -mlong-calls > /usr/src/sys/conf/kmod.mk (That last one is again for mips instead of arm and has been around a = long time.) (I used the base/projects/clang380-import branch materials only because = that is what my /usr/src is currently bound to.) While clang 3.8.0 builds normally have this large-distance issue, as far = as I know normal clang 3.7.1 builds do not normally have large enough = distances to create the issue. But the paths in your notes suggest = something is not normal about your context. Separately: I agree with Andreas Schwarz's note that doing builds and = installs while having a tiny /tmp is likely not going to work: /tmp will = likely run out of space even though elsewhere has lots of space = available. =3D=3D=3D Mark Millard markmi at dsl-only.net