demo-uclibc.sh

来自「linux下编译交叉工具链的工具源码」· Shell 代码 · 共 28 行

SH
28
字号
#!/bin/sh# Strange little script to demonstrate building a uclibc-based toolchain# using an old version of crosstoolset -exTARBALLS_DIR=$HOME/downloadsmkdir -p $TARBALLS_DIRwget -c -P $TARBALLS_DIR kegel.com/crosstool/crosstool-0.28-rc5.tar.gzrm -rf crosstool-0.28-rc5tar -xzf $TARBALLS_DIR/crosstool-0.28-rc5.tar.gzcd crosstool-0.28-rc5patch -p1 < ../crosstool-uclibc-0.28-rc5-ter.patchsed 's/linux-gnu/linux-uclibc/' < mipsel.dat > mipsel-uclibc.datRESULT_TOP=/opt/crosstoolmkdir -p $RESULT_TOPexport TARBALLS_DIR RESULT_TOPGCC_LANGUAGES="c,c++"export GCC_LANGUAGESeval `cat gcc-3.3.3-uclibc-0.9.23.dat mipsel-uclibc.dat` sh all.sh# The above command fails the "hello, world" test when linking non-static c++ programs,# with error#  mipsel-unknown-linux-uclibc-g++ hello2.cc -o mipsel-unknown-linux-uclibc-hello2#  mipsel-unknown-linux-uclibc/lib/libstdc++.so: undefined reference to `sqrtf# but can link static ones ok. 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?