]> git.ipfire.org Git - thirdparty/asterisk.git/commit
build_system: Split COMPILE_DOUBLE from DONT_OPTIMIZE 80/2380/3
authorGeorge Joseph <george.joseph@fairview5.com>
Sat, 12 Mar 2016 22:02:20 +0000 (15:02 -0700)
committerGeorge Joseph <george.joseph@fairview5.com>
Sun, 13 Mar 2016 20:53:35 +0000 (14:53 -0600)
commit32f0a3d52a45e1c59274e271a83722cafbf5f231
tree4a8d56521c8f7705003f7216185eb8b4e13dc884
parented34bbdf9becaa61fa2ae544605426b6c6bbbb0f
build_system:  Split COMPILE_DOUBLE from DONT_OPTIMIZE

I can't ever recall actually needing the intermediate files or the checking
that a double compile produces.  What I CAN remember is every DONT_OPTIMIZE
build needing 3 invocations of gcc instead of 1 just to do the checks and
produce those intermediate files.

Having said that, Richard pointed out that the reason for the double compile
was that there were cases in the past where a submitted patch failed to compile
because the submitter never tried it with the optimizations turned on.

To get the best of both worlds, COMPILE_DOUBLE has been split into its own
option.  If DONT_OPTIMIZE is turned on, COMPILE_DOUBLE will also be selected
BUT you can then turn it off if all you need are the debugging symbols.  This
way you have to make an informed decision about disabling COMPILE_DOUBLE.

To allow COMPILE_DOUBLE to be both auto-selected and turned off, a new feature
was added to menuselect.  The <use> element can now contain an "autoselect"
attribute which will turn the used member on but not create a hard dependency.
The cflags.xml implementation for COMPILE_DOUBLE looks like this...

<member name="DONT_OPTIMIZE" displayname="Disable Optimizations ...">
<use autoselect="yes">COMPILE_DOUBLE</use>
<support_level>core</support_level>
</member>
<member name="COMPILE_DOUBLE" displayname="Pre-compile with ...>
<depend>DONT_OPTIMIZE</depend>
<support_level>core</support_level>
</member>

When DONT_OPTIMIZE is turned on, COMPILE_DOUBLE is turned on because
of the use.
When DONT_OPTIMIZE is turned off, COMPILE_DOUBLE is turned off because
of the depend.
When COMPILE_DOUBLE is turned on, DONT_OPTIMIZE is turned on because
of the depend.
When COMPILE_DOUBLE is turned off, DONT_OPTIMIZE is left as is because
it only uses COMPILE_DOUBLE, it doesn't depend on it.

I also made a few tweaks to the ncurses implementation to move things
left a bit to allow longer descriptions.

Change-Id: Id49ca930ac4b5ec4fc2d8141979ad888da7b1611
Makefile.rules
build_tools/cflags.xml
menuselect/menuselect.c
menuselect/menuselect.h
menuselect/menuselect_curses.c