#7 Add symlink to liblto_plugin.so in /usr/lib/bfd-plugins
Opened 2 years ago by tstellar. Modified 2 years ago
rpms/ tstellar/gcc binutils-plugin  into  rawhide

file modified
+9 -1
@@ -4,7 +4,7 @@ 

  %global gcc_major 10

  # Note, gcc_release must be integer, if you want to add suffixes to

  # %%{release}, append them after %%{gcc_release} on Release: line.

- %global gcc_release 1

+ %global gcc_release 2

  %global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e

  %global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0

  %global _unpackaged_files_terminate_build 0
@@ -1907,6 +1907,10 @@ 

  # Help plugins find out nvra.

  echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver

  

+ # Add symlink to lto plugin in the binutils plugin directory.

+ %{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/

+ ln -s %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so %{buildroot}%{_libdir}/bfd-plugins/

+ 

  %check

  cd obj-%{gcc_target_platform}

  
@@ -2032,6 +2036,7 @@ 

  %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto1

  %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto-wrapper

  %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so*

+ %{_libdir}/bfd-plugins/liblto_plugin.so

  %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/rpmver

  %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stddef.h

  %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdarg.h
@@ -3004,6 +3009,9 @@ 

  %endif

  

  %changelog

+ * Mon May 11 2020 Tom Stellard <tstellar@redhat.com> - 10.1.1-2

+ - Add symlink to liblto_plugin.so in /usr/lib/bfd-plugins

+ 

  * Thu May  7 2020 Jakub Jelinek <jakub@redhat.com> 10.1.1-1

  - update from releases/gcc-10 branch

    - GCC 10.1.0 release

@@ -0,0 +1,5 @@ 

+ set -exo pipefail

+ 

+ echo "void lto_function(){}" | gcc -flto -O2 -c -x c -o foo.o -

+ ar crs foo.a foo.o

+ readelf -c foo.a | grep lto_function

file added
+10
@@ -0,0 +1,10 @@ 

+ - hosts: localhost

+   roles:

+   - role: standard-test-basic

+     tags:

+       - classic

+     required_packages:

+       - gcc

+       - binutils

+     tests:

+       - binutils-plugin-ar