Summary: | sys-libs/efivar-38 - clang-15: error: linker command failed with exit code 1 (use -v to see invocation) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Mike Gilbert <floppym> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: |
emerge-info.txt
clang.tar.bz2 emerge-history.txt environment etc.portage.tar.bz2 sys-libs:efivar-38:20221004-115759.log temp.tar.bz2 |
Description
Toralf Förster
2022-10-04 16:50:17 UTC
Created attachment 820180 [details]
emerge-info.txt
Created attachment 820183 [details]
clang.tar.bz2
Created attachment 820186 [details]
emerge-history.txt
Created attachment 820189 [details]
environment
Created attachment 820192 [details]
etc.portage.tar.bz2
Created attachment 820195 [details]
sys-libs:efivar-38:20221004-115759.log
Created attachment 820198 [details]
temp.tar.bz2
I've backported some patches (8695d256e98c1a79a64c69c60c5f07546c580b05, 1f247260c9b4bd6fcda30f3e4cc358852aeb9e4d) which fix build on clang. diff --git a/src/include/defaults.mk b/src/include/defaults.mk index ab8e9a8c..2c98e07d 100644 --- a/src/include/defaults.mk +++ b/src/include/defaults.mk @@ -51,7 +51,6 @@ LDFLAGS ?= override _CCLDFLAGS := $(CCLDFLAGS) override _LDFLAGS := $(LDFLAGS) override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \ - -Wl,--add-needed \ -Wl,--build-id \ -Wl,--no-allow-shlib-undefined \ -Wl,--no-undefined-version \ @@ -94,7 +93,6 @@ override _HOST_LDFLAGS := $(HOST_LDFLAGS) override _HOST_CCLDFLAGS := $(HOST_CCLDFLAGS) override HOST_LDFLAGS = $(HOST_CFLAGS) -L. \ $(_HOST_LDFLAGS) $(_HOST_CCLDFLAGS) \ - -Wl,--add-needed \ -Wl,--build-id \ -Wl,--no-allow-shlib-undefined \ -Wl,-z,now \ --- a/src/include/gcc.specs 2022-10-27 12:15:09.106855980 +0100 +++ b/src/include/gcc.specs 2022-10-27 12:15:34.624091373 +0100 @@ -5,4 +5,4 @@ + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} -grecord-gcc-switches *link: -+ --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie} ++ --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie} --- a/src/include/workarounds.mk 2022-10-27 12:20:18.955858758 +0100 +++ a/src/include/workarounds.mk 2022-10-27 12:21:52.426101701 +0100 @@ -2,20 +2,20 @@ # # workarounds.mk - workarounds for weird stuff behavior -LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g') -LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //') +LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/ .*//g') +LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^((.* )?LLD|GNU ld)'|sed 's/.* LLD/LLD/;s/.* //') # 2.35 is definitely broken and 2.36 seems to work LD_DASH_T := $(shell \ if [ "x${LD_FLAVOR}" = xLLD ] ; then \ echo '-T' ; \ elif [ "x${LD_FLAVOR}" = xGNU ] ; then \ if echo "${LD_VERSION}" | grep -q -E '^2\.3[6789]|^2\.[456789]|^[3456789]|^[[:digit:]][[:digit:]]' ; then \ - echo '-T' ; \ + echo "" ; \ else \ echo "" ; \ fi ; \ else \ - echo "Your linker is not supported" ; \ + echo "Your linker ${LD_FLAVOR} version ${LD_VERSION} is not supported" ; \ exit 1 ; \ fi) efivar-39 has been added. |