Browse code

ARM: detect armcc compiler and enable gcc mode

Originally committed as revision 17829 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2009/03/06 06:20:08
Showing 1 changed files
... ...
@@ -1389,6 +1389,16 @@ elif $cc -V 2>/dev/null | grep -q Compaq; then
1389 1389
     DEPEND_CMD='$(CC) $(CFLAGS) -M $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
1390 1390
     debuglevel=3
1391 1391
     add_ldflags -Wl,-z,now # calls to libots crash without this
1392
+elif $cc --vsn 2>/dev/null | grep -q RVCT; then
1393
+    test -d "$sysroot" || die "No valid sysroot specified."
1394
+    cc_type=armcc
1395
+    armcc_conf="$PWD/armcc.conf"
1396
+    $cc --arm_linux_configure                 \
1397
+        --arm_linux_config_file="$armcc_conf" \
1398
+        --configure_sysroot="$sysroot"        \
1399
+        --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
1400
+        die "Error creating armcc configuration file."
1401
+    cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
1392 1402
 fi
1393 1403
 
1394 1404
 test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"