Mercurial > hg > aboriginal
comparison host-tools.sh @ 1041:77024e0f4ccb
Ubuntu 10.04 turned gcc into a perl script wrapper that calls gcc.real, so host-tools.sh has to copy that if it exists. Add some simple error checking the the host toolchain symlinking while we're at it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 30 Apr 2010 09:03:06 -0500 |
parents | 0fd90ff771dc |
children | 0852a69b0d65 |
comparison
equal
deleted
inserted
replaced
1040:b630081630a7 | 1041:77024e0f4ccb |
---|---|
79 # instance of these tools that occurs in the $PATH, in order, each in its | 79 # instance of these tools that occurs in the $PATH, in order, each in its |
80 # own fallback directory. | 80 # own fallback directory. |
81 | 81 |
82 for i in ar as nm cc make ld gcc | 82 for i in ar as nm cc make ld gcc |
83 do | 83 do |
84 if [ ! -f "${STAGE_DIR}/$i" ] | 84 if [ ! -f "$STAGE_DIR/$i" ] |
85 then | 85 then |
86 # Loop through each instance, populating fallback directories. | 86 # Loop through each instance, populating fallback directories. |
87 | 87 |
88 X=0 | 88 X=0 |
89 FALLBACK="$STAGE_DIR" | 89 FALLBACK="$STAGE_DIR" |
93 ln -sf "$j" "$FALLBACK/$i" || dienow | 93 ln -sf "$j" "$FALLBACK/$i" || dienow |
94 | 94 |
95 X=$[$X+1] | 95 X=$[$X+1] |
96 FALLBACK="$STAGE_DIR/fallback-$X" | 96 FALLBACK="$STAGE_DIR/fallback-$X" |
97 done | 97 done |
98 | |
99 if [ ! -f "$STAGE_DIR/$i" ] | |
100 then | |
101 echo "Toolchain component missing: $i" >&2 | |
102 dienow | |
103 fi | |
98 fi | 104 fi |
99 done | 105 done |
106 | |
107 # Workaround for a bug in Ubuntu 10.04 where gcc became a perl script calling | |
108 # gcc.real. Systems that aren't crazy don't need this. | |
109 | |
110 ET_TU_UBUNTU="$(PATH="$OLDPATH" "$STAGE_DIR/which" gcc.real)" | |
111 [ ! -z "$ET_TU_UBUNTU" ] && ln -sf "$ET_TU_UBUNTU" gcc.real | |
100 | 112 |
101 # We now have all the tools we need in $STAGE_DIR, so trim the $PATH to | 113 # We now have all the tools we need in $STAGE_DIR, so trim the $PATH to |
102 # remove the old ones. | 114 # remove the old ones. |
103 | 115 |
104 PATH="$(hosttools_path)" | 116 PATH="$(hosttools_path)" |