Skip to content

Commit

Permalink
Enable configure to detect 32 bit systems on 64 bit kernels
Browse files Browse the repository at this point in the history
These systems run 32 bit binaries so arch needs to be forced
to 32 bits.
  • Loading branch information
arkaitzj authored and catamorphism committed Oct 17, 2012
1 parent 33adb7a commit cf8bded
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure
Expand Up @@ -257,6 +257,16 @@ case $CFG_CPUTYPE in
err "unknown CPU type: $CFG_CPUTYPE"
esac

# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
then
file -L "$SHELL" | grep -q "x86[_-]64"
if [ $? != 0 ]; then
CFG_CPUTYPE=i686
fi
fi


DEFAULT_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}"

CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
Expand Down

0 comments on commit cf8bded

Please sign in to comment.