aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoakim Nohlgård <joakim@nohlgard.se>2022-12-01 09:47:15 +0100
committerChris Packham <judge.packham@gmail.com>2022-12-11 19:52:26 +1300
commite04351d666142ed474bfa4b1722ed072b7f1b378 (patch)
treec62c81366c85be2153dbd6a1b45a7ba24386553b /scripts
parent4b60bea2e98780a2971cd87142297358f41161ec (diff)
downloadcrosstool-ng-e04351d666142ed474bfa4b1722ed072b7f1b378.tar.gz
crosstool-ng-e04351d666142ed474bfa4b1722ed072b7f1b378.tar.bz2
crosstool-ng-e04351d666142ed474bfa4b1722ed072b7f1b378.zip
scripts/gcc: align test conditionals with rest of repo
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 <joakim@nohlgard.se>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/cc/gcc.sh9
1 files 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