summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2021-11-30 17:46:10 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-01 03:13:34 -0500
commitd3c7f9be47ac99637ac0ede0759f77da320afaad (patch)
tree9de585d534ef2643106b37657c036d94ffd95ec1 /m4
parentf124f2a0ca3ba2b80839d8f107763ffe3b48b6e0 (diff)
downloadhaskell-d3c7f9be47ac99637ac0ede0759f77da320afaad.tar.gz
Use POSIX shell syntax to redirect stdout/err
FreeBSD (and likely NetBSD) /bin/sh does not support '>& word' to redirect stdout + stderr. (Also the preferred syntax in bash would be '&> word' to avoid surprises when `word` is "-" or a number). Resolves: #20760
Diffstat (limited to 'm4')
-rw-r--r--m4/fp_cc_supports_target.m42
-rw-r--r--m4/xcode_version.m42
2 files changed, 2 insertions, 2 deletions
diff --git a/m4/fp_cc_supports_target.m4 b/m4/fp_cc_supports_target.m4
index 19591f1453..e8710b8ffc 100644
--- a/m4/fp_cc_supports_target.m4
+++ b/m4/fp_cc_supports_target.m4
@@ -12,7 +12,7 @@ AC_DEFUN([FP_CC_SUPPORTS_TARGET],
AC_REQUIRE([GHC_LLVM_TARGET_SET_VAR])
AC_MSG_CHECKING([whether $1 CC supports --target])
echo 'int main() { return 0; }' > conftest.c
- if $CC --target=$LlvmTarget -Werror conftest.c >& /dev/null ; then
+ if $CC --target=$LlvmTarget -Werror conftest.c > /dev/null 2>&1 ; then
CONF_CC_SUPPORTS_TARGET=YES
AC_MSG_RESULT([yes])
else
diff --git a/m4/xcode_version.m4 b/m4/xcode_version.m4
index e59604d6b8..af2916eb1d 100644
--- a/m4/xcode_version.m4
+++ b/m4/xcode_version.m4
@@ -5,7 +5,7 @@ AC_DEFUN([XCODE_VERSION],[
if test "$TargetVendor_CPP" = "apple"
then
AC_MSG_CHECKING(Xcode version)
- XcodeVersion=`(xcode-select -p >& /dev/null && xcodebuild -version) | grep Xcode | sed "s/Xcode //"`
+ XcodeVersion=`(xcode-select -p > /dev/null 2>&1 && xcodebuild -version) | grep Xcode | sed "s/Xcode //"`
# Old Xcode versions don't actually give the Xcode version
if test "$XcodeVersion" = ""
then