Skip to content
Merged
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
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.7.2
-------------
* Recognise GNU ld on Fedora

Version 0.7.1
-------------
* Don't copy symbol tables when combining BSD-variant ar archives (#97)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1
0.7.2
22 changes: 22 additions & 0 deletions tools/please_cc/cctool/test_data/fedora/43/gcc-15-gnuld.test_data

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions tools/please_cc/cctool/test_data/fedora/43/gcc-15-gold.test_data

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tools/please_cc/cctool/test_data/fedora/43/gnuld.test_data

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tools/please_cc/cctool/test_data/fedora/43/gold.test_data

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions tools/please_cc/cctool/test_data/fedora/43/toolspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# These packages should all be installed from the official Fedora 43 repositories:
# gcc binutils binutils-gold
{
"compilers": {
"/usr/bin/gcc": {"id": "gcc-15", "name": "GCC 15.3.1"}
},
"linkers": {
"/usr/bin/ld.bfd": {"id": "gnuld", "name": "GNU ld 2.45.1"},
"/usr/bin/ld.gold": {"id": "gold", "name": "GNU gold 1.16"}
}
}
8 changes: 7 additions & 1 deletion tools/please_cc/cctool/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ var matchers = map[stream]matcher{
// tools (e.g. the GNU ld build in FreeBSD's devel/binutils package identifies itself simply as "GNU ld (GNU
// Binutils)", while the ld build in Ubuntu's binutils package identifies itself as "GNU ld (GNU Binutils for
// Ubuntu)"). This regular expression is vendor-agnostic.
{ Linker, GNUld, regexp.MustCompile(`^GNU ld \(.*\) (?P<version>[\d.]+)$`) },
//
// Red Hat-derived distributions patch GNU ld to identify itself with the version number of the binutils package in
// which it was distributed, in place of the parenthesised vendor string (e.g. the ld build in Fedora's binutils
// package identifies itself as "GNU ld version 2.45.1-5.fc43"). The package release suffix is not part of the
// upstream version number and is therefore excluded from the "version" group, which is also why this regular
// expression - uniquely among those here - is not anchored at the end of the line.
{ Linker, GNUld, regexp.MustCompile(`^GNU ld (?:\(.*\) |version )(?P<version>\d+(?:\.\d+)*)`) },
// LLVM contains a configure-time option that enables vendors to prepend optional, arbitrary strings to the names of
// its tools (e.g. the LLD builds in FreeBSD's devel/llvm* packages identify themselves simply as "LLD", while the LLD
// builds in Ubuntu's lld-* packages identify themselves as "Ubuntu LLD"). This regular expression is vendor-agnostic.
Expand Down
Loading