From e04351d666142ed474bfa4b1722ed072b7f1b378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Thu, 1 Dec 2022 09:47:15 +0100 Subject: [PATCH] scripts/gcc: align test conditionals with rest of repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most scripts in crosstool-ng use [ -z "${string}" ] to check for empty variables. Deleted one duplicate declaration of the local exec_prefix Signed-off-by: Joakim NohlgÄrd --- scripts/build/cc/gcc.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index d75ad986..8cf03cbd 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -288,10 +288,10 @@ do_gcc_core_backend() { ;; libstdcxx) CT_DoLog EXTRA "Configuring libstdc++ for ${libstdcxx_name}" - if [ "${header_dir}" = "" ]; then + if [ -z "${header_dir}" ]; then header_dir="${CT_PREFIX_DIR}/${libstdcxx_name}/include" fi - if [ "${exec_prefix}" = "" ]; then + if [ -z "${exec_prefix}" ]; then exec_prefix="${CT_PREFIX_DIR}/${libstdcxx_name}" fi extra_config+=( "${CT_CC_SYSROOT_ARG[@]}" ) @@ -306,7 +306,7 @@ do_gcc_core_backend() { ;; esac - if [ "${exec_prefix}" = "" ]; then + if [ -z "${exec_prefix}" ]; then exec_prefix="${prefix}" fi @@ -911,7 +911,6 @@ do_gcc_backend() { local extra_cxxflags_for_target local ldflags local build_manuals - local exec_prefix local header_dir local libstdcxx_name local -a host_libstdcxx_flags @@ -926,7 +925,7 @@ do_gcc_backend() { eval "${arg// /\\ }" done - if [ "${exec_prefix}" = "" ]; then + if [ -z "${exec_prefix}" ]; then exec_prefix="${prefix}" fi