Skip to content

Commit

Permalink
Work around Cygwin idiosyncrasy.
Browse files Browse the repository at this point in the history
Cygwin doesn't like directory names ending with a dot, e.g. "multilib_."

Signed-off-by: Alexey Neyman <stilor@att.net>
  • Loading branch information
stilor committed Dec 6, 2016
1 parent 25f5b82 commit 7e44983
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/functions
Expand Up @@ -1574,6 +1574,7 @@ CT_IterateMultilibs() {
local -a multilibs
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_target
local root_suffix
local dir_postfix

# Name used internally below
if [ "${prefix}" = "sysroot-check" ]; then
Expand Down Expand Up @@ -1655,7 +1656,12 @@ CT_IterateMultilibs() {
multi_os_dir=.
fi

CT_mkdir_pushd "${prefix}_${multi_dir//\//_}"
# Brain-dead Cygwin hack: Cygwin cannot run a binary if there is a directory
# component in the path that ends with a dot. Unfortunately, that's the case
# for the default library name with GCC.
dir_postfix=_${multi_dir//\//_}
dir_postfix=${dir_postfix%_.}
CT_mkdir_pushd "${prefix}${dir_postfix}"
$func multi_dir="${multi_dir}" \
multi_os_dir="${multi_os_dir}" \
multi_flags="${multi_flags}" \
Expand Down

0 comments on commit 7e44983

Please sign in to comment.