Remove -ld_classic from all packages (#46608)
This commit is contained in:
parent
7ad08213dc
commit
b07d1e0194
@ -48,14 +48,6 @@ class Armadillo(CMakePackage):
|
|||||||
# platform's compiler is adding `#define linux 1`.
|
# platform's compiler is adding `#define linux 1`.
|
||||||
patch("undef_linux.patch", when="platform=linux")
|
patch("undef_linux.patch", when="platform=linux")
|
||||||
|
|
||||||
def flag_handler(self, name, flags):
|
|
||||||
spec = self.spec
|
|
||||||
if name == "ldflags":
|
|
||||||
if spec.satisfies("%apple-clang@15:"):
|
|
||||||
flags.append("-Wl,-ld_classic")
|
|
||||||
|
|
||||||
return (flags, None, None)
|
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
# Do not include Find{BLAS_type} because we are specifying the
|
# Do not include Find{BLAS_type} because we are specifying the
|
||||||
# BLAS/LAPACK libraries explicitly.
|
# BLAS/LAPACK libraries explicitly.
|
||||||
|
@ -181,7 +181,6 @@ def headers(self):
|
|||||||
|
|
||||||
@when("@:6.0 %apple-clang@15:")
|
@when("@:6.0 %apple-clang@15:")
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
env.append_flags("LDFLAGS", "-Wl,-ld_classic")
|
|
||||||
if self.spec.satisfies("@:3"):
|
if self.spec.satisfies("@:3"):
|
||||||
env.append_flags("CFLAGS", "-Wno-error=incompatible-function-pointer-types")
|
env.append_flags("CFLAGS", "-Wno-error=incompatible-function-pointer-types")
|
||||||
|
|
||||||
|
@ -315,13 +315,9 @@ def flag_handler(self, name, flags):
|
|||||||
cmake_flags.append(self.compiler.cc_pic_flag)
|
cmake_flags.append(self.compiler.cc_pic_flag)
|
||||||
if spec.satisfies("@1.8.21 %oneapi@2023.0.0"):
|
if spec.satisfies("@1.8.21 %oneapi@2023.0.0"):
|
||||||
cmake_flags.append("-Wno-error=int-conversion")
|
cmake_flags.append("-Wno-error=int-conversion")
|
||||||
if spec.satisfies("%apple-clang@15:"):
|
|
||||||
cmake_flags.append("-Wl,-ld_classic")
|
|
||||||
elif name == "cxxflags":
|
elif name == "cxxflags":
|
||||||
if spec.satisfies("@:1.8.12+cxx~shared"):
|
if spec.satisfies("@:1.8.12+cxx~shared"):
|
||||||
cmake_flags.append(self.compiler.cxx_pic_flag)
|
cmake_flags.append(self.compiler.cxx_pic_flag)
|
||||||
if spec.satisfies("%apple-clang@15:"):
|
|
||||||
cmake_flags.append("-Wl,-ld_classic")
|
|
||||||
elif name == "fflags":
|
elif name == "fflags":
|
||||||
if spec.satisfies("%cce+fortran"):
|
if spec.satisfies("%cce+fortran"):
|
||||||
# Cray compiler generates module files with uppercase names by
|
# Cray compiler generates module files with uppercase names by
|
||||||
|
@ -1003,7 +1003,7 @@ def configure_args(self):
|
|||||||
|
|
||||||
# Work around incompatibility with new apple-clang linker
|
# Work around incompatibility with new apple-clang linker
|
||||||
# https://github.com/open-mpi/ompi/issues/12427
|
# https://github.com/open-mpi/ompi/issues/12427
|
||||||
if spec.satisfies("@5: %apple-clang@15:"):
|
if spec.satisfies("@:4.1.6,5.0.0:5.0.3 %apple-clang@15:"):
|
||||||
config_args.append("--with-wrapper-fcflags=-Wl,-ld_classic")
|
config_args.append("--with-wrapper-fcflags=-Wl,-ld_classic")
|
||||||
|
|
||||||
# All rpath flags should be appended with self.compiler.cc_rpath_arg.
|
# All rpath flags should be appended with self.compiler.cc_rpath_arg.
|
||||||
|
@ -413,10 +413,7 @@ def set_blas_lapack(self):
|
|||||||
|
|
||||||
@when("@1.26:")
|
@when("@1.26:")
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
if self.spec.satisfies("%apple-clang@15:"):
|
if self.spec.satisfies("%msvc"):
|
||||||
# https://github.com/scipy/scipy/issues/19357
|
|
||||||
env.append_flags("LDFLAGS", "-Wl,-ld_classic")
|
|
||||||
elif self.spec.satisfies("%msvc"):
|
|
||||||
# For meson build system, compiler paths must be in quotes
|
# For meson build system, compiler paths must be in quotes
|
||||||
# to prevent paths from being split by spaces.
|
# to prevent paths from being split by spaces.
|
||||||
env.set("CC", f'"{self.compiler.cc}"')
|
env.set("CC", f'"{self.compiler.cc}"')
|
||||||
|
@ -218,10 +218,6 @@ def setup_build_environment(self, env):
|
|||||||
if self.spec.satisfies("@:1.8"):
|
if self.spec.satisfies("@:1.8"):
|
||||||
self.spec["py-numpy"].package.setup_build_environment(env)
|
self.spec["py-numpy"].package.setup_build_environment(env)
|
||||||
|
|
||||||
# https://github.com/scipy/scipy/issues/19357
|
|
||||||
if self.spec.satisfies("%apple-clang@15:"):
|
|
||||||
env.append_flags("LDFLAGS", "-Wl,-ld_classic")
|
|
||||||
|
|
||||||
@when("@1.9:")
|
@when("@1.9:")
|
||||||
def config_settings(self, spec, prefix):
|
def config_settings(self, spec, prefix):
|
||||||
blas, lapack = self.spec["py-numpy"].package.blas_lapack_pkg_config()
|
blas, lapack = self.spec["py-numpy"].package.blas_lapack_pkg_config()
|
||||||
|
@ -679,10 +679,6 @@ def enable_or_disable(variant, keyword="USE", var=None):
|
|||||||
else:
|
else:
|
||||||
env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
|
env.set("BUILD_CUSTOM_PROTOBUF", "OFF")
|
||||||
|
|
||||||
# https://github.com/pytorch/pytorch/issues/111086
|
|
||||||
if self.spec.satisfies("%apple-clang@15:"):
|
|
||||||
env.append_flags("LDFLAGS", "-Wl,-ld_classic")
|
|
||||||
|
|
||||||
def setup_run_environment(self, env):
|
def setup_run_environment(self, env):
|
||||||
self.torch_cuda_arch_list(env)
|
self.torch_cuda_arch_list(env)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user