binutils-2.29.1-15.fc28 was not built with the build flags specified in redhat-rpm-config. Is there any reason for doing this? binutils does not build any libraries for external users, so I expect it be to considerably less special than glibc and gcc in this regard.
(In reply to Florian Weimer from comment #0) > Is there any reason for doing this? Nope. It is just "how it has always been done"(tm). I will investigate and try to fix.
In binutils-2.29.1-16, you only injected CFLAGS, but did not set LDFLAGS. The redhat-rpm-config default is available in the $RPM_LD_FLAGS shell variable within the %build section of the RPM spec file.
Hi Florian, Please could you look at: binutils-2.29.1-16.fc28 Built here: https://koji.fedoraproject.org/koji/taskinfo?taskID=24624810 And let me know if this is what you were looking for. Cheers Nick
Nick, please see comment 2. LDFLAGS appear to be missing still.
Hi Florian, Sorry, I missed that. Please see: binutils-2.29.1-18.fc28 from build: https://koji.fedoraproject.org/koji/taskinfo?taskID=24840215 This should be inject the linker flags correctly. Cheers Nick
Nick, I still do not see any annobin notes. Is this intentional?
Hi Florian, *sigh* It was not intentional, but it was surprising. It was all down to this *comment* in the binutils.spec file: # Only uncomment this next option if there is a problem building # the binutils and the compiler complains about the presence of # plugins. The plugin should be harmless, but the compiler always # blames it first... # %undefine _annotated_build It seems that having "%undefine _annotated_build" in your spec file, even in comment form, is enough to disable annotations. So I have removed the comment, rebuilt the binutils, and this time "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" is showing up in the build logs. So please try: https://koji.fedoraproject.org/koji/taskinfo?taskID=24963268 Cheers Nick
Thanks, binutils-2.29.1-19.fc28 confirmed as fixed.
RPM always expands macro, be that in comment or not. You should use % to escape macros.. Like %%undefine __annotated_build.
(In reply to Igor Gnatenko from comment #9) > You should use % to escape macros.. Like %%undefine __annotated_build. Thanks for the tip. I think what got me though was not that the macro was being expanded inside the comment, but that it was then being interpreted as well. I guess that this is another case where I need to pay attention to the warnings generated by "fedpkg lint".