Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2019 14:25:29 +0200
From:      Jan Behrens <jbe-mlist@magnetkern.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Problems with ld, libc, and "struct stat"
Message-ID:  <20191016142529.cf8a589e1e9db6d30ea303a4@magnetkern.de>
In-Reply-To: <0f1c70a0-c99a-e494-cf63-d214301f24a1@malikania.fr>
References:  <20191015204400.e33c8f62af711e829288ddae@magnetkern.de> <47c27361-4e74-05d1-3343-e39526730d85@malikania.fr> <20191016131552.6fda34292987e22ae78072cc@magnetkern.de> <0f1c70a0-c99a-e494-cf63-d214301f24a1@malikania.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Oct 2019 13:44:25 +0200
David Demelier <markand@malikania.fr> wrote:

> Le 16/10/2019 à 13:15, Jan Behrens a écrit :
> > [...]
> > When I search the man page for "cc" (clang - the Clang C, C++, and
> > Objective-C compiler), I even do not find any "-shared" option at all.
> 
> -shared is a linker option, it's documented in gcc but basically clang 
> is usually retro-compatible with most of the GCC option. In fact, 
> -shared is just a shortcut to pass the appropriate shared arguments to 
> the underlying linker in that case -Bshareable (but may add additional 
> options as well).
> [...]

Can I rely on "-shared" being available also in future versions of
clang/cc? Or is this a deprecated "gcc compatibility" option?

It is listed on llvm.org as command line option:
https://releases.llvm.org/6.0.1/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-shared
But it does not come with any description on that website.

Building shared libraries is an important feature, so I'm a bit
surprised there is no documentation on on the "cc -shared" invocation
(other than GCC's documentation), or maybe I'm just looking at the
wrong places? Maybe you or someone else knows where else could I find
any documentation on this?

Regards
Jan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191016142529.cf8a589e1e9db6d30ea303a4>