Commit Graph

62 Commits

Author SHA1 Message Date
Jaco Kroon ce2153fc5a Build system: Avoid executable stack.
Found in res_geolocation, but I believe others may have similar issues,
thus not linking to a specific issue.

Essentially gcc doesn't mark the stack for being non-executable unless
it's compiling the source, this informs ld via gcc to mark the object as
not requiring an executable stack (which a binary blob obviously
doesn't).

ASTERISK-30321

Change-Id: I71bcc2fd1fe0c82a28b3257405d6f2b566fd9bfc
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
2022-11-21 08:52:49 -06:00
George Joseph 639d72e98c Geolocation: Core Capability Preview
This commit adds res_geolocation which creates the core capabilities
to manipulate Geolocation information on SIP INVITEs.

An upcoming commit will add res_pjsip_geolocation which will
allow the capabilities to be used with the pjsip channel driver.

This commit message is intentionally short because this isn't
a simple capability.  See the documentation at
https://wiki.asterisk.org/wiki/display/AST/Geolocation
for more information.

THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
USER FEEDBACK!

ASTERISK-30127

Change-Id: Ibfde963121b1ecf57fd98ee7060c4f0808416303
2022-07-12 07:52:12 -05:00
Kevin Harwell 3d1bf3c537 Compiler fixes for gcc 10
This patch fixes a few compile warnings/errors that now occur when using gcc
10+.

Also, the Makefile.rules check to turn off partial inlining in gcc versions
greater or equal to 8.2.1 had a bug where it only it only checked against
versions with at least 3 numbers (ex: 8.2.1 vs 10). This patch now ensures
any version above the specified version is correctly compared.

Change-Id: I54718496eb0c3ce5bd6d427cd279a29e8d2825f9
2020-06-10 09:33:28 -05:00
Guido Falsi 8b7324ed3f core/buildsystem: check the actual compiler being version
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
2019-04-22 07:05:33 -06:00
Chris-Savinovich 449dff997c partial-inlining: disable partial-inlining if gcc>=8.2.1
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
2019-03-11 11:20:53 -06:00
Corey Farrell a10a3aff6a Build System: Improve ccache matching for different menuselect options.
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
2018-08-01 12:01:15 -04:00
Joshua Colp 134e2f0ddc module: Remove deprecated modules and update support levels.
I have removed the STATIC_BUILD option immediately as it has not
been maintained in many years and is non-functional.

ASTERISK-27965

Change-Id: I64783d017b86dba9ee3c7bcfb97e59889a3f76d7
2018-07-18 18:15:53 +00:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Sean Bright cf6a6226ab core: Remove embedded module support
This has not worked for some time and is no longer actively maintained.

Change-Id: I5110b0db69c152761b58fa025cb0a53b0e544d99
2017-03-27 10:36:08 -04:00
George Joseph b4c5dcad01 menuselect: Various menuselect enhancements
* 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
2016-07-25 14:31:48 -05:00
George Joseph 0af6b5de62 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
2016-03-13 15:11:39 -06:00
Ivan Poddubny a12eb89ea4 Build: Add menuselect options for using compiler sanitizers
This patch adds menuselect options for building Asterisk with
various sanitizers provided by gcc and clang.

When one of *SANITIZER flags is set in menuselect, the appropriate
option is added to CFLAGS ad LDFLAGS for the build.

Information on sanitizers in the project wiki:
https://github.com/google/sanitizers/wiki

GCC Manual:
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html

Clang Compiler User's Manual:
http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation

ASTERISK-24718 #close
Reported by: Badalian Vyacheslav

Change-Id: Iafa51b792b7bcb20e848b99d16cf362d08590fa0
2015-10-10 23:21:34 +03:00
Diederik de Groot 305ce3defd Update configure.ac/Makefile for clang
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
2015-05-03 10:05:07 -05:00
Matthew Jordan 072734692e clang compiler warnings: Ignore -Wunused-command-line-argument
Asterisk's build system has a tendency to pass include directives for libraries
to everything compiled within a particular group of source files. This means
we pass the header for libxml2 to things that don't necessarily need it. As a
result, we ignore this particular warning.

Review: https://reviewboard.asterisk.org/r/4545/

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4545.patch submitted by dkdegroot (License 6600)
........

Merged revisions 433720 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 433721 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-30 01:57:07 +00:00
Corey Farrell 9f89b83269 Fix compiler error when using ./configure --enable-dev-mode --enable-coverage
When DONT_OPTIMIZE is enabled with dev-mode, it causes a shadow compilation
to be done with output to /dev/null.  This can cause errors with coverage
when GCC attempts to write to /dev/null.gcno.  This change disables
coverage for the shadow compilation.

ASTERISK-24502 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4151/
........

Merged revisions 427682 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 427683 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 427684 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-12 13:47:30 +00:00
George Joseph 682357dced astobj2: Add an ao2_replace macro to astobj2.h
This macro replaces one object reference with another cleaning up the original.

param dst Pointer to the object that will be cleaned up.
param src Pointer to the object replacing it.

src's ref count is bumped if it's non-NULL.
dst's ref count is decremented if it's non-NULL.
src is assigned to dst,

This patch was reviewed on IRC by coreyfarrell and mjordan.
 
Tested by: George Joseph
........

Merged revisions 416995 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-22 18:53:26 +00:00
Tzafrir Cohen 514a8244e3 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

Review: https://reviewboard.asterisk.org/r/3280/
........

Merged revisions 409308 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409344 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 409346 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 17:03:56 +00:00
Andrew Latham 6c20cf2d8a Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 14:17:40 +00:00
Kinsey Moore 8696daadf8 Simplify build system architecture optimization
This change to the build system rips out any usage of PROC along with
architecture-specific optimizations in favor of using -march=native where it is
supported.  This fixes broken builds on 64bit Intel systems and results in
better optimized code on systems running GCC 4.2+.

Review: https://reviewboard.asterisk.org/r/1852/
(closes issue ASTERISK-19462)
........

Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361956 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-12 15:25:47 +00:00
Kevin P. Fleming bd7e9dae66 Make COMPILE_DOUBLE magic actually work.
The build system has some special magic to ensure that if Asterisk is built
with --enable-dev-mode *and* DONT_OPTIMIZE, that all the source is still compiled
with the optimizer enabled (even though the result will be thrown away), because
the compiler is able to find a great deal of coding errors and bugs as a result
of running its optimizers. Unfortunately at some point this mode got broken,
and the 'throwaway' compile of the code was no longer done with the optimizer
enabled. This patch corrects that problem.
........

Merged revisions 357212 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 357213 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 14:47:23 +00:00
Tilghman Lesher 5e7121b44f Merged revisions 336734 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336734 | tilghman | 2011-09-19 15:29:40 -0500 (Mon, 19 Sep 2011) | 18 lines
  
  Merged revisions 336733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336733 | tilghman | 2011-09-19 15:27:03 -0500 (Mon, 19 Sep 2011) | 11 lines
    
    Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
    
    * Makefile workaround for 10.6 extended to work on 10.7 and later.
    * Now uses the 'weak' symbol for Lion systems, which no longer support
      'weak_import'
    
    Closes ASTERISK-17612.
    Closes ASTERISK-18213.
    
    Tested by: tilghman, oej.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:31:09 +00:00
Russell Bryant 0aff0b8e73 Merged revisions 279953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279953 | russell | 2010-07-27 16:16:05 -0500 (Tue, 27 Jul 2010) | 5 lines
  
  Add --enable-coverage option to configure script.
  
  This option enables the proper compiler flags for tracking code coverage, which
  is useful along side automated testing.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-27 21:16:39 +00:00
Russell Bryant f1bc2809b1 Ensure CONFIG_FLAGS makes it into the build rules when doing out of tree builds.
(closes issue #16685)
Reported by: pprindeville


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 15:41:23 +00:00
Tilghman Lesher c84e7f83c8 Merged revisions 262321 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r262321 | tilghman | 2010-05-11 12:22:07 -0500 (Tue, 11 May 2010) | 2 lines
  
  Fix issue #17302 a slightly different way (mad props to Qwell)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-11 17:23:51 +00:00
Tilghman Lesher 618bbdc2ad Merged revisions 262151 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r262151 | tilghman | 2010-05-10 11:34:21 -0500 (Mon, 10 May 2010) | 10 lines
  
  Allow compilation on Mac OS X 10.4 (Tiger)
  
  (closes issue #17297)
   Reported by: jcovert
   Patches: 
         20100506__issue17297.diff.txt uploaded by tilghman (license 14)
  
  (closes issue #17302)
   Reported by: jcovert
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-10 16:36:25 +00:00
Kevin P. Fleming 0f01ace7af Ensure that linker version scripts (used for symbol export control) always exist.
Using wildcard matching in the Makefile is not adequate to determine whether
an export file should exist for a module or not, so instead we'll just
create one if the module needs one, or copy the default one if it does not.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-08 16:35:10 +00:00
Kevin P. Fleming 2be88e05c0 Allow symbol export filtering to work properly on platforms that have symbol prefixes.
Some platforms prefix externally-visible symbols in object files generated
from C sources (most commonly, '_' is the prefix). On these platforms,
the existing symbol export filtering process ends up suppressing all the symbols
that are supposed to be left visible. This patch allows the prefix string
to be supplied to the top-level Makefile in the LINKER_SYMBOL_PREFIX variable,
and then generates the linker scripts as required to include the prefix
supplied.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-02 18:57:58 +00:00
Tilghman Lesher c1e33534a5 Build system modifications to ensure that Asterisk properly builds on Mac OS X 10.6.
(closes issue #16997)
 Reported by: jquinn
 Patches: 
       20100309__issue16997__2.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman, russell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-09 20:30:03 +00:00
Tilghman Lesher 6642c90029 Export dynamic (weak-linked) symbols correctly.
(closes issue #15193)
 Reported by: eliel
 Patches: 
       20091111__issue15193.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30 16:53:10 +00:00
Sean Bright c8a141905e Merged revisions 220717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r220717 | seanbright | 2009-09-28 15:09:25 -0400 (Mon, 28 Sep 2009) | 3 lines
  
  When selecting DONT_OPTIMIZE in menuselect, explicitly pass -O0 to the compiler
  so we override any default optimization levels for a particular install.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-28 19:11:20 +00:00
Kevin P. Fleming 96e4e31eeb Merged revisions 207647 via svnmerge from
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
2009-07-21 13:28:04 +00:00
Kevin P. Fleming 97e5d179ca Remove Makefile rules for bison and flex sources
We never, ever want these files to processed automatically, because we store the output files in Subversion and users should never need to rebuild them.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 14:12:09 +00:00
Kevin P. Fleming ab3e9ddad1 Merged revisions 182808 via svnmerge from
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
2009-03-18 02:21:23 +00:00
Kevin P. Fleming 63b031c471 Merged revisions 159476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r159476 | kpfleming | 2008-11-26 12:36:24 -0600 (Wed, 26 Nov 2008) | 7 lines
  
  simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
  
  ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 19:08:56 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
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
2008-11-20 00:08:12 +00:00
Kevin P. Fleming 211981e922 ensure that if a .i file (preprocessed source) is present, the .o file is made from it, not from the .c file (this only works because GNU makes respects the order the rules are defined)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 19:51:29 +00:00
Kevin P. Fleming 75281a1696 Merged revisions 157162-157163 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157162 | kpfleming | 2008-11-15 20:24:24 +0100 (Sat, 15 Nov 2008) | 1 line
  
  dist-clean should remove dependency information files as well
........
  r157163 | kpfleming | 2008-11-15 20:31:03 +0100 (Sat, 15 Nov 2008) | 1 line
  
  when an individual directory dist-clean is run, run clean in that directory first, and when running top-level dist-clean, do not run subdirectory clean operations twice
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 19:45:19 +00:00
Kevin P. Fleming f7fa7b52a2 Merged revisions 114875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114875 | kpfleming | 2008-04-30 07:14:07 -0500 (Wed, 30 Apr 2008) | 2 lines

pay attention to *all* header files for dependency tracking, not just the local ones (inspired by r578 of asterisk-addons by tilghman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-30 12:15:43 +00:00
Kevin P. Fleming 3ee2872f40 Merged revisions 107713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107713 | kpfleming | 2008-03-11 15:48:58 -0500 (Tue, 11 Mar 2008) | 2 lines

get chan_vpb to build properly in dev mode

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:50:57 +00:00
Luigi Rizzo 560fe89e1b as discussed some time ago on the -dev list, create embedde object
with a .eo suffix even if they are coming from .cc sources.
This simplifies the handling in the build scripts.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 17:27:26 +00:00
Luigi Rizzo 2a61f4bfd5 put back default optimization to -O6 (previously changed by mistake)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:15:21 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Kevin P. Fleming b370079027 use a variable name that actually indicates what it is for
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 17:00:07 +00:00
Luigi Rizzo f1d2836c8e Put extra compiler flags into a variable so they are not repeated
too many times.
On passing, add some comments and fix indentation a bit.

On passing, i suspect that the following pattern is wrong

	%.eoo: %.o

but in case it will be fixed in a later commit.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 16:41:39 +00:00
Russell Bryant 2bd3cefc43 Merged revisions 84957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84957 | russell | 2007-10-07 22:28:34 -0500 (Sun, 07 Oct 2007) | 6 lines

Enable file dependency tracking for _all_ builds, and not just for builds with
dev-mode enabled.  I have seen enough problems caused by this that I don't think
it's worth keeping.  I want to continue to encourage anybody that is interested
to continue to run Asterisk from svn.  Furthermore, I do not want their systems
to break when we change a structure definition in a header file.  :)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-08 03:29:38 +00:00
Jason Parker 5b5a2df463 Merged revisions 84291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84291 | qwell | 2007-10-01 16:52:45 -0500 (Mon, 01 Oct 2007) | 6 lines

Add dist-clean support for subdirs.

Change h323 to only remove the Makefile on a dist-clean, rather than a clean.

This fixes a bug I found with trying to run make after a make clean

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 21:54:41 +00:00
Kevin P. Fleming 1bec2f5bfa give embedded modules a helping hand by backing up and restoring their global variables when they are loaded and unloaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 02:36:00 +00:00
Russell Bryant b948cf876c Merged revisions 50994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50994 | russell | 2007-01-15 17:49:48 -0600 (Mon, 15 Jan 2007) | 2 lines

Filter out a few CFLAGS that are not valid CXXFLAGS.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 23:51:04 +00:00
Kevin P. Fleming 74f401d05f Merged revisions 50867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50867 | kpfleming | 2007-01-15 09:03:06 -0600 (Mon, 15 Jan 2007) | 2 lines

use the ACX_PTHREAD macro from the Autoconf macro archive for setting up compiler pthreads support... should improve portability to platforms with unusual pthreads requirements

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 15:08:45 +00:00
Kevin P. Fleming 2d1e6ff221 Merged revisions 49282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49282 | kpfleming | 2007-01-02 21:21:25 -0600 (Tue, 02 Jan 2007) | 2 lines

various Makefile improvements to get chan_vpb (and any other C++ modules) to build properly

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 03:28:12 +00:00