diff --git a/Make.inc b/Make.inc index da83dd3ea567f..81343ef9a1702 100644 --- a/Make.inc +++ b/Make.inc @@ -652,8 +652,8 @@ ifeq ($(OS),FreeBSD) ifneq (,$(findstring gfortran,$(FC))) # First let's figure out what version of GCC we're dealing with -_GCCMAJOR := $(shell $(FC) -dumpversion | cut -d'.' -f1) -_GCCMINOR := $(shell $(FC) -dumpversion | cut -d'.' -f2) +_GCCMAJOR := $(shell $(FC) -dumpversion 2>/dev/null | cut -d'.' -f1) +_GCCMINOR := $(shell $(FC) -dumpversion 2>/dev/null | cut -d'.' -f2) # The ports system uses major and minor for GCC < 5 (e.g. gcc49 for GCC 4.9), otherwise major only ifeq ($(_GCCMAJOR),4) diff --git a/deps/csl.mk b/deps/csl.mk index 9f95c00f3cfe7..1940984fdc199 100644 --- a/deps/csl.mk +++ b/deps/csl.mk @@ -1,6 +1,6 @@ # Interrogate the fortran compiler (which is always GCC based) on where it is keeping its libraries -STD_LIB_PATH := $(shell LANG=C $(FC) -print-search-dirs | grep '^programs: =' | sed -e "s/^programs: =//") -STD_LIB_PATH += :$(shell LANG=C $(FC) -print-search-dirs | grep '^libraries: =' | sed -e "s/^libraries: =//") +STD_LIB_PATH := $(shell LANG=C $(FC) -print-search-dirs 2>/dev/null | grep '^programs: =' | sed -e "s/^programs: =//") +STD_LIB_PATH += :$(shell LANG=C $(FC) -print-search-dirs 2>/dev/null | grep '^libraries: =' | sed -e "s/^libraries: =//") ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g") endif