mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Ensure that CFLAGS and/or LDFLAGS provided to configure script are preserved.
Cross-compilation environments want to provide 'defaults' for compiler and linker options, and frequently do this by specifying CFLAGS and LDFLAGS in the environment or as command-line arguments to the configure script. This patch modifies the configure script and Makefile to preserve these settings and ensure they are used in the build process. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
Makefile
13
Makefile
@@ -95,10 +95,17 @@ ifneq ($(wildcard makeopts),)
|
||||
include makeopts
|
||||
endif
|
||||
|
||||
# start the primary CFLAGS and LDFLAGS with any that were provided
|
||||
# to the configure script
|
||||
_ASTCFLAGS:=$(CONFIG_CFLAGS)
|
||||
_ASTLDFLAGS:=$(CONFIG_LDFLAGS)
|
||||
|
||||
# Some build systems, such as the one in openwrt, like to pass custom target
|
||||
# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables.
|
||||
ASTCFLAGS+=$(COPTS)
|
||||
ASTLDFLAGS+=$(LDOPTS)
|
||||
# CFLAGS and LDFLAGS in the COPTS and LDOPTS variables; these should also
|
||||
# go before any build-system computed flags, since they are defaults, not
|
||||
# overrides
|
||||
_ASTCFLAGS+=$(COPTS)
|
||||
_ASTLDFLAGS+=$(LDOPTS)
|
||||
|
||||
# libxml2 cflags
|
||||
_ASTCFLAGS+=$(LIBXML2_INCLUDE)
|
||||
|
Reference in New Issue
Block a user