Skip to content

Commit

Permalink
Ubuntu 10.04 turned gcc into a perl script wrapper that calls gcc.rea…
Browse files Browse the repository at this point in the history
…l, 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.
  • Loading branch information
landley committed Apr 30, 2010
1 parent 0a57855 commit 988d9dc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion host-tools.sh
Expand Up @@ -81,7 +81,7 @@ PATH="$STAGE_DIR:$PATH"

for i in ar as nm cc make ld gcc
do
if [ ! -f "${STAGE_DIR}/$i" ]
if [ ! -f "$STAGE_DIR/$i" ]
then
# Loop through each instance, populating fallback directories.

Expand All @@ -95,9 +95,21 @@ do
X=$[$X+1]
FALLBACK="$STAGE_DIR/fallback-$X"
done

if [ ! -f "$STAGE_DIR/$i" ]
then
echo "Toolchain component missing: $i" >&2
dienow
fi
fi
done

# Workaround for a bug in Ubuntu 10.04 where gcc became a perl script calling
# gcc.real. Systems that aren't crazy don't need this.

ET_TU_UBUNTU="$(PATH="$OLDPATH" "$STAGE_DIR/which" gcc.real)"
[ ! -z "$ET_TU_UBUNTU" ] && ln -sf "$ET_TU_UBUNTU" gcc.real

# We now have all the tools we need in $STAGE_DIR, so trim the $PATH to
# remove the old ones.

Expand Down

0 comments on commit 988d9dc

Please sign in to comment.