[FFmpeg-cvslog] configure: detect PGI compiler and set suitable flags

Mans Rullgard git at videolan.org
Thu Apr 19 21:45:53 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Thu Apr 19 00:42:56 2012 +0100| [e73ec9216bbd4d63fa30a51e90eff9169ad4dd17] | committer: Mans Rullgard

configure: detect PGI compiler and set suitable flags

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

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

 configure |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 2eb885b..172e1d6 100755
--- a/configure
+++ b/configure
@@ -2140,6 +2140,24 @@ elif $cc -v 2>&1 | grep -q Open64; then
     speed_cflags='-O2'
     size_cflags='-Os'
     filter_cflags='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
+elif $cc -V 2>&1 | grep -q Portland; then
+    cc_type=pgi
+    cc_version='AV_STRINGIFY(__PGIC__.__PGIC_MINOR__.__PGIC_PATCHLEVEL__)'
+    cc_ident="PGI $($cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')"
+    opt_common='-alias=ansi -Mlre -Mpre'
+    speed_cflags="-O3 -Mautoinline -Munroll=c:4 $opt_common"
+    size_cflags="-O2 -Munroll=c:1 $opt_common"
+    noopt_cflags="-O1"
+    filter_cflags=pgi_flags
+    pgi_flags(){
+        for flag; do
+            case $flag in
+                -fomit-frame-pointer) echo -Mnoframe ;;
+                -g)                   echo -gopt ;;
+                *)                    echo $flag ;;
+            esac
+        done
+    }
 fi
 
 test -n "$cc_type" && enable $cc_type ||



More information about the ffmpeg-cvslog mailing list