- fix LDFLAGS injection (#1552658)

This commit is contained in:
Dan Horák 2018-03-12 10:39:24 +01:00
parent 66882c268c
commit c2079c8084
2 changed files with 27 additions and 3 deletions

20
qclib-1.3.1-ldflags.patch Normal file
View File

@ -0,0 +1,20 @@
diff -up qclib-1.3.1/Makefile.ldflags qclib-1.3.1/Makefile
--- qclib-1.3.1/Makefile.ldflags 2018-03-12 10:36:52.428425169 +0100
+++ qclib-1.3.1/Makefile 2018-03-12 10:37:27.328425169 +0100
@@ -8,6 +8,7 @@ VERSION = 1.3.1
VERM = $(shell echo $(VERSION) | cut -d '.' -f 1)
DOCDIR ?= /usr/share/doc/packages/
CFLAGS ?= -g -Wall -O2
+LDFLAGS ?=
CFILES = query_capacity.c query_capacity_data.c query_capacity_sysinfo.c query_capacity_ocf.c \
query_capacity_hypfs.c query_capacity_sthyi.c
OBJECTS = $(patsubst %.c,%.o,$(CFILES))
@@ -38,7 +39,7 @@ libqc.a: $(OBJECTS)
$(AR) rcs $@ $^
libqc.so.$(VERSION): $(OBJECTS)
- $(LINK) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@
+ $(LINK) $(LDFLAGS) -Wl,-soname,libqc.so.$(VERM) -shared $^ -o $@
-rm libqc.so.$(VERM) 2>/dev/null
ln -s libqc.so.$(VERSION) libqc.so.$(VERM)

View File

@ -1,13 +1,14 @@
Name: qclib
Version: 1.3.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Library for extraction of system information for Linux on z Systems
License: BSD
URL: http://www.ibm.com/developerworks/linux/linux390/qclib.html
Source0: http://public.dhe.ibm.com/software/dw/linux390/ht_src/%{name}-%{version}.tgz
# Soname will be set upstream in later release
# https://bugzilla.redhat.com/show_bug.cgi?id=1306280
Patch0: %{name}-1.3.1-docdir.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1552658
Patch1: %{name}-1.3.1-ldflags.patch
ExclusiveArch: s390 s390x
BuildRequires: glibc-static
BuildRequires: doxygen
@ -50,7 +51,7 @@ Provides: %{name}-static = %{version}-%{release}
%build
make V=1 CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} all doc
make V=1 CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" %{?_smp_mflags} all doc
%install
@ -80,6 +81,9 @@ make test-sh test
%{_libdir}/libqc*.a
%changelog
* Mon Mar 12 2018 Dan Horák <dan[at]danny.cz> - 1.3.1-3
- fix LDFLAGS injection (#1552658)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild