Fix the %build section of the spec file to pass in proper CFLAGS
The wrong assumptions were being made about what generate/unix/Makefile.config would do with passed in values of OPT_CFLAGS, causing CWARNINGFLAGS to be ignore in that makefile. For packaging purposes, OPT_CFLAGS needs to be used to pass in distro required values; we needed to add to that all of the CWARNINGFLAGS so that we do not have to rewrite or significantly patch large portions of the original makefile. Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
parent
7e841912d9
commit
0ce39766e9
@ -128,7 +128,43 @@ chmod a-x source/compiler/new_table.txt
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make OPT_CFLAGS="%{optflags}" OPT_LDFLAGS="%{__global_ldflags}"
|
CWARNINGFLAGS="\
|
||||||
|
-std=c99\
|
||||||
|
-Wall\
|
||||||
|
-Wbad-function-cast\
|
||||||
|
-Wdeclaration-after-statement\
|
||||||
|
-Werror\
|
||||||
|
-Wformat=2\
|
||||||
|
-Wmissing-declarations\
|
||||||
|
-Wmissing-prototypes\
|
||||||
|
-Wstrict-aliasing=0\
|
||||||
|
-Wstrict-prototypes\
|
||||||
|
-Wswitch-default\
|
||||||
|
-Wpointer-arith\
|
||||||
|
-Wundef\
|
||||||
|
-Waddress\
|
||||||
|
-Waggregate-return\
|
||||||
|
-Winit-self\
|
||||||
|
-Winline\
|
||||||
|
-Wmissing-declarations\
|
||||||
|
-Wmissing-field-initializers\
|
||||||
|
-Wnested-externs\
|
||||||
|
-Wold-style-definition\
|
||||||
|
-Wno-format-nonliteral\
|
||||||
|
-Wredundant-decls\
|
||||||
|
-Wempty-body\
|
||||||
|
-Woverride-init\
|
||||||
|
-Wlogical-op\
|
||||||
|
-Wmissing-parameter-type\
|
||||||
|
-Wold-style-declaration\
|
||||||
|
-Wtype-limits"
|
||||||
|
|
||||||
|
OPT_CFLAGS="%{optflags} $CWARNINGFLAGS"
|
||||||
|
OPT_LDLAGS="%{__global_ldflags}"
|
||||||
|
export OPT_CFLAGS
|
||||||
|
export OPT_LDFLAGS
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -213,6 +249,10 @@ fi
|
|||||||
- Add in option -th that allows one to better name generated hex files, and
|
- Add in option -th that allows one to better name generated hex files, and
|
||||||
clean up the header files generated (applied github patch)
|
clean up the header files generated (applied github patch)
|
||||||
- Added gcc to BuildRequires
|
- Added gcc to BuildRequires
|
||||||
|
- It turns out the %%build section was incorrectly passing in OPT_CFLAGS; it
|
||||||
|
made the wrong assumptions about what generate/unix/Makefile.config did with
|
||||||
|
that value. Added to the spec file what should happen so that a full and
|
||||||
|
complete set of C flags get passed in, not just the small subset that was.
|
||||||
|
|
||||||
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 20180105-3
|
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 20180105-3
|
||||||
- Escape macros in %%changelog
|
- Escape macros in %%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user