Commit 6c3fa06a authored by Mans Rullgard's avatar Mans Rullgard

configure: add filtering of host cflags/ldflags

This is in preparation for supporting host compilers with
non-standard flags.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 68485d1f
...@@ -604,6 +604,14 @@ add_extralibs(){ ...@@ -604,6 +604,14 @@ add_extralibs(){
prepend extralibs $($ldflags_filter "$@") prepend extralibs $($ldflags_filter "$@")
} }
add_host_cflags(){
append host_cflags $($host_cflags_filter "$@")
}
add_host_ldflags(){
append host_ldflags $($host_ldflags_filter "$@")
}
check_cmd(){ check_cmd(){
log "$@" log "$@"
"$@" >> $logfile 2>&1 "$@" >> $logfile 2>&1
...@@ -878,6 +886,7 @@ check_host_cc(){ ...@@ -878,6 +886,7 @@ check_host_cc(){
check_host_cflags(){ check_host_cflags(){
log check_host_cflags "$@" log check_host_cflags "$@"
set -- $($host_cflags_filter "$@")
check_host_cc "$@" <<EOF && append host_cflags "$@" check_host_cc "$@" <<EOF && append host_cflags "$@"
int x; int x;
EOF EOF
...@@ -1717,6 +1726,8 @@ CC_O='-o $@' ...@@ -1717,6 +1726,8 @@ CC_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g' host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
host_libs='-lm' host_libs='-lm'
host_cflags_filter=echo
host_ldflags_filter=echo
target_path='$(CURDIR)' target_path='$(CURDIR)'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment