Page MenuHomeFreeBSD

set -mlong-calls on arm also in LLVM's STATIC_CFLAGS
ClosedPublic

Authored by emaste on Jan 26 2017, 1:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 6:51 AM
Unknown Object (File)
Fri, May 3, 6:50 AM
Unknown Object (File)
Fri, May 3, 6:50 AM
Unknown Object (File)
Fri, May 3, 1:18 AM
Unknown Object (File)
Thu, May 2, 2:36 PM
Unknown Object (File)
Thu, May 2, 2:36 PM
Unknown Object (File)
Wed, Apr 24, 2:58 AM
Unknown Object (File)
Apr 2 2024, 3:58 AM
Subscribers
None

Details

Summary

-mlong-calls was set only in STATIC_CXXFLAGS, but there are some .c source files in LLVM which also need -mlong-calls.

Unfortunately this is not sufficient to fix linking lldb on arm:

/tank/emaste/obj/arm.armv6/tank/emaste/src/freebsd-staging/lib/clang/libllvm/libllvm.a(regexec.o): In function `llvm_regexec':
/tank/emaste/src/freebsd-staging/contrib/llvm/lib/Support/regexec.c:(.text+0x260): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_read_tp@@FBSDprivate_1.0' defined in .plt section in /tank/emaste/obj/arm.armv6/tank/emaste/src/freebsd-staging/lib/clang/libllvm/libllvm.a(regexec.o)

because it seems compiler-inserted __aeabi_read_tp calls don't honour -mlong-calls (clang400 branch) - we get:

260:       fe ff ff eb     bl      #-8 <llvm_regexec+0x260>
                   00000260:  R_ARM_CALL   __aeabi_read_tp

But this is part of the fix

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to set -mlong-calls on arm also in LLVM's STATIC_CFLAGS.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: dim, andrew.
dim edited edge metadata.
This revision is now accepted and ready to land.Jan 27 2017, 9:23 PM
This revision was automatically updated to reflect the committed changes.