Page MenuHomeFreeBSD

Rework check for libclang_rt to see if the needed library exists.
ClosedPublic

Authored by bdrewery on Jun 25 2018, 7:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 17 2024, 11:54 AM
Unknown Object (File)
Oct 17 2024, 11:53 AM
Unknown Object (File)
Oct 17 2024, 11:53 AM
Unknown Object (File)
Oct 17 2024, 11:34 AM
Unknown Object (File)
Sep 29 2024, 1:20 AM
Unknown Object (File)
Sep 26 2024, 3:26 PM
Unknown Object (File)
Sep 26 2024, 5:07 AM
Unknown Object (File)
Sep 22 2024, 6:44 AM
Subscribers

Details

Summary

Currently libclang_rt is not provided for cross-building and as such
is not connected to cross-tools. For building clang once in universe
it is likely that libclang_rt won't exist for the universe toolchain
but even if it did it would not support anything but the native arch.
So explicitly check for support before enabling h_raw.

For building clang once in universe I do a 'make kernel-toolchain' with a
separate objdir. This never runs 'make libraries' so lib/libclang_rt is
never compiled. Even if we connect that to cross-tools though I think
a check like done in this diff would be needed here, or globally.

Trying to resolve this failure for my one-clang-universe patch:

--- h_raw.full ---
/scratch/obj/root/git/freebsd/freebsd12-amd64/tmp/usr/bin/ld: error: cannot open /scratch/obj/root/git/freebsd/freebsd12-amd64/tmp/usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a: No such file or directory
cc : error: linker command failed with exit code 1 (use -v to see invocation)
Test Plan

Still testing. Doing an i386 build from amd64 host and will do an amd64 build
on amd64 host, and then a one-clang-universe build.

Diff Detail

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

Event Timeline

Hm, I wasn't even aware of this awful hack. So for some test that runs with one of the sanitizers, it requires the clang_rt libs at world build time? E.g. we should maybe build these as part of cross-tools at some point?

In any case, LGTM regarding this part.

This revision is now accepted and ready to land.Jun 26 2018, 9:38 AM
This revision was automatically updated to reflect the committed changes.