Re: Clang as default compiler November 4th

看板FB_current作者時間13年前 (2012/09/12 07:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串45/86 (看更多)
On Tue, Sep 11, 2012 at 1:44 PM, Mark Linimon <linimon@lonesome.com> wrote: > On Tue, Sep 11, 2012 at 10:07:04AM +0100, David Chisnall wrote: >> There is some logic in the clang driver already for knowing when it is >> invoked as gcc. I'd be quite tempted to make gcc a symlink to clang >> and make clang default to gnu89 when invoked in that way. > > And how then does a port say "I don't compile with clang no matter how > it is invoked"? Here's one way: $ clang -dumpspecs clang: error: unsupported option '-dumpspecs' clang: error: no input files $ gcc -dumpspecs | grep -q gcc && echo "gotcha" gotcha $ Also, $ cat Makefile ..if !empty(CC:M*clang*) || !empty(CXX:M*clang*) IGNORE= does not compile with clang ..warning ${IGNORE} ..endif all: $ make CXX=clang++ "Makefile", line 3: warning: does not compile with clang $ make CXX=g++ $ But I figured that's probably done elsewhere I bit more sanely. Thanks, -Garrett _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GJyAkfL (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1GJyAkfL (FB_current)