Bug 1236456
Summary: | Koji build add extra cflags automaticlly like -fexceptions -fstack-protector-strong | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dave Young <ruyang> | |
Component: | kexec-tools | Assignee: | Dave Young <ruyang> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | rawhide | CC: | bhe, dennis, kdump-team-bugs, mikem, mtasaka, panand, pbrobinson, ruyang, wcwxyz | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1236466 (view as bug list) | Environment: | ||
Last Closed: | 2015-07-02 02:40:08 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1236466 |
Description
Dave Young
2015-06-29 06:06:47 UTC
Explain a bit about purgatory build, purgatory is some code which is run in kernel space during kexec loading so some flags does not work for it like -fexceptions -fstack-protector** etc. Do you properly have installed "redhat-rpm-config" rpm installed when trying local build? koji build (or mock build) always make this rpm installed, and it changes %optflags (or it is recommended to install "fedora-packager" rpm when trying local build). Try installing "redhat-rpm-config" rpm if not installed and then try what $ rpm --eval %optflags shows. Hi, On my laptop, the command executed output below results: ➜ kexec-tools git:(master) ✗ rpm --eval %optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic Thanks Baoquan If you add the following line to the top of the rpm spec file it will remove all the extra hardening flags and take you back to the F-22 equivilent %undefine _hardened_build (In reply to Peter Robinson from comment #4) > If you add the following line to the top of the rpm spec file it will remove > all the extra hardening flags and take you back to the F-22 equivilent > > %undefine _hardened_build Peter, thanks a lot, it works for me. Dave Just for clarification here: kexec-tools-2.0.9-2.fc23 ------------------------ * Thu Jul 02 2015 Dave Young <dyoung> - 2.0.9-2 - Resolve bug 1236456, kexec load fail because koji add extra gcc flags. - Remove -FPIC for makedumpfile since it is not necessary without harden build koji doesn't do anything with gcc flags what so ever, they are added by rpmbuild when the redhat-rpm-config package is installed. This is part of the build root core packages. You can install it on local machines and the same will happen when using rpmbuild locally or within mock. (In reply to Peter Robinson from comment #6) > Just for clarification here: > > kexec-tools-2.0.9-2.fc23 > ------------------------ > * Thu Jul 02 2015 Dave Young <dyoung> - 2.0.9-2 > - Resolve bug 1236456, kexec load fail because koji add extra gcc flags. > - Remove -FPIC for makedumpfile since it is not necessary without harden > build > > koji doesn't do anything with gcc flags what so ever, they are added by > rpmbuild when the redhat-rpm-config package is installed. This is part of > the build root core packages. You can install it on local machines and the > same will happen when using rpmbuild locally or within mock. I checked local rpmbuild gcc flags, they are exactly same with koji used, but it is odd local build works, koji build does not. |