Bug 903288

Summary: use -fno-strict-aliasing cflag to fix some compilation warnings
Product: [Fedora] Fedora Reporter: Parag Nemade <pnemade>
Component: fontforgeAssignee: Kevin Fenzi <kevin>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: fonts-bugs, kevin, paul, pnemade
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fontforge-20120731b-9.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-28 00:54:03 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
add -fno-strict-aliasing to every needed Makefile
none
Modified spec file to address some issues none

Description Parag Nemade 2013-01-23 11:27:23 EST
Created attachment 686075 [details]
add -fno-strict-aliasing to every needed Makefile

Description of problem:
I see fontforge build.log showing
ufo.c:1027:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ufo.c:1031:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

spec file shows -fno-strict-aliasing added to CFLAGS but its not in effect. Attached patch will modify each needed Makefile to add that flag

Also, attached patch removes some makefile rules as they are really not needed


Version-Release number of selected component (if applicable):
fontforge-20120731b-2.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Kevin Fenzi 2013-01-23 13:59:07 EST
Seems fine to me... rawhide only? 

Might submit upstream as well?
Comment 2 Parag Nemade 2013-01-23 22:17:12 EST
Actually I need this fix for f18 also. I see that upstream sourcecode on github has been changed a lot and Makefiles are re-written and accepting additional compiler flags correctly. so no need to upstream this patch.
Comment 3 Parag Nemade 2013-08-21 05:53:12 EDT
Created attachment 788781 [details]
Modified spec file to address some issues

Issues that this patch will solve

1) bogus date changelog messages

2) adds cflag -Wstrict-aliasing

3) Fix compile time po files link error messages by removing makefile rule
e.g. some of these messages in build.log
ln -s ./po/*.po po
ln: failed to create symbolic link 'po/ca.po': File exists
ln: failed to create symbolic link 'po/de.po': File exists
ln: failed to create symbolic link 'po/el.po': File exists
ln: failed to create symbolic link 'po/en_GB.po': File exists

4) Fix compile time install error messages by removing makefile rule
/usr/bin/install: cannot stat './htdocs/flags/*': No such file or directory
make[1]: [install_docs] Error 1 (ignored)
/usr/bin/install: cannot stat './htdocs/ja/*': No such file or directory
make[1]: [install_docs] Error 1 (ignored)
Comment 4 Parag Nemade 2013-08-21 05:56:37 EDT
can this patch be applied to master please?
Comment 5 Kevin Fenzi 2013-08-21 18:17:07 EDT
I went to apply this and then realized that I didn't approve your acls on the package. ;) 

Must have missed when you applied. 

I have approved them, can you apply this yourself? Or would you like me to?
Comment 6 Parag Nemade 2013-08-22 09:27:21 EDT
Thank you for approving my acls. I will commit now proposed spec file patch and build new package.
Comment 7 Parag Nemade 2013-08-22 10:10:36 EDT
Fixed in fontforge-20120731b-9.fc21. Closing this bug now.
Comment 8 Parag Nemade 2013-08-29 11:59:37 EDT
I just come to know to fix warning messages given in description comment I should have used cflag -fno-strict-aliasing and not -Wstrict-aliasing. Also, tested successfully rpmdiff results for this -fno-strict-aliasing cflag. Sorry I got confused in between as I was actually decided to use -fno-strict-aliasing but then something made me to change it to -Wstrict-aliasing.

I will build new package tomorrow.
Comment 9 Parag Nemade 2013-11-28 00:54:03 EST
This is already fixed in fontforge-20120731b-10.fc21