On Wed, Dec 23, 2015 at 11:59 PM, John T. Chung <jch...@nyquest.com> wrote:

> However, I don't see a "clang" executable. I only see this in
> /opt/local/bin
>

We support multiple clang versions that can be uinstalled concurrently. If
you want to use this version as clang then you want "port select":

    sudo port select --set clang mp-clang-3.4

(use "port select --list clang" to see what versions are available)

I assumed the compiler would be clang-mp-3.4 but when I attempted to
> compile a "HELLO WORLD" C program, I got this:
>
> Macintosh-2:build jchung$ clang-mp-3.4 test.c
> test.c:2:1: warning: type specifier missing, defaults to 'int'
> [-Wimplicit-int]
> main() {
> ^~~~
> 1 warning generated.
> gcc: error: unrecognized command line option '-arch'
> clang: error: assembler (via gcc) command failed with exit code 1 (use -v
> to see invocation)
>
> why is it still calling "gcc"
>

Because the compiler itself produces assembly language, and the only way it
knows how to run an assembler on your system to convert that to object code
is via Apple's gcc. But it sounds like it's using it incorrectly, or you
have a "gcc" installed somewhere that does not support Apple's additions.

-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to