Bug 1319301 - rstp: Building does not honor RPM_OPT_FLAGS
Summary: rstp: Building does not honor RPM_OPT_FLAGS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rstp
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-18 18:27 UTC by Ralf Corsepius
Modified: 2016-04-04 15:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-04 15:49:59 UTC
Type: Bug


Attachments (Terms of Use)

Description Ralf Corsepius 2016-03-18 18:27:55 UTC
Description of problem:

Building rstp doesn't honor $RPM_OPT_FLAGS/%optflags.

see https://bugzilla.redhat.com/attachment.cgi?id=1126054
and check all calls to gcc:
...
gcc -Wall -Werror -O2 -g -D_REENTRANT -D__LINUX__ -DVERSION=0.16 -DBUILD=1 -I. -I./include -I./rstplib   -c -o brstate.o brstate.c
...
gcc -g -O -Wall -D_REENTRANT -D__LINUX__   -c -o port.o port.c
...

Version-Release number of selected component (if applicable):
- rstp-04012009git-16.fc25
- Probably all versions of the rstp package in Fedora

How reproducible:
Always

Steps to Reproduce:
1. Build the package, check build.log


Additional info:
A brute-force patch would be this one:
# diff --git a/rstp.spec b/rstp.spec
index 9bcbc14..4d52a5c 100644
--- a/rstp.spec
+++ b/rstp.spec
@@ -35,6 +35,8 @@ replaces the in-kernel STP implementation
 %patch2 -p1
 %patch3 -p1
 
+sed -i -e 's|^\(CFLAGS = .*\)$|\1 %{optflags} |' Makefile */Makefile
+
 %build
 make %{?_smp_mflags}


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