Clang equivalents to gcc options

Polytropon freebsd at edvax.de
Wed Oct 11 06:51:59 UTC 2017


On Tue, 10 Oct 2017 18:00:16 -0500, Antonio Olivares wrote:
> I kindly ask for equivalent options when compiling c programs.
> I was able to find an equivalent clang for
> $ c++ -o prog prog.cpp
> $ clang++ -o prog prog.cpp
> Will do the job, but for say
> $ gcc -o
> What would the equivalent clang expression be?

It's the same option: -o <outfile>; just specifying -o without
anything else results in an error (both gcc and clang).

Example:

	% gcc -o
	gcc: argument to '-o' is missing

>From the clang documentation:

	-o <file>
		Write output to file.

https://clang.llvm.org/docs/CommandGuide/clang.html


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list