History

kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1

ld.lld 10.0.1 spews a bunch of various warnings about .rela sections, along with a few others. Newer versions of ld.lld do not have these warnings. As a result, do not add '--orphan-handling=warn' to LDFLAGS_vmlinux if ld.lld's version is not new enough.

Nathan Chancellor committed 5 years ago

Commit d5750cd1 parent 59612b23 files · +26 −0Browse files

Showing the changes to scripts (1 of 3 files). Show all

Unified · Split

scripts/lld-version.sh+20−0
@@ -0,0 +1,20 @@
1+#!/bin/sh
2+# SPDX-License-Identifier: GPL-2.0
3+#
4+# Usage: $ ./scripts/lld-version.sh ld.lld
5+#
6+# Print the linker version of `ld.lld' in a 5 or 6-digit form
7+# such as `100001' for ld.lld 10.0.1 etc.
8+
9+linker_string="$($* --version)"
10+
11+if ! ( echo $linker_string | grep -q LLD ); then
12+ echo 0
13+ exit 1
14+fi
15+
16+VERSION=$(echo $linker_string | cut -d ' ' -f 2)
17+MAJOR=$(echo $VERSION | cut -d . -f 1)
18+MINOR=$(echo $VERSION | cut -d . -f 2)
19+PATCHLEVEL=$(echo $VERSION | cut -d . -f 3)
20+printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t