Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clang++: error: linker command failed with exit code 1 #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
llvm-toolchain-17 (1:17.0.6-5deepin6) unstable; urgency=medium

* fix clang++: error: linker command failed with exit code 1 .

-- lichenggang <[email protected]> Thu, 05 Dec 2024 21:00:13 +0800

llvm-toolchain-17 (1:17.0.6-5deepin5) unstable; urgency=medium

* Backport support for the -mcmodel option in LoongArch
Expand Down
11 changes: 11 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ ifneq (,$(filter $(DEB_HOST_ARCH),mips64el))
LIBCXX_USE_COMPILER_RT := OFF
endif

ifneq (,$(filter $(DEB_HOST_ARCH),mips64el))
STAGE_1_CFLAGS += -mxgot
STAGE_1_CXXFLAGS += -mxgot
STAGE_2_CFLAGS += -mxgot
STAGE_2_CXXFLAGS += -mxgot
endif

ifneq (,$(filter $(DEB_HOST_ARCH),x32))
STAGE_ALL_CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=x86_64-linux-gnux32
STAGE_ALL_CMAKE_EXTRA += -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnux32
Expand Down Expand Up @@ -884,6 +891,10 @@ endif
STAGE_2_WASM_CFLAGS := $(filter-out -march=% -mfpu=% -fcf-protection% -mbranch-protection%, $(STAGE_2_CFLAGS))
STAGE_2_WASM_CXXFLAGS := $(filter-out -march=% -mfpu=% -fcf-protection% -mbranch-protection%, $(STAGE_2_CXXFLAGS))

# Remove -mxgot which is not supported by the wasm targets.
STAGE_2_WASM_CFLAGS := $(filter-out -mxgot, $(STAGE_2_CFLAGS))
STAGE_2_WASM_CXXFLAGS := $(filter-out -mxgot, $(STAGE_2_CXXFLAGS))

build-wasm/compiler-rt-%: cpu = $(@:build-wasm/compiler-rt-%=%)
build-wasm/compiler-rt-%:
@echo "Building compiler-rt for $(cpu)"
Expand Down
Loading