t9c: support clang on Mac - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b0ae8a46a0e40773d306906dd0fd9b33832e7086
 (DIR) parent 0cfb376070a4bef7b4168a9795e025437e1be79f
 (HTM) Author: Russ Cox <rsc@swtch.com>
       Date:   Sun, 21 Oct 2012 12:01:13 -0400
       
       9c: support clang on Mac
       
       R=rsc
       http://codereview.appspot.com/6744055
       
       Diffstat:
         M bin/9c                              |      11 +++++++++++
       
       1 file changed, 11 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/bin/9c b/bin/9c
       t@@ -65,7 +65,10 @@ useclang()
                        -Wno-unknown-pragmas \
                        -Wno-empty-body \
                        -Wno-unused-value \
       +                -Wno-array-bounds \
       +                -Wno-gnu-designator \
                        -fsigned-char \
       +                -fno-caret-diagnostics \
                "
                cflags="$ngflags -g"
        }
       t@@ -75,8 +78,16 @@ case "$tag" in
        *FreeBSD*gcc*)        usegcc ;;
        *FreeBSD*clang*)        useclang ;;
        *BSD*)        usegcc ;;
       +*Darwin-x86_64*clang*)
       +                useclang
       +                cflags="$ngflags -g3 -m64"
       +                ;;
        *Darwin-x86_64*) usegcc
                        cflags="$ngflags -g3 -no-cpp-precomp -m64" ;;
       +*Darwin*clang*)
       +                useclang
       +                cflags="$ngflags -g3 -m32"
       +                ;;
        *Darwin*)        usegcc 
                        cflags="$ngflags -g3 -no-cpp-precomp -m32" ;;
        *HP-UX*)        cc=${CC9:-cc}; cflags="-g -O -c -Ae" ;;