Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Juanito on March 09, 2026, 07:14:25 AM

Title: compiling with clang/rust on piCore
Post by: Juanito on March 09, 2026, 07:14:25 AM
Here's a fix for compiling with clang/rust on piCore when clang complains it cannot find /usr/local/include/c++/14.2.0/new

It seems that the problem occurs because clang thinks it's compiling for armv7l-unknown-linux-gnueabihf whereas rust thinks it's compiling for armv7-unknown-linux-gnueabihf.

The work around involves adjusting things as per https://forum.tinycorelinux.net/index.php/topic,28061

..and then creating a file such that:
Code: [Select]
cat clang++
#!/bin/bash
arr=()
for arg; do
if [ "$arg" == "--target=armv7-unknown-linux-gnueabihf" ]; then
arg="--target=armv7l-unknown-linux-gnueabihf"
fi
arr+=("$arg")
done
/usr/local/bin/clang++.real "${arr[@]}"

..and then:
Code: [Select]
chmod +x clang++
cd /usr/local/bin
sudo mv clang++ clang++.real
cd ~
sudo cp clang++ /usr/local/bin