source: npl/toolchains/crosstool/ldconfig.patch @ 0105685

gcc484ntopperl-5.22
Last change on this file since 0105685 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[c5c522c]1--- crosstool-0.37/crosstool.sh.orig    2005-07-11 17:00:02.000000000 +0100
2+++ crosstool-0.37/crosstool.sh 2005-07-11 17:02:10.000000000 +0100
3@@ -649,8 +649,34 @@
4 then
5   cd build-glibc
6   make LD=${TARGET}-ld RANLIB=${TARGET}-ranlib
7-  # note: should do full install and then fix linker scripts, but this is faster
8-  make install_root=${SYSROOT} $GLIBC_SYSROOT_ARG install-bin install-rootsbin install-sbin install-data install-others
9+  make install install_root=${SYSROOT} $GLIBC_SYSROOT_ARG
10+
11+  # Fix problems in linker scripts.
12+  #
13+  # 1. Remove absolute paths
14+  # Any file in a list of known suspects that isn't a symlink is assumed to be a linker script.
15+  # FIXME: test -h is not portable
16+  # FIXME: probably need to check more files than just these three...
17+  # Need to use sed instead of just assuming we know what's in libc.so because otherwise alpha breaks
18+  # But won't need to do this at all once we use --with-sysroot (available in gcc-3.3.3 and up)
19+  #
20+  # 2. Remove lines containing BUG per http://sources.redhat.com/ml/bug-glibc/2003-05/msg00055.html,
21+  # needed to fix gcc-3.2.3/glibc-2.3.2 targeting arm
22+  #
23+  # To make "strip *.so.*" not fail (ptxdist does this), rename to .so_orig rather than .so.orig
24+  for file in libc.so libpthread.so libgcc_s.so; do
25+    for lib in lib lib64 usr/lib usr/lib64; do
26+          if test -f ${SYSROOT}/$lib/$file && test ! -h ${SYSROOT}/$lib/$file; then
27+                  mv ${SYSROOT}/$lib/$file ${SYSROOT}/$lib/${file}_orig
28+                  if test -z "$USE_SYSROOT"; then
29+                    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
30+                  else
31+                    sed '/BUG in libc.scripts.output-format.sed/d' < ${SYSROOT}/$lib/${file}_orig > ${SYSROOT}/$lib/$file
32+                  fi
33+          fi
34+      done
35+  done
36+  cd ..
37 fi
Note: See TracBrowser for help on using the repository browser.