Re: --Wl, -z, relro in LDFLAGS required?/Inconsistency when not using %configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Till Maas wrote:
> https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Compiler_flags
> 
> mentions only %optflags to be required for packages but I noticed that
> %configure sets LDFLAGS to a value different than %optflags:
> 
> rpm --eval %configure
> [...]
> LDFLAGS="${LDFLAGS:--Wl,-z,relro }"; export LDFLAGS;
> [...]
> 
> Also using '%global _hardened_build 1' modifies %configure to add
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld to LDFLAGS.
> 
> Therefore it seems that packages with a single Makefile where a package
> maintainers set the CFLAGS according to the current guidelines are built
> differently than packages using autoconf.
> 
> Do we need a %ldflags macro for packages not using %configure (or other
> build systems with proper RPM macros)? Or do the LDFLAGS not matter if
> CFLAGS are set properly?

We already have one, it's called %{__global_ldflags}. You are indeed
supposed to set LDFLAGS of handwritten makefiles to that. The guidelines
need to be updated.

        Kevin Kofler

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux