diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 15:24:38 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 15:24:38 +0100 |
commit | 845bf99312d93d06760e0d2e453dec52b3b3e2d4 (patch) | |
tree | 0e0d1e2e7a762b441771d8f8d152c62fdfd08c2d | |
parent | 42b411995caf218ab8fb0506ad219a69eba36598 (diff) | |
parent | 4cc4b33f71d3982df404fceb4405d656c538bc74 (diff) | |
download | ffmpeg-845bf99312d93d06760e0d2e453dec52b3b3e2d4.tar.gz |
Merge commit '4cc4b33f71d3982df404fceb4405d656c538bc74'
* commit '4cc4b33f71d3982df404fceb4405d656c538bc74':
build: Add proper infrastructure for adding and checking host CPPFLAGS
Conflicts:
Makefile
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | common.mak | 2 | ||||
-rwxr-xr-x | configure | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/common.mak b/common.mak index c42ea9ff74..d6cb5f6aec 100644 --- a/common.mak +++ b/common.mak @@ -32,7 +32,7 @@ ASFLAGS := $(CPPFLAGS) $(ASFLAGS) CXXFLAGS += $(CPPFLAGS) $(CFLAGS) YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm -HOSTCCFLAGS = $(IFLAGS) $(HOSTCFLAGS) +HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) define COMPILE @@ -255,6 +255,7 @@ Advanced options (experts only): --ld=LD use linker LD [$ld_default] --host-cc=HOSTCC use host C compiler HOSTCC --host-cflags=HCFLAGS use HCFLAGS when compiling for host + --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host --host-ld=HOSTLD use host linker HOSTLD --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host --host-libs=HLIBS use libs HLIBS when linking for host @@ -699,6 +700,10 @@ add_extralibs(){ prepend extralibs $($ldflags_filter "$@") } +add_host_cppflags(){ + append host_cppflags "$@" +} + add_host_cflags(){ append host_cflags $($host_cflags_filter "$@") } @@ -1066,6 +1071,13 @@ check_host_cc(){ check_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC } +check_host_cppflags(){ + log check_host_cppflags "$@" + check_host_cc "$@" <<EOF && append host_cppflags "$@" +int x; +EOF +} + check_host_cflags(){ log check_host_cflags "$@" set -- $($host_cflags_filter "$@") @@ -1569,6 +1581,7 @@ CMDLINE_SET=" CMDLINE_APPEND=" extra_cflags extra_cxxflags + host_cppflags " # code dependency declarations @@ -2153,7 +2166,8 @@ HOSTCC_C='-c' HOSTCC_O='-o $@' HOSTLD_O='-o $@' -host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g' +host_cflags='-O3 -g' +host_cppflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600' host_libs='-lm' host_cflags_filter=echo host_ldflags_filter=echo @@ -4421,6 +4435,7 @@ AS_DEPFLAGS=$AS_DEPFLAGS HOSTCC=$host_cc HOSTLD=$host_ld HOSTCFLAGS=$host_cflags +HOSTCPPFLAGS=$host_cppflags HOSTEXESUF=$HOSTEXESUF HOSTLDFLAGS=$host_ldflags HOSTLIBS=$host_libs |