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

📄 crosstool-0.38-uclibc1.diff

📁 做好的交叉编译工具链
💻 DIFF
📖 第 1 页 / 共 5 页
字号:
+    # sh4 really needs to set configparms as of gcc-3.4/glibc-2.3.2+    # note: this is awkward, doesn't work well if you need more than one line in configparms+    echo ${GLIBC_CONFIGPARMS} > configparms++    if test '!' -f Makefile; then+        # Configure with --prefix the way we want it on the target...+        # There are a whole lot of settings here.  You'll probably want+        # to read up on what they all mean, and customize a bit.+        # e.g. I picked --enable-kernel=2.4.3 here just because it's the kernel Bill +        # used in his example gcc2.95.3 script.  That means some backwards compatibility +        # stuff is turned on in glibc that you may not need if you're using a newer kernel.+        # Compare these options with the ones used when installing the glibc headers above - they're different.+        # Adding "--without-gd" option to avoid error "memusagestat.c:36:16: gd.h: No such file or directory" +        # See also http://sources.redhat.com/ml/libc-alpha/2000-07/msg00024.html. +        # Set BUILD_CC, or you won't be able to build datafiles+        # Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test programs++        BUILD_CC=gcc CFLAGS="$TARGET_CFLAGS $EXTRA_TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \+        AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \+            ${LIBC_DIR}/configure --prefix=/usr \+            --build=$BUILD --host=$TARGET \+            ${GLIBC_EXTRA_CONFIG} \+            --enable-kernel=2.4.3 \+            --without-cvs --disable-profile --disable-debug --without-gd \+            --without-tls --without-__thread \+            $SHARED_MODE \+            --enable-add-ons${GLIBC_ADDON_OPTIONS} --with-headers=$HEADERDIR+    fi++    if grep -l '^install-lib-all:' ${LIBC_DIR}/Makerules > /dev/null; then+        # nptl-era glibc.+        # If the install-lib-all target (which is added by our make-install-lib-all.patch) is present,+        # it means we're building glibc-2.3.3 or later, and we can't build programs yet,+        # as they require libeh, which won't be installed until full build of gcc+        GLIBC_INITIAL_BUILD_RULE=lib+        GLIBC_INITIAL_INSTALL_RULE="install-lib-all install-headers"+        GLIBC_INSTALL_APPS_LATER=yes+    else+        # classic glibc.  +        # We can build and install everything with the bootstrap compiler.+        GLIBC_INITIAL_BUILD_RULE=all+        GLIBC_INITIAL_INSTALL_RULE=install+        GLIBC_INSTALL_APPS_LATER=no+    fi+    # If this fails with an error like this:+    # ...  linux/autoconf.h: No such file or directory +    # then you need to set the KERNELCONFIG variable to point to a .config file for this arch.+    # The following architectures are known to need kernel .config: alpha, arm, ia64, s390, sh, sparc+    # Note: LD and RANLIB needed by glibc-2.1.3's c_stub directory, at least on macosx+    # No need for PARALLELMFLAGS here, Makefile already reads this environment variable+    make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib $GLIBC_INITIAL_BUILD_RULE+    make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG $GLIBC_INITIAL_INSTALL_RULE++    # This doesn't seem to work when building a crosscompiler,+    # as it tries to execute localedef using the just-built ld.so!?+    #make localedata/install-locales install_root=${SYSROOT}++    # Fix problems in linker scripts.+    # +    # 1. Remove absolute paths+    # Any file in a list of known suspects that isn't a symlink is assumed to be a linker script.+    # FIXME: test -h is not portable+    # FIXME: probably need to check more files than just these three...+    # Need to use sed instead of just assuming we know what's in libc.so because otherwise alpha breaks+    # But won't need to do this at all once we use --with-sysroot (available in gcc-3.3.3 and up)+    #+    # 2. Remove lines containing BUG per http://sources.redhat.com/ml/bug-glibc/2003-05/msg00055.html,+    # needed to fix gcc-3.2.3/glibc-2.3.2 targeting arm+    #+    # To make "strip *.so.*" not fail (ptxdist does this), rename to .so_orig rather than .so.orig+    for file in libc.so libpthread.so libgcc_s.so; do+      for lib in lib lib64 usr/lib usr/lib64; do+            if test -f ${SYSROOT}/$lib/$file && test ! -h ${SYSROOT}/$lib/$file; then+                    mv ${SYSROOT}/$lib/$file ${SYSROOT}/$lib/${file}_orig+                    if test -z "$USE_SYSROOT"; then+                      sed 's,/usr/lib/,,g;s,/usr/lib64/,,g;s,/lib/,,g;s,/lib64/,,g;/BUG in libc.scripts.output-format.sed/d' < ${SYSROOT}/$lib/${file}_orig > ${SYSROOT}/$lib/$file+                    else+                      sed '/BUG in libc.scripts.output-format.sed/d' < ${SYSROOT}/$lib/${file}_orig > ${SYSROOT}/$lib/$file+                    fi+            fi+        done     done-done++  ;;++  uclibc)++    # currently uClibc cannot be built offtree, so we copy the source +    cp -a ${LIBC_DIR}/* .+ +    # Go find a .config, or make a new default one.+    if test '!' -f .config; then+      if test -f ../build-libc-headers/.config; then+        cp ../build-libc-headers/.config .config+      elif test -z "${UCLIBCCONFIG}"; then+        if test -f ${LIBC_DIR}/.config; then+          cp ${LIBC_DIR}/.config .config+        else+          defaultuClibcConfig+        fi+      else+        cp ${UCLIBCCONFIG} .config+      fi+    fi+   +    correctuClibcConfig+   +    # uClibc uses the CROSS environment variable as a prefix to the+    # compiler tools to use.  The newly built tools should be in our+    # path, so we need only give the correct name for them.+    CROSS=${TARGET}- PREFIX=${PREFIX}/${TARGET}/ make all install++    ;;+   +esac+   cd ..  test -f ${SYSROOT}/lib/libc.a || test -f ${SYSROOT}/lib64/libc.a || test -f ${SYSROOT}/usr/lib/libc.a || test -f ${SYSROOT}/usr/lib64/libc.a || abort Building libc failed@@ -581,18 +724,34 @@     # only matters for gcc-3.2.x and later, I think     # --disable-nls to work around crash bug on ppc405, but also because embedded     # systems don't really need message catalogs...++    GCC_DEFAULT_OPTIONS="--disable-nls \+                         --enable-threads=posix \+                         --enable-symvers=gnu \+                         --enable-languages="$GCC_LANGUAGES" \+                         --enable-shared \+                         --enable-c99 \+                         --enable-long-long"+    case ${C_LIBRARY} in+        glibc)+            GCC_DEFAULT_OPTIONS="$GCC_DEFAULT_OPTIONS --enable-__cxa_atexit"+            ;;+        *)+            GCC_DEFAULT_OPTIONS="$GCC_DEFAULT_OPTIONS --disable-__cxa_atexit"+            ;;+    esac+    for GCC_DEFAULT_OPTION in $GCC_DEFAULT_OPTIONS ; do+        GCC_SEARCH_OPTION=`echo "$GCC_DEFAULT_OPTION" | sed -e 's/^--en//' \+            -e 's/^--dis//' -e 's/=.*//'`+        if echo "$GCC_EXTRA_CONFIG" | grep -v "$GCC_SEARCH_OPTION"; then+            GCC_EXTRA_CONFIG="$GCC_EXTRA_CONFIG $GCC_DEFAULT_OPTION"+        fi+    done+     ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \-        ${GCC_EXTRA_CONFIG} \-        $GCC_SYSROOT_ARG \-        --with-local-prefix=${SYSROOT} \-        --disable-nls \-        --enable-threads=posix \-        --enable-symvers=gnu \-        --enable-__cxa_atexit \-        --enable-languages="$GCC_LANGUAGES" \-         $SHARED_MODE \-        --enable-c99 \-        --enable-long-long+      ${GCC_SYSROOT_ARG} \+      --with-local-prefix=${SYSROOT} \+      ${GCC_EXTRA_CONFIG} fi  test "$CANADIAN_BUILD" = "" || make $PARALLELMFLAGS all-build-libiberty || true@@ -648,11 +807,11 @@  # Finally, build and install glibc programs, now that libeh (if any) is installed # Don't do this unless needed, 'cause it causes glibc-2.{1.3,2.2} to fail here with-# .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__deregister_frame_info'-# .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__register_frame_info'+# .../gcc-3.4.1-glibc-2.1.3/build-libc/libc.so.6: undefined reference to `__deregister_frame_info'+# .../gcc-3.4.1-glibc-2.1.3/build-libc/libc.so.6: undefined reference to `__register_frame_info' if test x$GLIBC_INSTALL_APPS_LATER = xyes; then-  cd build-glibc+  cd build-libc   make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib   # note: should do full install and then fix linker scripts, but this is faster   make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG install-bin install-rootsbin install-sbin install-data install-othersdiff -urN crosstool-0.38.orig/demo-arm-softfloat-uclibc.dat crosstool-0.38/demo-arm-softfloat-uclibc.dat--- crosstool-0.38.orig/demo-arm-softfloat-uclibc.dat	1970-01-01 01:00:00.000000000 +0100+++ crosstool-0.38/demo-arm-softfloat-uclibc.dat	2005-11-22 11:19:36.000000000 +0100@@ -0,0 +1,20 @@+#!/bin/sh+set -ex+TARBALLS_DIR=/ptx/src+RESULT_TOP=/opt/crosstool+export TARBALLS_DIR RESULT_TOP++# FIXME RSC: c++ builds libstdc++v3 which breaks with uClibc...?+#GCC_LANGUAGES="c,c++"+GCC_LANGUAGES="c"+export GCC_LANGUAGES++# Really, you should do the mkdir before running this,+# and chown /opt/crosstool to yourself so you don't need to run as root.+mkdir -p $RESULT_TOP++# Build the toolchain.  Takes a couple hours and a couple gigabytes.++eval `cat arm-softfloat-uclibc.dat gcc-3.3.3-uclibc-0.9.27.dat` sh all.sh --notest++echo Done.diff -urN crosstool-0.38.orig/demo-m68k-uclibc.sh crosstool-0.38/demo-m68k-uclibc.sh--- crosstool-0.38.orig/demo-m68k-uclibc.sh	1970-01-01 01:00:00.000000000 +0100+++ crosstool-0.38/demo-m68k-uclibc.sh	2005-11-22 11:19:36.000000000 +0100@@ -0,0 +1,20 @@+#!/bin/sh+set -ex+TARBALLS_DIR=/ptx/src+RESULT_TOP=/opt/crosstool+export TARBALLS_DIR RESULT_TOP++# FIXME RSC: c++ builds libstdc++v3 which breaks with uClibc...?+#GCC_LANGUAGES="c,c++"+GCC_LANGUAGES="c"+export GCC_LANGUAGES++# Really, you should do the mkdir before running this,+# and chown /opt/crosstool to yourself so you don't need to run as root.+mkdir -p $RESULT_TOP++# Build the toolchain.  Takes a couple hours and a couple gigabytes.++eval `cat m68k-uclibc.dat gcc-3.3.3-uclibc-0.9.27.dat` sh all.sh --notest++echo Done.diff -urN crosstool-0.38.orig/demoptx.sh crosstool-0.38/demoptx.sh--- crosstool-0.38.orig/demoptx.sh	2005-03-08 01:34:33.000000000 +0100+++ crosstool-0.38/demoptx.sh	2005-11-22 11:19:36.000000000 +0100@@ -12,9 +12,11 @@ #GCC_DIR=gcc-3.3.1 GCC_DIR=gcc-2.95.3 -#GLIBC_DIR=glibc-2.3.2-GLIBC_DIR=glibc-2.2.2-#GLIBC_DIR=glibc-2.2.5+#LIBC_DIR=glibc-2.3.2+LIBC_DIR=glibc-2.2.2+#LIBC_DIR=glibc-2.2.5 -export TARGET GCC_DIR GLIBC_DIR+C_LIBRARY=glibc++export TARGET GCC_DIR LIBC_DIR C_LIBRARY sh ptx.shdiff -urN crosstool-0.38.orig/gcc-2.95.3-glibc-2.1.3.dat crosstool-0.38/gcc-2.95.3-glibc-2.1.3.dat--- crosstool-0.38.orig/gcc-2.95.3-glibc-2.1.3.dat	2005-03-09 23:05:23.000000000 +0100+++ crosstool-0.38/gcc-2.95.3-glibc-2.1.3.dat	2005-11-22 11:19:36.000000000 +0100@@ -1,6 +1,7 @@ BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-2.95.3-GLIBC_DIR=glibc-2.1.3+LIBC_DIR=glibc-2.1.3+C_LIBRARY=glibc LINUX_DIR=linux-2.4.26 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.1.3 GLIBCCRYPT_FILENAME=glibc-crypt-2.1diff -urN crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.2.dat crosstool-0.38/gcc-2.95.3-glibc-2.2.2.dat--- crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.2.dat	2005-07-10 22:58:18.000000000 +0200+++ crosstool-0.38/gcc-2.95.3-glibc-2.2.2.dat	2005-11-22 11:19:36.000000000 +0100@@ -1,5 +1,6 @@ BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-2.95.3-GLIBC_DIR=glibc-2.2.2+LIBC_DIR=glibc-2.2.2+C_LIBRARY=glibc LINUX_DIR=linux-2.4.26 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.2diff -urN crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.2-hdrs-2.6.11.2.dat crosstool-0.38/gcc-2.95.3-glibc-2.2.2-hdrs-2.6.11.2.dat--- crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.2-hdrs-2.6.11.2.dat	2005-07-10 22:58:16.000000000 +0200+++ crosstool-0.38/gcc-2.95.3-glibc-2.2.2-hdrs-2.6.11.2.dat	2005-11-22 11:19:36.000000000 +0100@@ -1,6 +1,7 @@ BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-2.95.3-GLIBC_DIR=glibc-2.2.2+LIBC_DIR=glibc-2.2.2+C_LIBRARY=glibc LINUX_DIR=linux-2.4.26 LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.11.2 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.2diff -urN crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.5.dat crosstool-0.38/gcc-2.95.3-glibc-2.2.5.dat--- crosstool-0.38.orig/gcc-2.95.3-glibc-2.2.5.dat	2005-03-09 23:05:23.000000000 +0100+++ crosstool-0.38/gcc-2.95.3-glibc-2.2.5.dat	2005-11-22 11:19:36.000000000 +0100@@ -1,5 +1,6 @@ BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-2.95.3

⌨️ 快捷键说明

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