Gary Mills via illumos-developer
2014-10-08 14:41:23 UTC
This is for illumos bug `5196 The cw wrapper restricts gcc to -O2'.
The webrev is here:
http://cr.illumos.org/~webrev/jgmills/5196-2
Unlike the previous version, this revision ensures that nothing
changes in illumos by retaining all of the optimization settings
used in the build. It does make it easier to change optimization
in the future.
The problem to be solved is that code in cw.c limits the optimization
level for gcc to 2 even though the default level in Makefile.master is
3. My approach was to remove that limit from cw.c and to transfer
any necessary gcc optimization settings and adjustments to Makefiles.
In this revision, I've modified the cw wrapper so that it does not
limit gcc optimization to level 2 and so that it does not set any gcc
optimization adjustments through `-f' options. The wrapper now only
maps `-xOn' for cc to `-On' for gcc, although this mapping is no
longer necessary.
I've also added separate optimization settings for cc and gcc to
Makefiles, principally to Makefile.master . The defaults are the same
as were coded in the file or produced by the cw wrapper. As well,
I've identified all Makefiles that change optimization away from the
defaults, and modified them similarly.
To ensure that none of the binaries had changed in this revision, I
compared prototype areas from before and after the changes with
`wsdiff'. In some cases, I also verified that the cw and gcc command
lines were unchanged.
I was using Illumos gcc-4.4.4-il-3 as the primary compiler, with the
Sun Studio compiler as shadow.
The original bug report is here:
https://illumos.org/issues/5196
--
-Gary Mills- -refurb- -Winnipeg, Manitoba, Canada-
-------------------------------------------
illumos-developer
Archives: https://www.listbox.com/member/archive/182179/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182179/21175072-86d49504
Modify Your Subscription: https://www.listbox.com/member/?member_id=21175072&id_secret=21175072-abdf7b7e
Powered by Listbox: http://www.listbox.com
The webrev is here:
http://cr.illumos.org/~webrev/jgmills/5196-2
Unlike the previous version, this revision ensures that nothing
changes in illumos by retaining all of the optimization settings
used in the build. It does make it easier to change optimization
in the future.
The problem to be solved is that code in cw.c limits the optimization
level for gcc to 2 even though the default level in Makefile.master is
3. My approach was to remove that limit from cw.c and to transfer
any necessary gcc optimization settings and adjustments to Makefiles.
In this revision, I've modified the cw wrapper so that it does not
limit gcc optimization to level 2 and so that it does not set any gcc
optimization adjustments through `-f' options. The wrapper now only
maps `-xOn' for cc to `-On' for gcc, although this mapping is no
longer necessary.
I've also added separate optimization settings for cc and gcc to
Makefiles, principally to Makefile.master . The defaults are the same
as were coded in the file or produced by the cw wrapper. As well,
I've identified all Makefiles that change optimization away from the
defaults, and modified them similarly.
To ensure that none of the binaries had changed in this revision, I
compared prototype areas from before and after the changes with
`wsdiff'. In some cases, I also verified that the cw and gcc command
lines were unchanged.
I was using Illumos gcc-4.4.4-il-3 as the primary compiler, with the
Sun Studio compiler as shadow.
The original bug report is here:
https://illumos.org/issues/5196
--
-Gary Mills- -refurb- -Winnipeg, Manitoba, Canada-
-------------------------------------------
illumos-developer
Archives: https://www.listbox.com/member/archive/182179/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182179/21175072-86d49504
Modify Your Subscription: https://www.listbox.com/member/?member_id=21175072&id_secret=21175072-abdf7b7e
Powered by Listbox: http://www.listbox.com