bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Baffled by cc -o in Make manual


From: Mike Gran
Subject: Re: Baffled by cc -o in Make manual
Date: Tue, 1 Aug 2017 18:01:57 +0000 (UTC)

On Tuesday, August 1, 2017, 10:31:15 AM PDT, Ray Foulkes <address@hidden> wrote:

> I am totally baffled as to what cc -o is doing there. Surely it should be ld??
> and then the -o is for "output" i.e. create "edit" as an executable.

The above command is correct.  On the GNU Linux and BSD systems, usually
one has the compiler call the linker using '-o', because calling ld directly is
actually pretty complicated and easy to get wrong.  Using the compiler to call the
linker is easier and less error prone.

This is a question about the compiler, 'gcc' or whatever, and not 'make' specifically.

-Mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]