Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] /usr/bin/ar from binutils does not pick up lto plugin
@ 2020-02-02  1:43 voidlinux-github
  2020-02-13 19:35 ` binutils: ar does not load lto plugin automatically voidlinux-github
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: voidlinux-github @ 2020-02-02  1:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

New issue by pmer on void-packages repository

https://github.com/void-linux/void-packages/issues/18725

Description:
### System
* xuname:  Void 5.4.17_1 x86_64-musl GenuineIntel/VM uptodate rFFF
* package:  binutils-2.33.1_1 gcc-9.2.0-3

### Expected behavior

No errors.

### Actual behavior

```
ar: a.o: plugin needed to handle lto object
/bin/ld: /usr/lib/gcc/x86_64-linux-musl/../../../../lib/Scrt1.o: in function `_start_c':
/builddir/musl-1.1.24/crt/crt1.c:18: undefined reference to `main'
collect2: error: ld returned 1 exit status
```

### Steps to reproduce the behavior

```
cat > a.c <<EOF
int main() {
    return 0;
}
cc a.c -c -o a.o -flto
ar qc a.a a.o
```

Note: if the last line above is replaced with:

```
ar --plugin=/usr/lib/gcc/x86_64-linux-musl/9.2/liblto_plugin.so qc a.a a.o
```

or

```
gcc-ar qc a.a a.o  # This is a wrapper around ar provided by GCC that simply adds the --plugin line above for you.
```

then everything works fine.

This issue is about how `ar` should pick up and find the lto plugin automatically—it should succeed without the user needing to invoke gcc-ar.

For reference, Ubuntu has fixed this issue a few years ago.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-15 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-02  1:43 [ISSUE] /usr/bin/ar from binutils does not pick up lto plugin voidlinux-github
2020-02-13 19:35 ` binutils: ar does not load lto plugin automatically voidlinux-github
2020-03-15 19:17 ` q66
2020-03-15 21:04 ` [ISSUE] [CLOSED] " q66

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).