fix library paths in customized libbfd.so and libopcodes.so [release 2.33.1-4mamba;Fri Dec 06 2019]

This commit is contained in:
Silvan Calarco 2024-01-05 20:48:09 +01:00
parent 9855f5b976
commit 371321df37

View File

@ -6,7 +6,7 @@
Name: binutils
Version: 2.33.1
Release: 3mamba
Release: 4mamba
Summary: GNU Binary Utility Development Utilities
Group: Development/Tools
Vendor: openmamba
@ -124,8 +124,6 @@ case %{target_cpu} in
TARGETS="\
--enable-64bit-bfd \
--enable-targets=powerpc64-linux,i386-linux,x86_64-linux,arm-linux,armelf-linux-eabi"
# gold is not well supported for ppc, gcc build fails. Use bfd as default
CONFIGURE_ADD="--enable-gold --enable-ld=default"
%if "%{_target_platform}" != "%{_host}"
CONFIGURE_ADD="$CONFIGURE_ADD --disable-shared"
%endif
@ -142,7 +140,7 @@ case %{target_cpu} in
x86_64)
TARGETS="\
--enable-64bit-bfd \
--enable-targets=i386-linux,powerpc-linux,powerpc64-linux,arm-linux,armelf-linux-eabi"
--enable-targets=i386-linux,powerpc-linux,powerpc64-linux,arm-linux,armelf-linux-eabi,x86_64-pep"
;;
*)
TARGETS="\
@ -166,7 +164,6 @@ cd binutils-build
--disable-werror \
$CONFIGURE_ADD
%make all tooldir=%{_prefix}
%make info tooldir=%{_prefix}
# tooldir=%{_prefix}/%{_target_platform}
@ -241,9 +238,9 @@ rm -rf %{buildroot}%{_datadir}/info
rm -rf %{buildroot}%{_libdir}/libiberty.a
# No shared linking to these files outside binutils
rm -f %{buildroot}%{_prefix}/%{_target_platform}/lib{bfd,opcodes}.so
echo 'INPUT( /usr/lib/libbfd.a -liberty -lz -ldl )' > %{buildroot}%{_prefix}/%{_target_platform}/lib/libbfd.so
echo 'INPUT( /usr/lib/libopcodes.a -lbfd )' > %{buildroot}%{_prefix}/%{_target_platform}/lib/libopcodes.so
rm -f %{buildroot}%{_prefix}/%{_target_platform}/lib/lib{bfd,opcodes}.so
echo 'INPUT( %{_prefix}/%{_target_platform}/lib/libbfd.a -liberty -lz -ldl )' > %{buildroot}%{_prefix}/%{_target_platform}/lib/libbfd.so
echo 'INPUT( %{_prefix}/%{_target_platform}/lib/libopcodes.a -lbfd )' > %{buildroot}%{_prefix}/%{_target_platform}/lib/libopcodes.so
%else
# NATIVE target
@ -257,8 +254,8 @@ done
# No shared linking to these files outside binutils
rm -f %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
echo 'INPUT( /usr/lib/libbfd.a -liberty -lz -ldl )' > %{buildroot}%{_libdir}/libbfd.so
echo 'INPUT( /usr/lib/libopcodes.a -lbfd )' > %{buildroot}%{_libdir}/libopcodes.so
echo 'INPUT( %{_libdir}/libbfd.a -liberty -lz -ldl )' > %{buildroot}%{_libdir}/libbfd.so
echo 'INPUT( %{_libdir}/libopcodes.a -lbfd )' > %{buildroot}%{_libdir}/libopcodes.so
%endif
# use alternatives for %_bindir/ld
@ -421,6 +418,9 @@ exit 0
%endif
%changelog
* Fri Dec 06 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.33.1-4mamba
- fix library paths in customized libbfd.so and libopcodes.so
* Mon Nov 25 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.33.1-3mamba
- modify libbdf.so and libopcodes.so to prevent shared linking external of binutils
- added --with-pic build option