Bug 903288 - use -fno-strict-aliasing cflag to fix some compilation warnings
Summary: use -fno-strict-aliasing cflag to fix some compilation warnings
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fontforge
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-23 16:27 UTC by Parag Nemade
Modified: 2013-11-28 05:54 UTC (History)
4 users (show)

Fixed In Version: fontforge-20120731b-9.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-28 05:54:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
add -fno-strict-aliasing to every needed Makefile (4.25 KB, patch)
2013-01-23 16:27 UTC, Parag Nemade
no flags Details | Diff
Modified spec file to address some issues (1.89 KB, patch)
2013-08-21 09:53 UTC, Parag Nemade
no flags Details | Diff

Description Parag Nemade 2013-01-23 16:27:23 UTC
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 18:59:07 UTC
Seems fine to me... rawhide only? 

Might submit upstream as well?

Comment 2 Parag Nemade 2013-01-24 03:17:12 UTC
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 09:53:12 UTC
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 09:56:37 UTC
can this patch be applied to master please?

Comment 5 Kevin Fenzi 2013-08-21 22:17:07 UTC
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 13:27:21 UTC
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 14:10:36 UTC
Fixed in fontforge-20120731b-9.fc21. Closing this bug now.

Comment 8 Parag Nemade 2013-08-29 15:59:37 UTC
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 05:54:03 UTC
This is already fixed in fontforge-20120731b-10.fc21


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