// "[o.o]"



Compiling things on FreeBSD
I have had problems for some reason, compiling GCC on FreeBSD. I want to do that for reasons.
Turns out the problem was easliy solved.
Building GCC

git clone https://gcc.gnu.org/git/gcc.git
cd gcc
LDFLAGS="-L/usr/lib -L/usr/local/lib/gcc14" \
./configure --enable-languages=c,c++ --disable-multilib
make -j10
It was the --disable-multilib part (to only enable 64 bit build) that i ran into. Since i have not the 32 bit librarys of FreeBSD installed.

Building FreeBSD
i have run into this bug a few times, turns out it was also a simple soluton.
Bug283581
git clone https://codeberg.org/freebsd/freebsd-src
cd freebsd-src
doas pkg install FreeBSD-clang-dev
doas make buildworld buildkernel
# doas make installkernel installworld # if you want to actully build and install
Building LLVM
git clone https://github.com/llvm/llvm-project
cd llvm-project
cmake -DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;lld;lldb;mlir;openmp;polly;flang" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-D_GLIBCXX_HAVE_ENOTRECOVERABLE=1\
-DENOTRECOVERABLE=98" -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$HOME/dev/.build/llvm-dev\
-Bbuild -DLLVM_ENABLE_RUNTIMES="libunwind;libcxxabi;libcxx" llvm
make -j10 -Cbuild
make -j10 -Cbuild install
Building Firefox (have not updated and tried this recently, will update post when i tried)
Add this to a mozconfig file in your freshly cloned firefox folder
CC=/usr/local/llvm19/bin/clang
CXX=/usr/local/llvm19/bin/clang++
ac_add_options --with-libclang-path=/usr/local/llvm19/lib
ac_add_options --without-wasm-sandbox-libraries
ac_add_options --enable-debug
ac_add_options --enable-bootstrap
ac_add_options --disable-webrtc
Then clone the repo:
git clone https://github.com/mozilla/firefox
cd firefox

doas pkg install python3 py311-pip m4
doas pkg install doas vim gnome gdm xinit xorg git
# you ofcourse don't need whole gnome, but some gtk+ libs
doas ln -s /usr/local/bin/pip /usr/local/bin/pip3
doas ln -s /usr/local/bin/clang19 /usr/local/bin/clang
doas ln -s /usr/local/bin/clang++19 /usr/local/bin/clang++

./mach bootstrap
./mach build
You might need to run: cargo install cbindgen --force