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)
Oct 31 2024, 4:59 PM
Unknown Object (File)
Sep 19 2024, 1:28 AM
Unknown Object (File)
Sep 12 2024, 7:50 PM
Unknown Object (File)
Sep 8 2024, 7:29 AM
Unknown Object (File)
Sep 7 2024, 1:26 PM
Unknown Object (File)
Sep 5 2024, 12:11 PM
Unknown Object (File)
Sep 4 2024, 4:03 PM
Unknown Object (File)
Aug 31 2024, 2:18 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.