Skip to content
Snippets Groups Projects
  1. Apr 22, 2019
    • Guido Falsi's avatar
      core/buildsystem: check the actual compiler being version · 8b7324ed
      Guido Falsi authored
      Make compiler check use the output of the actual compiler being
      used as reported by the CC variable, instead of unconditionally
      running the "gcc" binary.  Also only run the check if the compiler
      is gcc or a cross-compile gcc.
      
      ASTERISK-28374
      
      Change-Id: Icaacf6d93686ad21076878aa1504a23b4fc9d0f4
      8b7324ed
  2. Mar 11, 2019
    • Chris-Savinovich's avatar
      partial-inlining: disable partial-inlining if gcc>=8.2.1 · 449dff99
      Chris-Savinovich authored
      Apply flag -fno-partial-inlining on default optimization if and only if
      gcc version >= 8.2.1 (this is the current ver on Fedora and Ubuntu).
      This is done to avoid a bug that causes arithmetic calculations to fail
      if the following conditions are met:
      1. TEST_FRAMEWORK on
      2. DONT_OPTIMIZE off
      3. Fedora and Ubuntu
      4. GCC 8.2.1
      5. There must exist a certain combination of multithreading.
      6. Optimization level -O2 and -O3
      7. Flag -fpartial-inline activated (default when optimization level>=2)
      The following link points to a similar gcc bug reported in 2015. This leads me
      to believe the bug has regressed. Note I am not able to replicate this bug
      in an environment other than Asterisk + Test Framework + Test_cel because the
      multithreading combination that causes it seems to be unique. Therefore I
      am temporarily abandoning any thoughts of reporting the new occurrence of this
      bug to gcc.gnu.org.  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65307
      
      Change-Id: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102
      449dff99
  3. Aug 01, 2018
    • Corey Farrell's avatar
      Build System: Improve ccache matching for different menuselect options. · a10a3aff
      Corey Farrell authored
      Changing any Menuselect option in the `Compiler Flags` section causes a
      full rebuild of the Asterisk source tree.  Every enabled option causes
      a #define to be added to buildopts.h, thus breaking ccache caching for
      every source file that includes "asterisk.h".  In most cases each option
      only applies to one or two files.  Now we only define those options for
      the specific sources which use them, this causes much better cache
      matching when working with multiple builds.  For example testing code
      with an without MALLOC_DEBUG will now use just over half the ccache
      size, only main/astmm.o will have two builds cached instead of every
      file.
      
      Reorder main/Makefile so _ASTCFLAGS set on specific object files are all
      together, sorted by filename.  Stop adding -DMALLOC_DEBUG to CFLAGS of
      bundled pjproject, this define is no longer used by any header so only
      serves to break cache.
      
      The only code change is a slight adjustment to how main/astmm.c is
      initialized.  Initialization functions always exist so main/asterisk.c
      can call them unconditionally.  Additionally rename the astmm
      initialization functions so they are not exported.
      
      Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
      a10a3aff
  4. Jul 18, 2018
  5. Dec 22, 2017
  6. Mar 27, 2017
  7. Jul 25, 2016
    • George Joseph's avatar
      menuselect: Various menuselect enhancements · b4c5dcad
      George Joseph authored
      * Add 'external' as a support level.
      * Add ability for module directories to add entries to the menu
        by adding members to the <module_prefix>/<module_prefix>.xml file.
      * Expand the description field to 3 lines in the ncurses implementation.
      * Allow the description field to wrap in the newt implementation.
      * Add description field to the gtk implementation.
      
      Change-Id: I7f9600a1984a42ce0696db574c1051bc9ad7c808
      b4c5dcad
  8. Mar 13, 2016
    • George Joseph's avatar
      build_system: Split COMPILE_DOUBLE from DONT_OPTIMIZE · 0af6b5de
      George Joseph authored
      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
      0af6b5de
  9. Oct 10, 2015
  10. May 03, 2015
    • Diederik de Groot's avatar
      Update configure.ac/Makefile for clang · 305ce3de
      Diederik de Groot authored
      Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which
      checks compiler requirements for RAII:
      gcc: -fnested-functions support
      clang: -fblocks (and if required -lBlocksRuntime)
      The original check was implemented in configure.ac and now has it's
      own file. This function also sets C_COMPILER_FAMILY to either gcc or
      clang for use by makefile
      
      Created autoconf/ast_check_strsep_array_bounds.m4 (contains
      AST_CHECK_STRSEP_ARRAY_BOUNDS):
      which checks if clang is able to handle the optimized strsep & strcmp
      functions (linux). If not, the standard libc implementation should be
      used instead. Clang + the optimized macro's work with:
      strsep(char *, char []), but not with strsepo(char *, char *).
      Instead of replacing all the occurences throughout the source code,
      not using the optimized macro version seemed easier
      
      See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h':
      llvm-comment: Normally, this array-bounds warning are suppressed for
      macros, so that unused paths like the one that accesses __s1[3] are
      not warned about.  But if you preprocess manually, and feed the
      result to another instance of clang, it will warn about all the
      possible forks of this particular if statement. Instead of switching
      of this optimization, another solution would be to run the preproces-
      sing step with -frewrite-includes, which should preserve enough
      information so that clang should still be able to suppress the diag-
      nostic at the compile step later on.
      
      See also "https://llvm.org/bugs/show_bug.cgi?id=20144"
      See also "https://llvm.org/bugs/show_bug.cgi?id=11536"
      
      Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning
      suppressions:
      -Wno-unused-value
      -Wno-parentheses-equality
      In an earlier review (reviewboard: 4550 and 4554), they were deemed a
      nuisace and less than benefitial.
      
      configure.ac:
      Added AST_CHECK_RAII() see earlier
      Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier
      Removed moved content
      
      ASTERISK-24917
      Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb
      305ce3de
  11. Mar 30, 2015
  12. Nov 12, 2014
  13. Jun 22, 2014
  14. Mar 02, 2014
  15. Oct 18, 2012
  16. Apr 12, 2012
  17. Feb 28, 2012
  18. Sep 19, 2011
  19. Jul 27, 2010
  20. Jun 08, 2010
  21. May 11, 2010
  22. May 10, 2010
  23. Apr 08, 2010
  24. Apr 02, 2010
  25. Mar 09, 2010
  26. Nov 30, 2009
  27. Sep 28, 2009
  28. Jul 21, 2009
    • Kevin P. Fleming's avatar
      Merged revisions 207647 via svnmerge from · 96e4e31e
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
        
        Ensure that user-provided CFLAGS and LDFLAGS are honored.
        
        This commit changes the build system so that user-provided flags (in ASTCFLAGS
        and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
        by the build system itself, so that the user can effectively override the
        build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
        be provided *either* in the environment before running 'make', or as variable
        assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
        is no longer necessary, so they are no longer documented, but are still supported
        so as not to break existing build systems that supply them when building Asterisk.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      96e4e31e
  29. Apr 28, 2009
  30. Mar 18, 2009
    • Kevin P. Fleming's avatar
      Merged revisions 182808 via svnmerge from · ab3e9dda
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r182808 | kpfleming | 2009-03-17 20:55:22 -0500 (Tue, 17 Mar 2009) | 5 lines
        
        Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
        
        With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ab3e9dda
  31. Nov 26, 2008
  32. Nov 20, 2008
    • Kevin P. Fleming's avatar
      Merged revisions 157859 via svnmerge from · 8d5deb31
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
        
        the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
        
        with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
        
        while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8d5deb31
  33. Nov 15, 2008
  34. Apr 30, 2008
  35. Mar 11, 2008
  36. Nov 17, 2007
  37. Nov 16, 2007
  38. Nov 05, 2007
Loading