Skip to content

Commit

Permalink
GNU Make: Link flags
Browse files Browse the repository at this point in the history
The link information returned by mpich may include some compiler flags like
`-fallow-argument-mismatch -g`. On Mac, this causes an issue for the clang
based linker because `-fallow-argument-mismatch` is a gfortran flag. So we
need to filter them out.
  • Loading branch information
WeiqunZhang committed Feb 1, 2024
1 parent 296ed40 commit b443a57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/GNUMake/sites/Make.unknown
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ ifeq ($(USE_MPI),TRUE)
mpi_link_flags := $(filter-out $(mpi_filter), $(mpi_link_flags))
endif

# Some wrappers include `-fallow-argument-mismatch`, `-g` etc in the link line info.
mpi_link_flags := $(filter-out -f%,$(mpi_link_flags))
mpi_link_flags := $(filter-out -g%,$(mpi_link_flags))

LIBRARIES += $(mpi_link_flags)
ifneq ($(MPI_OTHER_COMP),mpicxx)
LIBRARIES += $(mpicxx_link_libs)
Expand Down

0 comments on commit b443a57

Please sign in to comment.