[Fedora-packaging] Re: about compiler flags

Orcan Ogetbil oget.fedora at gmail.com
Tue Apr 28 19:43:29 UTC 2009


On Wed, Apr 22, 2009 at 12:56 PM, Orcan Ogetbil  wrote:
> I have 2 questions. The first one is brought to my attention by a
> first time reviewer and he has got an interesting point.
>
> The guidelines at
> https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
> say:
> "Adding to and overriding or filtering parts of these flags is
> permitted if there's a good reason to do so; the rationale for doing
> so should be reviewed and documented in the specfile especially in the
> override and filter cases."
>
> As you probably know that some packages add their own compiler flags
> on top of what we specified as %optflags. Until now, I did not do
> anything about these flags unless they override our %optflags. Now,
> having a second thought, I realized that the above statement can be
> interpreted in two ways:
>
> 1- The extra flags are added by the packager: This is the way I used
> to interpret the guideline, and I always document if I add additional
> flags on top of %{optflags}
> 2- The extra flags are added by the build script of upstream: Here is
> the question: Do we need to document such cases in the specfile? I
> know that we have hundreds (maybe thousands) of packages which don't
> document this case in the specfile. Are such packages violating the
> above guideline?
>
>
> Second question: From the same link above:
> "Compilers used to build packages should honor the applicable compiler
> flags set in the system rpm configuration."
>
> Does this apply to the stage where the compiler is doing the linking,
> i.e: "gcc -shared -lthis -lthat..."? Do we need to honor %optflags in
> this stage too? Again, I know many packages that don't pass %optflags
> to the compiler during the linking. Do these pakcages violate the
> guideline?
>
> Orcan
>


I didn't get satisfactory responses to my questions, neither here nor
in fedora-devel list. All the response we got in this thread was about
specific examples concerning the first question, and there was no
explanation in full generality. There was no attempt to answer the
second question at all. There could be two reasons for this:

Either everybody thinks that the answers are ridiculously trivial and
they don't bother to answer them,
or most people don't have a clue.

I hope it is the former one. So please, if you have answers to any of
these questions that are not case-specific, would you please share it
with me?

Thanks,
Orcan




More information about the Fedora-packaging mailing list