From 90043cbbf0bd30557099543e9aaa0e299958df55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Thu, 10 Sep 2015 08:50:12 +0200 Subject: [PATCH 1/2] openbsd: probe CFG_GCC egcc if default CFG_GCC is too old, probe also egcc (which is gcc from ports). set CC/CXX too, in order to pass them to LLVM --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 45e137d4a9f..46b5b4c100a 100755 --- a/configure +++ b/configure @@ -885,6 +885,25 @@ then CFG_DISABLE_JEMALLOC=1 fi +# default gcc version under OpenBSD maybe too old, try using egcc, which is a +# gcc version from ports +if [ $CFG_OSTYPE = unknown-openbsd ] +then + if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then + step_msg "older GCC found, try with egcc instead" + + # probe again but using egcc + probe CFG_GCC egcc + + # and use egcc/eg++ for CC/CXX too if it was found + # (but user setting has priority) + if [ -n "$CFG_GCC" ]; then + CC="${CC:-egcc}" + CXX="${CXX:-eg++}" + fi + fi +fi + # OS X 10.9, gcc is actually clang. This can cause some confusion in the build # system, so if we find that gcc is clang, we should just use clang directly. if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ] From 9ac36f46650d0f4d92b5111688d2fb84a50d591f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Thu, 10 Sep 2015 18:50:01 +0200 Subject: [PATCH 2/2] disable jemalloc on OpenBSD depending of the compiler used, jemalloc configure don't detect correctly some parameters. --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 46b5b4c100a..fa940759d66 100755 --- a/configure +++ b/configure @@ -901,7 +901,10 @@ then CC="${CC:-egcc}" CXX="${CXX:-eg++}" fi - fi + fi + + step_msg "on OpenBSD, disabling jemalloc" + CFG_DISABLE_JEMALLOC=1 fi # OS X 10.9, gcc is actually clang. This can cause some confusion in the build