⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crosstool-0.32-uclibc5.diff

📁 做好的交叉编译工具链
💻 DIFF
📖 第 1 页 / 共 5 页
字号:
diff -urN crosstool-0.32-orig/all.sh crosstool-0.32/all.sh--- crosstool-0.32-orig/all.sh	2005-04-27 07:15:41.000000000 +0200+++ crosstool-0.32/all.sh	2005-05-08 11:01:05.000000000 +0200@@ -17,14 +17,20 @@ test -z "${BINUTILS_DIR}"     && abort "Please set BINUTILS_DIR to the bare filename of the binutils tarball or directory" test -z "${GCC_DIR}"          && abort "Please set GCC_DIR to the bare filename of the gcc tarball or directory" -# When building a cygwin target LINUX_DIR and GLIBC_DIR are not needed.+# When building a cygwin target LINUX_DIR and LIBC_DIR are not needed. if test "${CYGWIN_DIR}" = ""; then   if test -z "${LINUX_SANITIZED_HEADER_DIR}" ; then 	test -z "${LINUX_DIR}"        && abort "Please set either LINUX_DIR or LINUX_SANITIZED_HEADER_DIR to the bare filename of the tarball or directory containing the kernel headers"   else 	test -n "${LINUX_DIR}"        && echo "You set both LINUX_DIR and LINUX_SANITIZED_HEADER_DIR - ignoring LINUX_DIR for the build"   fi-  test -z "${GLIBC_DIR}"        && abort "Please set GLIBC_DIR to the bare filename of the glibc tarball or directory"+  test -z "${LIBC_DIR}"         && abort "Please set LIBC_DIR to the bare filename of the libc tarball or directory"+  test -z "${C_LIBRARY}"        && abort "Please set C_LIBRARY to 'glibc' or 'uclibc'"+  case ${C_LIBRARY} in+       glibc)  ;;+       uclibc) ;;+       *)      abort "Unsupported C library ${C_LIBRARY}; please set C_LIBRARY to 'glibc' or 'uclibc'"+  esac fi  # Four environment variables are optional, namely:@@ -37,7 +43,7 @@  set -ex -TOOLCOMBO=$GCC_DIR-$GLIBC_DIR+TOOLCOMBO=$GCC_DIR-$LIBC_DIR BUILD_DIR=`pwd`/build/$TARGET/$TOOLCOMBO  TOP_DIR=`pwd`@@ -49,15 +55,17 @@ fi  # Sanity checks-case x$PREFIX in-x/) abort "Don't set PREFIX to /, as \$PREFIX gets deleted!" ;;-x/usr) abort "Don't set PREFIX to /usr, as \$PREFIX gets deleted!" ;;-*) ;;-esac+if test "x${PREFIX_NO_REMOVE}" = "x"; then+    case x$PREFIX in+        x/) abort "Don't set PREFIX to /, as \$PREFIX gets deleted!" ;;+        x/usr) abort "Don't set PREFIX to /usr, as \$PREFIX gets deleted!" ;;+        *) ;;+    esac+fi  case x$USER in-xroot) abort "Don't run all.sh or crosstool.sh as root, it's dangerous" ;;-*) ;;+    xroot) abort "Don't run all.sh or crosstool.sh as root, it's dangerous" ;;+    *) ;; esac  test -w /tmp || abort "Cannot write to /tmp.  This makes patch and configure scripts unhappy.  Please fix."@@ -112,8 +120,12 @@  if test "$opt_no_build" = ""; then     # Build-    rm  -rf  $PREFIX-    mkdir -p $PREFIX+    if test "x${PREFIX_NO_REMOVE}" = "x"; then+        rm  -rf  $PREFIX+        mkdir -p $PREFIX+    else+        rm -rf $PREFIX/$TARGET+    fi     mkdir -p $BUILD_DIR     cd $BUILD_DIR     if test "${CYGWIN_DIR}" = ""; then@@ -123,7 +135,7 @@     fi     cd $TOP_DIR -    sh testhello.sh+    sh testhello.sh $GCC_LANGUAGES fi if test "$opt_testlinux" = "1"; then     # Build a Linux kernel to see if we candiff -urN crosstool-0.32-orig/arm-softfloat-uclibc.dat crosstool-0.32/arm-softfloat-uclibc.dat--- crosstool-0.32-orig/arm-softfloat-uclibc.dat	1970-01-01 01:00:00.000000000 +0100+++ crosstool-0.32/arm-softfloat-uclibc.dat	2005-05-08 11:01:05.000000000 +0200@@ -0,0 +1,5 @@+KERNELCONFIG=`pwd`/arm.config+TARGET=arm-softfloat-linux-uclibc+TARGET_CFLAGS="-O"+GCC_EXTRA_CONFIG="--with-float=soft"+GLIBC_EXTRA_CONFIG="--without-fp"diff -urN crosstool-0.32-orig/crosstest.sh crosstool-0.32/crosstest.sh--- crosstool-0.32-orig/crosstest.sh	2005-03-08 01:34:34.000000000 +0100+++ crosstool-0.32/crosstest.sh	2005-05-08 11:01:05.000000000 +0200@@ -23,7 +23,13 @@ test -z "${BUILD_DIR}"      && abort "Please set BUILD_DIR to the directory build-gcc etc. live in" test -z "${BINUTILS_DIR}"   && abort "Please set BINUTILS_DIR to the bare filename of the binutils tarball or directory" test -z "${GCC_DIR}"        && abort "Please set GCC_DIR to the bare filename of the gcc tarball or directory"-test -z "${GLIBC_DIR}"      && abort "Please set GLIBC_DIR to the bare filename of the glibc tarball or directory"+test -z "${LIBC_DIR}"       && abort "Please set LIBC_DIR to the bare filename of the C library tarball or directory"+test -z "${C_LIBRARY}"      && abort "Please set C_LIBRARY to 'glibc' or 'uclibc'"+case ${C_LIBRARY} in+    glibc)  ;;+    uclibc) ;;+    *)      abort "Unsupported C library ${C_LIBRARY}; please set C_LIBRARY to 'glibc' or 'uclibc'"+esac test -z "${TARGET}"         && abort "Please set TARGET to the Gnu target identifier (e.g. pentium-linux)" test -z "${TARGET_CFLAGS}"  && abort "Please set TARGET_CFLAGS to any compiler flags needed when building glibc (-O recommended)" test -z "${TOP_DIR}"        && abort "Please set TOP_DIR to where the crosstool scripts live"@@ -108,7 +114,7 @@ find . -name '*.log' | xargs rm -f  #--- glibc tests ----if true; then+if test "${C_LIBRARY}" = glibc ; then cd build-glibc  make tests@@ -184,7 +190,7 @@    echo "Some glibc test failed.  Check logfiles on target in /jail/build-glibc/*/*.out." fi # it's not really a summary yet, but let's copy it up anyway-cp glibctest.out $TOP_DIR/$TARGET-$GCC_DIR-$GLIBC_DIR.glibc.sum+cp glibctest.out $TOP_DIR/$TARGET-$GCC_DIR-$LIBC_DIR.glibc.sum fi  #--- gcc tests ---@@ -253,7 +259,7 @@ # Run standard test log analysis tool sh ../${GCC_DIR}/contrib/test_summary  | sed '1d;/EOF/,$d' > test_summary.log -cp test_summary.log $TOP_DIR/$TARGET-$GCC_DIR-$GLIBC_DIR.gcc.sum+cp test_summary.log $TOP_DIR/$TARGET-$GCC_DIR-$LIBC_DIR.gcc.sum  cd .. @@ -269,7 +275,7 @@ 	echo "" >> test_summary.log done -cp test_summary.log $TOP_DIR/$TARGET-$GCC_DIR-$GLIBC_DIR.binutils.sum+cp test_summary.log $TOP_DIR/$TARGET-$GCC_DIR-$LIBC_DIR.binutils.sum  cd .. diff -urN crosstool-0.32-orig/crosstool.sh crosstool-0.32/crosstool.sh--- crosstool-0.32-orig/crosstool.sh	2005-04-28 20:52:28.000000000 +0200+++ crosstool-0.32/crosstool.sh	2005-05-08 11:01:29.000000000 +0200@@ -24,7 +24,13 @@ test -z "${SRC_DIR}"          && abort "Please set SRC_DIR to the directory where the source tarballs are to be unpacked" test -z "${BINUTILS_DIR}"     && abort "Please set BINUTILS_DIR to the bare filename of the binutils tarball or directory" test -z "${GCC_DIR}"          && abort "Please set GCC_DIR to the bare filename of the gcc tarball or directory"-test -z "${GLIBC_DIR}"        && abort "Please set GLIBC_DIR to the bare filename of the glibc tarball or directory"+test -z "${LIBC_DIR}"         && abort "Please set LIBC_DIR to the bare filename of the C library tarball or directory"+test -z "${C_LIBRARY}"        && abort "Please set C_LIBRARY to 'glibc' or 'uclibc'"+case ${C_LIBRARY} in+    glibc)  ;;+    uclibc) ;;+    *)      abort "Unsupported C library ${C_LIBRARY}; please set C_LIBRARY to 'glibc' or 'uclibc'"+esac test -z "${TARGET}"           && abort "Please set TARGET to the Gnu target identifier (e.g. pentium-linux)" test -z "${TARGET_CFLAGS}"    && abort "Please set TARGET_CFLAGS to any compiler flags needed when building glibc (-O recommended)" if test -z "${LINUX_SANITIZED_HEADER_DIR}" ; then@@ -48,6 +54,8 @@ test -z "${GCC_HOST}"              && echo "GCC_HOST not set, assuming HOST=BUILD" test -z "${KERNELCONFIG}" && test ! -f ${LINUX_DIR}/.config  && echo  "KERNELCONFIG not set, and no .config file found, so not configuring linux kernel" test -z "${KERNELCONFIG}" || test -r "${KERNELCONFIG}"  || abort  "Can't read file KERNELCONFIG = $KERNELCONFIG, please fix."+test -z "${UCLIBCCONFIG}" || test -r "${UCLIBCCONFIG}"  || abort  "Can't read file UCLIBCCONFIG = $UCLIBCCONFIG, please fix."+test "${C_LIBRARY}" = uclibc && test -z "${UCLIBCCONFIG}" &&  test '!' -f ${LIBC_DIR}/.config && echo "UCLIBCCONFIG not set, and no .config file found, so using a default config\n    You will probably want to change this." test -z "${SHARED_MODE}" && SHARED_MODE="--enable-shared" && echo "SHARED_MODE not set, so defaulting to --enable-shared" test -z "${GCC_LANGUAGES}"         && echo "GCC_LANGUAGES not set, assuming c,c++" GCC_LANGUAGES=${GCC_LANGUAGES-"c,c++"}@@ -70,7 +78,9 @@ test -z "${LD_LIBRARY_PATH}" || abort  "glibc refuses to build if LD_LIBRARY_PATH is set.  Please unset it before running this script."  # And one is derived.-GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`+if test "${C_LIBRARY}" = glibc ; then+    GLIBCTHREADS_FILENAME=`echo $LIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`+fi  # Check for a few prerequisites that have tripped people up. awk '/x/' < /dev/null  || abort "You need awk to build a toolchain."@@ -150,7 +160,8 @@ BINUTILS_DIR=`cd ${SRC_DIR}/${BINUTILS_DIR}; pwd` GCC_DIR=`cd ${SRC_DIR}/${GCC_DIR}; pwd` LINUX_HEADER_DIR=`cd ${SRC_DIR}/${LINUX_HEADER_DIR}; pwd`-GLIBC_DIR=`cd ${SRC_DIR}/${GLIBC_DIR}; pwd`+LINUX_DIR=`cd ${SRC_DIR}/${LINUX_DIR}; pwd`+LIBC_DIR=`cd ${SRC_DIR}/${LIBC_DIR}; pwd`  # If user isn't doing a canadian cross, add the target compiler's bin to # the path, so we can use the compiler we build to build glibc etc.@@ -276,67 +287,169 @@ test -x ${PREFIX}/bin/${TARGET}-ld${EXEEXT} || abort Build failed during binutils   #---------------------------------------------------------++# A few functions for configuring uClibc, since they're used twice++defaultuClibcConfig() {+    make defconfig+    UCARCH=${ARCH}+    if test "${UCARCH}" = "ppc"; then+        UCARCH=powerpc+    fi++    # - take care that TARGET_${ARCH} is correct for ppc+    # - FIXME: RSC: this was here before as well, don't know if it is+    #   still necessary in uClibc-0.9.27: +    #   s/^TARGET_ARCH=".*"/TARGET_ARCH="${UCARCH}"/+    #   s/^\(TARGET_.*_ENDIAN\)=y/\\# \\1 is not set/++    cat > munge-defconfig.sed <<-ENDSED+              s/^\(TARGET_.*\)=y$/\\# \\1 is not set/+              s/^\\# TARGET_${UCARCH} is not set/TARGET_${UCARCH}=y/+ENDSED+    sed -i -f munge-defconfig.sed .config+}++correctuClibcConfig() {+    # Change paths to work with crosstool+    QUOTED_LINUX_DIR=`echo ${LINUX_DIR} | sed -e 's/\//\\\\\//g'`+    cat > munge-oldconfig.sed <<-ENDSED+              s/^DEVEL_PREFIX=".*"/DEVEL_PREFIX="\\/"/+              s/^RUNTIME_PREFIX=".*"/RUNTIME_PREFIX="\\/"/+              s/^KERNEL_SOURCE=".*"/KERNEL_SOURCE="${QUOTED_LINUX_DIR}"/+ENDSED+    # Force on options needed for C++ if we'll be making a C++ compiler.+    # Note that the two PREGEN_LOCALE and the XLOCALE lines may be missing+    # entirely if LOCALE is not set.  If LOCALE was already set, we'll+    # assume the user has already made all the appropriate generation+    # arrangements.  Note that having the uClibc Makefile download the+    # pregenerated locales is not compatible with crosstool; besides,+    # crosstool downloads them as part of getandpatch.sh.+    if echo "$TESTLANG" | egrep "(^|,)c++(,|\$)"; then+        cat >> munge-oldconfig.sed <<-ENDSED+              s/^\\# DO_C99_MATH is not set/DO_C99_MATH=y/+              s/^\\# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/+ENDSED+        if grep -v UCLIBC_HAS_GETTEXT_AWARENESS .config; then+            # This one often slips through the cracks when script-adding+            # locale support+            cat >> munge-oldconfig.sed <<-ENDSED+              /UCLIBC_HAS_GNU_GETOPT/ i \\+              \\# UCLIBC_HAS_GETTEXT_AWARENESS is not set\\n+ENDSED+        fi+    fi+    sed -i -f munge-oldconfig.sed .config+#             s/^\\# UCLIBC_HAS_WCHAR is not set/UCLIBC_HAS_WCHAR=y/+#             s/^\\# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCALE_DATA=y\\n\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set\\n\\# UCLIBC_HAS_XLOCALE is not set/+}++#---------------------------------------------------------+ echo "Install glibc headers needed to build bootstrap compiler -- but only if gcc-3.x"  # Only need to install bootstrap glibc headers for gcc-3.0 and above?  Or maybe just gcc-3.3 and above? # This will change for gcc-3.5, I think. # See also http://gcc.gnu.org/PR8180, which complains about the need for this step. # Don't install them if they're already there (it's really slow)+ if grep -q gcc-3 ${GCC_DIR}/ChangeLog && test '!' -f $HEADERDIR/features.h; then-    mkdir -p build-glibc-headers; cd build-glibc-headers -    if test '!' -f Makefile; then-        # The following three things have to be done to build glibc-2.3.x, but they don't hurt older versions.-        # 1. override CC to keep glibc's configure from using $TARGET-gcc. -        # 2. disable linuxthreads, which needs a real cross-compiler to generate tcb-offsets.h properly-        # 3. build with gcc 3.2 or later-        # Compare these options with the ones used when building glibc for real below - they're different.-        # As of glibc-2.3.2, to get this step to work for hppa-linux, you need --enable-hacker-mode-        # so when configure checks to make sure gcc has access to the assembler you just built...-        # Alternately, we could put ${PREFIX}/${TARGET}/bin on the path.-        # Set --build so maybe we don't have to specify "cross-compiling=yes" below (haven't tried yet)-        # Note: the warning-        # "*** WARNING: Are you sure you do not want to use the `linuxthreads'"-        # *** add-on?"-        # is ok here, since all we want are the basic headers at this point.-        # Override libc_cv_ppc_machine so glibc-cvs doesn't complain-        # 'a version of binutils that supports .machine "altivec" is needed'.-        libc_cv_ppc_machine=yes \-        CC=gcc \-            ${GLIBC_DIR}/configure --prefix=/usr \+    mkdir -p build-libc-headers; cd build-libc-headers++    case ${C_LIBRARY} in++      glibc)+    +        mkdir -p build-glibc-headers; cd build-glibc-headers++        if test '!' -f Makefile; then

⌨️ 快捷键说明

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