This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new e298696baf [Chore](env) add error information when DORIS_GCC_HOME not
set well (#14249)
e298696baf is described below
commit e298696baf239ba32d5e5e378099a135be21ec1a
Author: Pxl <[email protected]>
AuthorDate: Tue Nov 15 15:45:35 2022 +0800
[Chore](env) add error information when DORIS_GCC_HOME not set well (#14249)
---
env.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/env.sh b/env.sh
index c952e82281..171a868468 100755
--- a/env.sh
+++ b/env.sh
@@ -161,8 +161,18 @@ if [[ -z "${DORIS_BIN_UTILS}" ]]; then
export DORIS_BIN_UTILS='/usr/bin/'
fi
+if [[ -z "${DORIS_GCC_HOME}" ]]; then
+ DORIS_GCC_HOME="$(dirname "$(which gcc)")/.."
+ export DORIS_GCC_HOME
+fi
+
+if [[ ! -f "${DORIS_GCC_HOME}/bin/gcc" ]]; then
+ echo "Error: wrong directory DORIS_GCC_HOME=${DORIS_GCC_HOME}"
+ exit 1
+fi
+
# export CLANG COMPATIBLE FLAGS
-CLANG_COMPATIBLE_FLAGS="$(echo | "${DORIS_GCC_HOME:-"$(dirname "$(which
gcc)")/.."}/bin/gcc" -Wp,-v -xc++ - -fsyntax-only 2>&1 |
+CLANG_COMPATIBLE_FLAGS="$(echo | "${DORIS_GCC_HOME}/bin/gcc" -Wp,-v -xc++ -
-fsyntax-only 2>&1 |
grep -E '^\s+/' | awk '{print "-I" $1}' | tr '\n' ' ')"
export CLANG_COMPATIBLE_FLAGS
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]