Bug 1185712 - cross-arm-binutils missing symlinks
cross-arm-binutils missing symlinks
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Michael Matz
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-06 10:55 UTC by Alin M Elena
Modified: 2022-03-03 13:30 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alin M Elena 2021-05-06 10:55:17 UTC
cross-arm-binutils
seems to provide arm-none-eabi-* utils vis symlinks to arm-suse- equivalents.
see below.

in the process of building qmk for arm I noticed arm-none-eabi-size is missing.


lrwxrwxrwx 1 root root   28 Mar 26 11:26 /usr/bin/arm-none-eabi-strip -> arm-suse-linux-gnueabi-strip
lrwxrwxrwx 1 root root   30 Mar 26 11:26 /usr/bin/arm-none-eabi-readelf -> arm-suse-linux-gnueabi-readelf
lrwxrwxrwx 1 root root   29 Mar 26 11:26 /usr/bin/arm-none-eabi-ranlib -> arm-suse-linux-gnueabi-ranlib
lrwxrwxrwx 1 root root   30 Mar 26 11:26 /usr/bin/arm-none-eabi-objdump -> arm-suse-linux-gnueabi-objdump
lrwxrwxrwx 1 root root   30 Mar 26 11:26 /usr/bin/arm-none-eabi-objcopy -> arm-suse-linux-gnueabi-objcopy
lrwxrwxrwx 1 root root   25 Mar 26 11:26 /usr/bin/arm-none-eabi-nm -> arm-suse-linux-gnueabi-nm
lrwxrwxrwx 1 root root   29 Mar 26 11:26 /usr/bin/arm-none-eabi-ld.bfd -> arm-suse-linux-gnueabi-ld.bfd
lrwxrwxrwx 1 root root   25 Mar 26 11:26 /usr/bin/arm-none-eabi-ld -> arm-suse-linux-gnueabi-ld
lrwxrwxrwx 1 root root   25 Mar 26 11:26 /usr/bin/arm-none-eabi-as -> arm-suse-linux-gnueabi-as
lrwxrwxrwx 1 root root   25 Mar 26 11:26 /usr/bin/arm-none-eabi-ar -> arm-suse-linux-gnueabi-ar
Comment 1 Richard Biener 2021-05-11 08:39:50 UTC
OK, so the reason is that 'size' is only present as /usr/bin/$T-size but
_not_ as /usr/$T/bin/size and thus the

%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
  for p in arm-none-eabi; do
    ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
  done
done
%endif

loop doesn't pick it up.  Some clever shell foo could instead walk
%buildroot/usr/bin/$T-* or the list of binaries could be spelled out
and links created based on target existence ...

Of course the question is why /usr/$T/bin/size does not exist (which would
be a question to ask upstream binutils).
Comment 2 Alin M Elena 2021-08-18 09:53:58 UTC
any chance to fix this?
Comment 3 Stefan Brüns 2021-10-17 15:54:52 UTC
Several of the binaries are also fairly redundant, as (at least) the following tools from the host binutils are multiarch:

- addr2line
- ar
- ld
- nm
- objcopy
- objdump
- ranlib
- size
- strings
- strip

As all these tools statically link against libbfd there there is quite some disk space wasted, especially when you have several cross-* toolchains installed.
Comment 4 Stefan Brüns 2021-10-17 16:01:28 UTC
The set of symlinks is also fairly irregular when you look at the host tools:

$> rpm -ql binutils | grep bin\/

There are 18 tools in /usr/bin, but only 6 symlinks in /usr/x86_64-suse-linux/

cross-<TARGET>-binutils has 15 executables in /usr/bin/<TARGET>-*, i.e. all of the ones from the host binutils but:
- c++filt
- dwp
- embedspu
Comment 5 Stefan Brüns 2021-12-19 21:13:29 UTC
https://build.opensuse.org/request/show/941542
Comment 6 OBSbugzilla Bot 2022-03-03 13:30:04 UTC
This is an autogenerated message for OBS integration:
This bug (1185712) was mentioned in
https://build.opensuse.org/request/show/958756 Factory / binutils