Bug 1548559 - sgpio: Partial injection of Fedora build flags
Summary: sgpio: Partial injection of Fedora build flags
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sgpio
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Fedora28BuildFlags
TreeView+ depends on / blocked
 
Reported: 2018-02-23 20:49 UTC by Florian Weimer
Modified: 2018-02-26 11:03 UTC (History)
2 users (show)

Fixed In Version: sgpio-1.2.0.10-21.fc29
Clone Of:
Environment:
Last Closed: 2018-02-26 10:46:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2018-02-23 20:49:38 UTC
/usr/sbin/sgpio in sgpio-1.2.0.10-20.fc28.x86_64 has not been linked with the standard Fedora linker (LDFLAGS) from redhat-rpm-config.

Looking at the makefile, there is no way to inject the flags:

sgpio.o: sgpio.c
	gcc $(CFLAGS) -c sgpio.c

So you either need to build directly from the %build section in the RPM spec file, or patch the makefile.

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 Jan Synacek 2018-02-26 10:46:41 UTC
Should be fixed now.

https://src.fedoraproject.org/rpms/sgpio/c/d81baccc87f76e172684837da21c6911f777f94b?branch=master

https://kojipkgs.fedoraproject.org//work/tasks/7617/25317617/build.log

...
gcc -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld sgpio.o -o sgpio
...

Comment 2 Florian Weimer 2018-02-26 11:03:31 UTC
I took the liberty to push this to the f28 branch, too. Fix confirmed for sgpio-1.2.0.10-21.fc28.  Thanks.


Note You need to log in before you can comment on or make changes to this bug.