Skip to content

Commit

Permalink
Silence missing gfortran errors in Make.inc (#48403)
Browse files Browse the repository at this point in the history
When we attempt to invoke `gfortran` to determine the local `libgfortran` ABI version that we should attempt to mimic, if `gfortran` is not installed we get a harmless error printed out to `stderr`:

```
/bin/sh: line 1: gfortran: command not found
```

This should silence these errors, as they're not useful to us.
  • Loading branch information
staticfloat committed Jan 25, 2023
1 parent 9b1ffbb commit e536c77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ USE_BINARYBUILDER ?= 0
endif

# Auto-detect triplet once, create different versions that we use as defaults below for each BB install target
FC_VERSION := $(shell $(FC) -dM -E - < /dev/null | grep __GNUC__ | cut -d' ' -f3)
FC_VERSION := $(shell $(FC) -dM -E - < /dev/null 2>/dev/null | grep __GNUC__ | cut -d' ' -f3)
ifeq ($(USEGCC)$(FC_VERSION),1)
FC_OR_CC_VERSION := $(shell $(CC) -dumpfullversion -dumpversion 2>/dev/null | cut -d'.' -f1)
# n.b. clang's __GNUC__ macro pretends to be gcc 4.2.1, so leave it as the empty string here if the compiler is not certain to be GCC
Expand Down

0 comments on commit e536c77

Please sign in to comment.