#1 Use CFLAGS/LDFLAGS provided by RPM
Merged 5 years ago by ignatenkobrain. Opened 5 years ago by ignatenkobrain.
rpms/ ignatenkobrain/gnupg1 master  into  master

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

  Summary: A GNU utility for secure communication and data storage

  Name: gnupg1

  Version: 1.4.23

- Release: 3%{?dist}

+ Release: 4%{?dist}

  License: GPLv3+ with exceptions

  URL: http://www.gnupg.org/

  Source0: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-%{version}.tar.bz2
@@ -48,8 +48,6 @@ 

  configure_flags=--disable-asm

  %endif

  

- CFLAGS="$RPM_OPT_FLAGS -fPIE -DPIC" ; export CFLAGS

- LDFLAGS="$RPM_OPT_FLAGS -pie -Wl,-z,relro,-z,now" ; export LDFLAGS

  %configure \

      --disable-rpath \

      --disable-exec \
@@ -96,6 +94,9 @@ 

  %{_mandir}/man1/gpgv1.1.gz

  

  %changelog

+ * Sat Dec 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.23-4

+ - Use CFLAGS/LDFLAGS provided by RPM

+ 

  * Wed Dec 05 2018 Brian C. Lane <bcl@redhat.com> - 1.4.23-3

  - Rename the package to gnupg1 (#1656282)

  - Rename the binarys to gpg1, gpgv1, gpg-zip1, gpgsplit1 (#1656282)

Pull-Request has been merged by ignatenkobrain

5 years ago

I'm reluctant to change this without a really good reason. Looking back at the commits that added these they reference rhbz#145836, and needing PIC defined. I don't see it in the current default flags, and I'm no longer familiar enough with gcc options to know if what we are providing somehow builds the same binaries.

Since this package is primarily in maintenance mode I think we should leave this as is, unless there is an actual problem it solves (or if you can confirm for sure that it is no longer needed to solve the original problem).

@bcl, the main problem is that LDFLAGS were incorrect (so the as-needed and few other things were missing).

Thanks for link though and that's true that -DPIC needs to be defined. Sorry for rushing with merge of this PR.

I've added -DPIC back in 2a15801