[FFmpeg-cvslog] configure: respect CC_O setting in check_cc

Mans Rullgard git at videolan.org
Mon Jul 23 21:55:19 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Fri Jul 20 22:22:18 2012 +0100| [b2704a65d513f63d12e705e941abfbc62676c8fa] | committer: Mans Rullgard

configure: respect CC_O setting in check_cc

Use compiler-specific replacements for the -o flag in check_cc.
This makes tests work properly with compilers using non-standard
flags.

The tms470 flags are updated to work with this scheme.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b2704a65d513f63d12e705e941abfbc62676c8fa
---

 configure |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index dd67f89..f00eddd 100755
--- a/configure
+++ b/configure
@@ -617,11 +617,15 @@ check_cmd(){
     "$@" >> $logfile 2>&1
 }
 
+cc_o(){
+    eval printf '%s\\n' $CC_O
+}
+
 check_cc(){
     log check_cc "$@"
     cat > $TMPC
     log_file $TMPC
-    check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
+    check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c $(cc_o $TMPO) $TMPC
 }
 
 check_cpp(){
@@ -2094,12 +2098,10 @@ elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
 elif $cc -version 2>/dev/null | grep -q TMS470; then
     cc_type=tms470
     cc_ident=$($cc -version | head -n1 | tr -s ' ')
-    cc="$cc --gcc --abi=eabi -eo=.o -mc -me"
-    CC_O='-fr=$(@D)'
+    cc="$cc --gcc --abi=eabi -me"
+    CC_O='-fe=$@'
     as_default="${cross_prefix}gcc"
     ld_default="${cross_prefix}gcc"
-    TMPO=$(basename $TMPC .c).o
-    append TMPFILES $TMPO
     add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=
     CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)'
     AS_DEPFLAGS='-MMD'



More information about the ffmpeg-cvslog mailing list