Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro Based on work from Tom Stellard <tstellar@redhat.com> and Timm Bäder <tbaeder@redhat.com>. This commit showed that "-fPIC" added to CFLAGS unconditionally actually invalidated the "non-PIC" test. As the flag got removed, the test had to be disabled on ARM. Please refer to the following ticket regarding non-PIC support on ARM: https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/503448 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
8ea60b3528
commit
b8c17a83ad
16
libtool-2.4.6-disable_non-pic_arm.patch
Normal file
16
libtool-2.4.6-disable_non-pic_arm.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -r -U5 libtool-2.4.6.old/tests/demo.at libtool-2.4.6/tests/demo.at
|
||||
--- libtool-2.4.6.old/tests/demo.at 2022-01-31 22:15:48.539557030 +0100
|
||||
+++ libtool-2.4.6/tests/demo.at 2022-02-01 09:43:30.262092074 +0100
|
||||
@@ -508,11 +508,11 @@
|
||||
## ----------- ##
|
||||
|
||||
AT_SETUP([force non-PIC objects])
|
||||
|
||||
AT_CHECK([case $host in
|
||||
-hppa*|x86_64*|s390*)
|
||||
+hppa*|x86_64*|s390*|arm*)
|
||||
# These hosts cannot use non-PIC shared libs
|
||||
exit 77 ;;
|
||||
*-solaris*|*-sunos*)
|
||||
# Libtool does not build non-PIC shared libs on these hosts
|
||||
exit 77 ;;
|
21
libtool.spec
21
libtool.spec
@ -44,6 +44,12 @@ Patch6: libtool-2.4.6-sanitize.patch
|
||||
# rhbz#2024647, upstream f9970d99293faf908fdc153a653fa5781095fb7a
|
||||
Patch7: libtool-2.4.6-use-ld.patch
|
||||
|
||||
# non-PIC libraries are not supported on ARMv7
|
||||
# Since we removed "-fPIC" from global CFLAGS this test fails on this arch (as expected)
|
||||
# Please refer to the following ticket regarding PIC support on ARM:
|
||||
# https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/503448
|
||||
Patch8: libtool-2.4.6-disable_non-pic_arm.patch
|
||||
|
||||
%if ! 0%{?_module_build}
|
||||
Patch100: libtool-nodocs.patch
|
||||
%endif
|
||||
@ -121,6 +127,7 @@ Static libraries and header files for development with ltdl.
|
||||
%patch5 -p1 -b .disable-lto-link-order2
|
||||
%patch6 -p1 -b .sanitize
|
||||
%patch7 -p1 -b .use-ld
|
||||
%patch8 -p1 -b .disable_non-pic_arm
|
||||
%if ! 0%{?_module_build}
|
||||
%patch100 -p1 -b .nodocs
|
||||
%endif
|
||||
@ -130,11 +137,6 @@ autoreconf -v
|
||||
%build
|
||||
%global _lto_cflags %{nil}
|
||||
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
export F77=gfortran
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
||||
|
||||
%configure --prefix=%{_prefix} \
|
||||
--exec-prefix=%{_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
@ -148,7 +150,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir}
|
||||
|
||||
make %{?_smp_mflags} \
|
||||
%make_build \
|
||||
CUSTOM_LTDL_CFLAGS="%_hardening_cflags" \
|
||||
CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags"
|
||||
|
||||
@ -160,7 +162,7 @@ make check VERBOSE=yes || { cat testsuite.log ; false ; }
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
%make_install
|
||||
# info's TOP dir (by default owned by info)
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
# *.la *.a files generated by libtool shouldn't be distributed (and the
|
||||
@ -198,9 +200,12 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jan 27 2022 Frederic Berat <fberat@redhat.com> - 2.4.6-48
|
||||
* Tue Feb 01 2022 Frederic Berat <fberat@redhat.com> - 2.4.6-48
|
||||
- Add support for "-fsanitize", rhbz#2024647
|
||||
- Add support for "-fuse-ld", rhbz#2024647
|
||||
- Use make macros (based on Tom Stellard work for f33 and Timm Bäder)
|
||||
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
- Disable non-PIC test for ARM as this is not supported on this arch
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-47
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user