Skip to content

Commit

Permalink
configure: Only use -m32 on x86-* 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed May 28, 2014
1 parent 2a63e44 commit 8e3d2c3
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1043,51 +1043,71 @@ do

case "$CFG_CC" in
("ccache clang")
LLVM_CXX_32="ccache clang++ -m32 -Qunused-arguments"
LLVM_CC_32="ccache clang -m32 -Qunused-arguments"
LLVM_CXX_32="ccache clang++ -Qunused-arguments"
LLVM_CC_32="ccache clang -Qunused-arguments"

LLVM_CXX_64="ccache clang++ -Qunused-arguments"
LLVM_CC_64="ccache clang -Qunused-arguments"
;;
("clang")
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
LLVM_CC_32="clang -m32 -Qunused-arguments"
LLVM_CXX_32="clang++ -Qunused-arguments"
LLVM_CC_32="clang -Qunused-arguments"

LLVM_CXX_64="clang++ -Qunused-arguments"
LLVM_CC_64="clang -Qunused-arguments"
;;
("ccache gcc")
LLVM_CXX_32="ccache g++ -m32"
LLVM_CC_32="ccache gcc -m32"
LLVM_CXX_32="ccache g++"
LLVM_CC_32="ccache gcc"

LLVM_CXX_64="ccache g++"
LLVM_CC_64="ccache gcc"
;;
("gcc")
LLVM_CXX_32="g++ -m32"
LLVM_CC_32="gcc -m32"
LLVM_CXX_32="g++"
LLVM_CC_32="gcc"

LLVM_CXX_64="g++"
LLVM_CC_64="gcc"
;;

(*)
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
LLVM_CXX_32="$CXX -m32"
LLVM_CC_32="$CC -m32"
LLVM_CXX_32="$CXX"
LLVM_CC_32="$CC"

LLVM_CXX_64="$CXX"
LLVM_CC_64="$CC"
;;
esac

LLVM_CFLAGS_32="-m32"
LLVM_CXXFLAGS_32="-m32"
LLVM_LDFLAGS_32="-m32"
case "$CFG_CPUTYPE" in
(x86*)
LLVM_CXX_32="$LLVM_CXX_32 -m32"
LLVM_CC_32="$LLVM_CC_32 -m32"

LLVM_CFLAGS_64=""
LLVM_CXXFLAGS_64=""
LLVM_LDFLAGS_64=""
LLVM_CFLAGS_32="-m32"
LLVM_CXXFLAGS_32="-m32"
LLVM_LDFLAGS_32="-m32"

LLVM_CFLAGS_64=""
LLVM_CXXFLAGS_64=""
LLVM_LDFLAGS_64=""

LLVM_CXX_32="$LLVM_CXX_32 -m32"
LLVM_CC_32="$LLVM_CC_32 -m32"
;;

(*)
LLVM_CFLAGS_32=""
LLVM_CXXFLAGS_32=""
LLVM_LDFLAGS_32=""

LLVM_CFLAGS_64=""
LLVM_CXXFLAGS_64=""
LLVM_LDFLAGS_64=""
;;
esac

if echo $t | grep -q x86_64
then
Expand Down

0 comments on commit 8e3d2c3

Please sign in to comment.