Skip to content

Commit

Permalink
Merge branch 'master' into pbrubeck/test/macro-extrapolate
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Sep 11, 2024
2 parents 5778b6c + f6915b8 commit b4cd6d4
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions scripts/firedrake-install
Original file line number Diff line number Diff line change
Expand Up @@ -779,15 +779,21 @@ def get_petsc_options(minimal=False):
if osname == "Darwin":
petsc_options.add("--CFLAGS=-Wno-implicit-function-declaration")
if Version(clt["version"]) >= Version("15"):
# CLT >= 15 requires legacy linking behaviour
petsc_options.add("--LDFLAGS=-Wl,-ld_classic")
# CLT >= 15 requires legacy linking behaviour (-ld_classic flag)
# The -dead_strip_dylibs flag is a workaround for MUMPS issues
# on macOS with parallel solvers. Its necessity is unclear, so a
# review in the future may be required.
petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-dead_strip_dylibs")
elif options.get("with_blas") is not None:
petsc_options.add("--with-blaslapack-dir={}".format(options["with_blas"]))
if osname == "Darwin":
petsc_options.add("--CFLAGS=-I{}/include -Wno-implicit-function-declaration".format(options["with_blas"]))
if Version(clt["version"]) >= Version("15"):
# CLT >= 15 requires legacy linking behaviour
petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-rpath,{0}/lib -L{0}/lib".format(options["with_blas"]))
# CLT >= 15 requires legacy linking behaviour (-ld_classic flag)
# The -dead_strip_dylibs flag is a workaround for MUMPS issues
# on macOS with parallel solvers. Its necessity is unclear, so a
# review in the future may be required.
petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-dead_strip_dylibs,-rpath,{0}/lib -L{0}/lib".format(options["with_blas"]))
else:
petsc_options.add("--CFLAGS=-I{}/include".format(options["with_blas"]))
petsc_options.add("--LDFLAGS=-Wl,-rpath,{0}/lib -L{0}/lib".format(options["with_blas"]))
Expand All @@ -796,8 +802,11 @@ def get_petsc_options(minimal=False):
petsc_options.add("--with-blaslapack-dir={}".format(brew_blas_prefix))
petsc_options.add("--CFLAGS=-I{}/include -Wno-implicit-function-declaration".format(brew_blas_prefix))
if Version(clt["version"]) >= Version("15"):
# CLT >= 15 requires legacy linking behaviour
petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-rpath,{0}/lib -L{0}/lib -L{1}".format(brew_blas_prefix, brew_gcc_libdir()))
# CLT >= 15 requires legacy linking behaviour (-ld_classic flag)
# The -dead_strip_dylibs flag is a workaround for MUMPS issues
# on macOS with parallel solvers. Its necessity is unclear, so a
# review in the future may be required.
petsc_options.add("--LDFLAGS=-Wl,-ld_classic,-dead_strip_dylibs,-rpath,{0}/lib -L{0}/lib -L{1}".format(brew_blas_prefix, brew_gcc_libdir()))
else:
petsc_options.add("--LDFLAGS=-Wl,-rpath,{0}/lib -L{0}/lib -L{1}".format(brew_blas_prefix, brew_gcc_libdir()))

Expand Down

0 comments on commit b4cd6d4

Please sign in to comment.