Skip to content

Commit 3f5b50f

Browse files
author
Paul Nathan
committed
Fixing spaces feeding into the configure script that breaks builds..
See issue# 4242 in github for a detailed readout of what went wrong. This fix will be in two parts; the Rust compiler configure file getting fixed; the other fix is convincing the LLVM Autotools world that it will generate correctly escaped/quoted paths.
1 parent 97ddf3c commit 3f5b50f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

configure

+14-14
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ fi
373373

374374
# If we have no git directory then we are probably a tarball distribution
375375
# and shouldn't attempt to load submodules
376-
if [ ! -e ${CFG_SRC_DIR}.git ]
376+
if [ ! -e "${CFG_SRC_DIR}.git" ]
377377
then
378378
probe CFG_GIT git
379379
msg "git: no git directory. disabling submodules"
@@ -634,7 +634,7 @@ step_msg "configuring submodules"
634634
# Have to be in the top of src directory for this
635635
if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ]
636636
then
637-
cd ${CFG_SRC_DIR}
637+
cd "${CFG_SRC_DIR}"
638638

639639
msg "git: submodule sync"
640640
"${CFG_GIT}" submodule --quiet sync
@@ -662,28 +662,28 @@ then
662662
"${CFG_GIT}" submodule --quiet foreach --recursive git checkout .
663663
need_ok "git failed"
664664

665-
cd ${CFG_BUILD_DIR}
665+
cd "${CFG_BUILD_DIR}"
666666
fi
667667

668668
# Configure llvm, only if necessary
669669
step_msg "looking at LLVM"
670-
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
670+
CFG_LLVM_SRC_DIR="${CFG_SRC_DIR}src/llvm/"
671671
for t in $CFG_TARGET_TRIPLES
672672
do
673673
do_reconfigure=1
674674

675-
if [ -z $CFG_LLVM_ROOT ]
675+
if [ -z "$CFG_LLVM_ROOT" ]
676676
then
677-
LLVM_BUILD_DIR=${CFG_BUILD_DIR}llvm/$t
677+
LLVM_BUILD_DIR="${CFG_BUILD_DIR}llvm/$t"
678678
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
679679
then
680680
LLVM_DBG_OPTS=""
681681
# Just use LLVM straight from its build directory to
682682
# avoid 'make install' time
683-
LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug+Asserts
683+
LLVM_INST_DIR="$LLVM_BUILD_DIR/Debug+Asserts"
684684
else
685685
LLVM_DBG_OPTS="--enable-optimized"
686-
LLVM_INST_DIR=$LLVM_BUILD_DIR/Release+Asserts
686+
LLVM_INST_DIR="$LLVM_BUILD_DIR/Release+Asserts"
687687
fi
688688
else
689689
msg "not reconfiguring LLVM, external LLVM root"
@@ -704,8 +704,8 @@ do
704704
do
705705
config_status="${CFG_BUILD_DIR}llvm/$t/config.status"
706706
if test -e ${index} -a \
707-
-e ${config_status} -a \
708-
${config_status} -nt ${index}
707+
-e "${config_status}" -a \
708+
"${config_status}" -nt ${index}
709709
then
710710
msg "not reconfiguring LLVM, config.status is fresh"
711711
do_reconfigure=0
@@ -783,18 +783,18 @@ do
783783
export CXXFLAGS
784784
export LDFLAGS
785785

786-
cd $LLVM_BUILD_DIR
786+
cd "$LLVM_BUILD_DIR"
787787
case $CFG_SRC_DIR in
788788
/* | [a-z]:* | [A-Z]:*)
789-
${CFG_LLVM_SRC_DIR}configure $LLVM_FLAGS
789+
"${CFG_LLVM_SRC_DIR}configure" $LLVM_FLAGS
790790
;;
791791
*)
792-
${CFG_BUILD_DIR}${CFG_LLVM_SRC_DIR}configure \
792+
"${CFG_BUILD_DIR}${CFG_LLVM_SRC_DIR}configure" \
793793
$LLVM_FLAGS
794794
;;
795795
esac
796796
need_ok "LLVM configure failed"
797-
cd $CFG_BUILD_DIR
797+
cd "$CFG_BUILD_DIR"
798798
fi
799799

800800
# Construct variables for LLVM build and install directories for

0 commit comments

Comments
 (0)