only pass no-symbolic if it exists in ld.gold

This commit is contained in:
Sylvestre Ledru 2023-06-26 10:13:30 +02:00
parent 9beedde6d6
commit 4baff3044a
2 changed files with 14 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
llvm-toolchain-15 (1:15.0.7-6) UNRELEASED; urgency=medium
* Only pass -Bno-symbolic if it exists
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 26 Jun 2023 10:13:40 +0200
llvm-toolchain-15 (1:15.0.7-5) unstable; urgency=medium llvm-toolchain-15 (1:15.0.7-5) unstable; urgency=medium
[ Graham Inggs ] [ Graham Inggs ]

11
debian/rules vendored
View File

@ -177,9 +177,6 @@ ifneq (,$(filter $(DEB_HOST_ARCH),i386))
STAGE_ALL_CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=i386-linux-gnu STAGE_ALL_CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=i386-linux-gnu
endif endif
# https://bugs.launchpad.net/bugs/2016471
STAGE_2_CMAKE_EXTRA += -DLIBOMP_LDFLAGS=-Wl,-Bno-symbolic
ifneq (,$(filter $(DEB_HOST_ARCH),i386)) ifneq (,$(filter $(DEB_HOST_ARCH),i386))
# Sometimes, i386 needs help with the triple # Sometimes, i386 needs help with the triple
CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=i386-linux-gnu CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=i386-linux-gnu
@ -422,6 +419,14 @@ else
endif endif
endif endif
# https://bugs.launchpad.net/bugs/2016471
ifeq (,$(filter-out $(LTO_DISABLE_ARCHS), $(DEB_HOST_ARCH)))
LD_GOLD_SUPPORTS_NO_SYMBOLIC := $(shell ld.gold --help | grep -q -w '-Bno-symbolic' && echo "yes" || echo "no")
ifeq ($(LD_GOLD_SUPPORTS_NO_SYMBOLIC),yes)
STAGE_2_CMAKE_EXTRA += -DLIBOMP_LDFLAGS=-Wl,-Bno-symbolic
endif
endif
DH_OPTIONS= DH_OPTIONS=
OCAML_ENABLE= no OCAML_ENABLE= no
OCAML_ARCHS := amd64 arm64 armhf ppc64el riscv64 s390x OCAML_ARCHS := amd64 arm64 armhf ppc64el riscv64 s390x