From b9eeddac1168e0e4b7d38fadd0feac17bc7e9162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 19 Nov 2018 14:31:30 +0100 Subject: [PATCH] Fix link order After updating binutils 2.31.1-10.fc29 to 2.31.1-11 the link order become important because the new linker optimizes more agressively: $ g++ -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L. -lminiz miniz_tester.o timer.o -o miniz_tester /usr/bin/ld: miniz_tester.o: in function `dummy_zip_file_write_callback(void*, unsigned long long, void const*, unsigned long)': /builddir/build/BUILD/miniz-1.15_r4/miniz_tester.cpp:1316: undefined reference to `mz_crc32' --- miniz.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/miniz.spec b/miniz.spec index e7912e1..af7196d 100644 --- a/miniz.spec +++ b/miniz.spec @@ -2,7 +2,7 @@ Name: miniz Version: 1.15 -Release: 10.%{miniz_revision}%{?dist} +Release: 11.%{miniz_revision}%{?dist} Summary: Compression library implementing the zlib and Deflate License: Unlicense URL: https://code.google.com/p/%{name}/ @@ -59,7 +59,7 @@ g++ %{optflags} -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 \ -I. miniz_tester.cpp -c -o miniz_tester.o g++ %{optflags} -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 \ -I. timer.cpp -c -o timer.o -g++ %{?__global_ldflags} -L. -l%{name} miniz_tester.o timer.o -o miniz_tester +g++ %{?__global_ldflags} miniz_tester.o timer.o -L. -l%{name} -o miniz_tester %check LD_LIBRARY_PATH=$PWD ./miniz_tester @@ -82,6 +82,9 @@ install -m 0644 %{name}.h '%{buildroot}/%{_includedir}' %changelog +* Mon Nov 19 2018 Petr Pisar - 1.15-11.r4 +- Fix link order + * Fri Jul 13 2018 Fedora Release Engineering - 1.15-10.r4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild