Allow filtering of flags passed to compiler and assembler
This can be used to map gcc-type flags to equivalents with other compilers. Originally committed as revision 19421 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
647c2356a6
commit
caf458dda4
16
configure
vendored
16
configure
vendored
@ -513,15 +513,15 @@ append(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_cppflags(){
|
add_cppflags(){
|
||||||
append CPPFLAGS "$@"
|
append CPPFLAGS $($filter_cppflags "$@")
|
||||||
}
|
}
|
||||||
|
|
||||||
add_cflags(){
|
add_cflags(){
|
||||||
append CFLAGS "$@"
|
append CFLAGS $($filter_cflags "$@")
|
||||||
}
|
}
|
||||||
|
|
||||||
add_asflags(){
|
add_asflags(){
|
||||||
append ASFLAGS "$@"
|
append ASFLAGS $($filter_asflags "$@")
|
||||||
}
|
}
|
||||||
|
|
||||||
add_ldflags(){
|
add_ldflags(){
|
||||||
@ -589,14 +589,16 @@ check_ld(){
|
|||||||
|
|
||||||
check_cppflags(){
|
check_cppflags(){
|
||||||
log check_cppflags "$@"
|
log check_cppflags "$@"
|
||||||
check_cc "$@" <<EOF && add_cppflags "$@"
|
set -- $($filter_cppflags "$@")
|
||||||
|
check_cc "$@" <<EOF && append CPPFLAGS "$@"
|
||||||
int x;
|
int x;
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
check_cflags(){
|
check_cflags(){
|
||||||
log check_cflags "$@"
|
log check_cflags "$@"
|
||||||
check_cc "$@" <<EOF && add_cflags "$@"
|
set -- $($filter_cflags "$@")
|
||||||
|
check_cc "$@" <<EOF && append CFLAGS "$@"
|
||||||
int x;
|
int x;
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@ -1507,6 +1509,10 @@ test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
|
|||||||
: ${ld_default:=$cc}
|
: ${ld_default:=$cc}
|
||||||
set_default as dep_cc ld
|
set_default as dep_cc ld
|
||||||
|
|
||||||
|
: ${filter_cflags:=echo}
|
||||||
|
: ${filter_cppflags:=echo}
|
||||||
|
: ${filter_asflags:=echo}
|
||||||
|
|
||||||
add_cflags $extra_cflags
|
add_cflags $extra_cflags
|
||||||
add_asflags $extra_cflags
|
add_asflags $extra_cflags
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user