Date: Mon, 18 Jan 2016 11:30:40 -0800 From: Mark Millard <markmi@dsl-only.net> To: fehrist@codeghar.com Cc: Toby <misc.lists@fsck.ch>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: make buildworld failed with error "relocation truncated to fit: R_ARM_JUMP24 against symbol `_fini'" Message-ID: <FF2B458C-5776-4797-9056-4CAA8DFECC43@dsl-only.net> In-Reply-To: <569D2D63.8030301@codeghar.com> References: <3E1CC674-D534-4C33-8C96-CA9E584931C0@dsl-only.net> <569D2557.3060802@codeghar.com> <C9C41590-3798-45D2-8F47-2A5AB4AA137A@dsl-only.net> <374A0F64-E3FC-42F1-AC03-DF8F88269AEB@dsl-only.net> <569D2D63.8030301@codeghar.com>
index | next in thread | previous in thread | raw e-mail
On 2016-Jan-18, at 10:22 AM, Hamza Sheikh <fehrist@codeghar.com> wrote:
>
>> Hmm. Clearly I can not count: I listed 6 files for arm and one for mips use. Please check all 6 that are for arm.
>
>> I listed 5 files and their -mlong-calls related content for arm (plus one file that has -mlong-calls for mips use). Please check all 5 files for arm for as they were when you built/build and report on what you find. The files are:
>>
>>> STATIC_CXXFLAGS+= -mlong-calls
>>> /usr/src/lib/libc++/Makefile
>>
>>> STATIC_CFLAGS+= -mlong-calls
>>> /usr/src/lib/csu/arm/Makefile
>>
>>> CFLAGS+= -mlong-calls
>>> /usr/src/usr.bin/clang/lldb/Makefile
>>
>>> CFLAGS+= -mlong-calls
>>> /usr/src/usr.bin/clang/clang/Makefile
>>
>>
>>> STATIC_CXXFLAGS+= -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
>>
>
> $ find /usr/src/ -name .svn -prune -o -name 'Makefile*' -exec grep mlong-calls {} \; -print
> STATIC_CFLAGS+= -mlong-calls
> /usr/src/lib/csu/arm/Makefile
> STATIC_CXXFLAGS+= -mlong-calls
> /usr/src/lib/libc++/Makefile
> CFLAGS+= -mlong-calls
> /usr/src/usr.bin/clang/clang/Makefile
> CFLAGS+= -mlong-calls
> /usr/src/usr.bin/clang/lldb/Makefile
>
> $ find /usr/src/ -name .svn -prune -o -name '*.mk' -exec grep mlong-calls {} \; -print
> STATIC_CXXFLAGS+= -mlong-calls
> /usr/src/lib/clang/clang.lib.mk
> CFLAGS+= -G0 -fno-pic -mno-abicalls -mlong-calls
> /usr/src/sys/conf/kmod.mk
>
> $ find /usr/src/ -name .svn -prune -o -name '*.mk' -exec grep -E 'STATIC_C[XL]|mlong-calls' {} \; -print
> STATIC_CXXFLAGS+= -mlong-calls
> /usr/src/lib/clang/clang.lib.mk
> ${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+= -G0 -fno-pic -mno-abicalls -mlong-calls
> /usr/src/sys/conf/kmod.mk
There is a difference between your list and mine, mine has:
>> ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
>> ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
in:
>> /usr/src/share/mk/bsd.lib.mk
but yours does not. Those CC lines with the STATIC_C prefixed symbols go back years: -r227797 from 2011-Nov-21 so my guess is a copy/paste error for your note above.
I do not know why clang would separate crt1 code from crti code by a larger distance but not use a code sequence for a long call/jump when -mlong-calls is present. If it really did that then it sounds like a defect in clang/llvm 3.7.1 .
If you can tolerate tracking the 3.8.0 project ( base/projects/clang380-import ) until 3.8.0 is moved into 11.0-CURRENT you could find out that way if clang 3.8.0 behaves the same in your context. So far I've not come up with anything else to try.
--
Hamza Sheikh
Twitter: @aikchar
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FF2B458C-5776-4797-9056-4CAA8DFECC43>
