source: scripts/scripts/native-scripts/specs-mod.sh @ e0507947

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since e0507947 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 18 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/bash
2
3# cross-lfs gcc specs file modification
4# -------------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11# Modify gcc specs file
12
13cd ${SRC}
14                                                                               
15# Change dynamic linker definition in gcc specs file
16# to point at our new dynamic linker in /lib.
17# Also repoint startfile_prefix_spec.
18#
19
20# Do we have a specs file?
21SPECFILE=`${TGT_TOOLS}/bin/gcc --print-file-name specs`
22
23# We dont have a specs file... generate one.
24if [ "${SPECFILE}" = "specs" ]; then
25   # A bit of a hack, as include is a directrory, but hey...
26   SPECFILE=`${TGT_TOOLS}/bin/gcc --print-file-name include | \
27             sed 's@include@specs@g'`
28   ${TGT_TOOLS}/bin/gcc -dumpspecs > ${SPECFILE}
29fi
30                                                                               
31grep ${TGT_TOOLS}/lib ${SPECFILE} > /dev/null 2>&1 &&
32{
33   cp ${SPECFILE} ./XX
34   sed -e "s@${TGT_TOOLS}\(\(/lib\(\|32\|64\)\)\(/ld\(\|64\)\.so\.1\|/ld-linux\(\|-ia64\|-x86-64\)\.so\.\(1\|2\)\)\)@\1@g" \
35       -e "/\*startfile_prefix_spec:/{
36           h
37           n
38           s@${TGT_TOOLS}@/usr@g
39           x
40           x }" ./XX > ${SPECFILE}
41   rm -f ./XX
42}
43
Note: See TracBrowser for help on using the repository browser.