[asterisk-bugs] [JIRA] (ASTERISK-14402) [patch] No way to pass CFLAGS to non-module objects

Corey Farrell (JIRA) noreply at issues.asterisk.org
Wed Dec 13 13:48:07 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-14402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell closed ASTERISK-14402.
------------------------------------

    Resolution: Fixed

This was resolved by the addition of MOD_ADD_C / MOD_ADD_CC Makefile macros.

> [patch] No way to pass CFLAGS to non-module objects
> ---------------------------------------------------
>
>                 Key: ASTERISK-14402
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-14402
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Core/BuildSystem
>            Reporter: Tzafrir Cohen
>            Severity: Minor
>         Attachments: obj_deps.diff
>
>
> When building an object that is not the main object in a module, extra CFLAGS are not applied.
> E.g. if I don't have support for PRI, I expect sig_pri not to build at all. If we do have ti, it should use the PRI CFLAGS.
> Terminology (could be improved):
> module: something that can be "loaded" in Asterisk at run-time. E.g. chan_dahdi, config, pbx_ael . 
> object: Built from a single C/C++ source file. E.g. chan_dahdi.so is built from chan_dahdi.c, sig_analog.c and sig_pri.c .
> module object: chan_dahdi.c in the case of the module chan_dahdi.
> ****** ADDITIONAL INFORMATION ******
> tzafrir at sweetmorn:~/Proj/Asterisk/Git/asterisk$ LANG=C make NOISY_BUILD=1
>   [snip]
> make[1]: Leaving directory `/home/tzafrir/Proj/Asterisk/Git/asterisk/cdr'
> make[1]: Entering directory `/home/tzafrir/Proj/Asterisk/Git/asterisk/cel'
> gcc -o cel_pgsql.i -E cel_pgsql.c -pthread -I/home/tzafrir/Proj/Asterisk/Git/asterisk/include  -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Werror -Wunused -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -Wundef  -Wmissing-format-attribute -Wformat=2 -march=k8  -fPIC -DAST_MODULE=\"cel_pgsql\"   -MD -MT cel_pgsql.i -MF .cel_pgsql.i.d -MP
> cel_pgsql.c:48:22: error: libpq-fe.h: No such file or directory
> make[1]: *** [cel_pgsql.i] Error 1
> make[1]: Leaving directory `/home/tzafrir/Proj/Asterisk/Git/asterisk/cel'
> make: *** [cel] Error 2
> asterisk$ grep PG makeopts
> PGSQL_INCLUDE=-I/usr/include/postgresql
> PGSQL_LIB=-L/usr/lib -lpq -lz



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list