FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

Building drm-next world with Clang 3.9 #121

Closed PhilPotter closed 7 years ago

PhilPotter commented 7 years ago

Hi all, after some pointers if that's ok. When I build drm-next using the Clang 3.8 binaries included with FreeBSD 11.0-RELEASE, it works fine. I decided to try and use Clang 3.9 from ports, by placing the following in /etc/make.conf: CC=/usr/local/bin/clang39 CXX=/usr/local/bin/clang++39 CPP=/usr/local/bin/clang-cpp39

When doing this, make buildworld only gets as far as putting libc together, and errors out saying that _fdatasync.pico is not relocatable and needs to be rebuilt with fPIC - this is when linking the shared library. Am I just doing this wrong and missing something, or does drm-next just not build with Clang 3.9 yet? Apologies if my question is ignorant. Thanks.

kev009 commented 7 years ago

Hi, drm-next is currently based on 12-CURRENT. You could try doing 'make kernel-toolchain' to bootstrap the compiler, but there are still some implications that might be relevant if you want to run this kernel with an older userland that may not be worth your time vs upgrading to current.

PhilPotter commented 7 years ago

Sorry I should have specified, I wasn't upgrading the kernel only - I was building both world and the kernel and installing into an empty folder with DESTDIR for later deployment as a completely new system.

kev009 commented 7 years ago

Yeah in that case you need the compiler bootstrapped. Usually you'd buildworld first to do this, then buildkernel. For now the ports compilers aren't quite the same as the base compiler, so I would not recommend investing in that approach until external toolchain support is mature.

PhilPotter commented 7 years ago

Thank you for your response, I will make a mental note of this :-) Do not do buildworld or kernel for new system with compiler from ports.