[Bug 233361] mips build with BSD_CRTBEGIN, Clang, LLD fails

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 21 21:05:13 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233361

John Baldwin <jhb at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jhb at FreeBSD.org

--- Comment #3 from John Baldwin <jhb at FreeBSD.org> ---
This appears to be a clang 7.0 regression.  External GCC is able to build this
fine.  In addition, the old crt bits in contrib/gcc use the same logic (.cpload
without a .cprestore), and while clang compiled that during a buildworld
WITHOUT_BSD_CRTBEGIN=yes, clang now chokes trying to link libc:

ld: error: can't create dynamic relocation R_MIPS_32 against local symbol in
readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to
allow text relocations in the output
>>> defined in cancelpoints_sem_new.pico
>>> referenced by cancelpoints_sem_new.c
>>>               cancelpoints_sem_new.pico:(.eh_frame+0x1C)

So, clang 7.0 seems to be busted compared to clang 6 + patches. :-/  I haven't
tried mips64 yet, only 32-bit mips.  Cheri only tests 64-bit mips, so it might
be that 64-bit works ok and only 32-bit mips is broken.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list