config.sub
、 config.guess
文件,保证 configure 过程中能够识别到全新的龙芯loongarch64 架构
sudo wget -O /usr/share/misc/config.sub "git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
sudo wget -O /usr/share/misc/config.guess "git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
cp /usr/share/misc/config.guess /usr/share/misc/config.sub ./
if [ ! -d "codegit" ]; then
git clone https://git.code.sf.net/p/log4cpp/codegit
fi
cd codegit
./autogen.sh
mkdir build-loongson
cd build-loongson
export PATH=$PATH:/path/loongson-gnu-toolchain-x86_64-loongarch64-linux-gnu/bin
export ARCH=loongarch64
export CROSS_COMPILE=loongarch64-linux-gnu-
../configure --host=loongarch64-linux-gnu --prefix=/path/loongson-gnu-toolchain-x86_64-loongarch64-linux-gnu/loongarch64-linux-gnu/sysroot/usr \
--with-sysroot=/path/loongson-gnu-toolchain-x86_64-loongarch64-linux-gnu/loongarch64-linux-gnu/sysroot/ \
--enable-shared --enable-static --enable-gpl--enable-libx264 --enable-libx265 --enable-lib
make -j16
make install
更多回帖