From owner-freebsd-questions@freebsd.org Wed Oct 16 12:25:43 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4749D163DEF for ; Wed, 16 Oct 2019 12:25:43 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from sapphire.magnetkern.de (sapphire.magnetkern.de [185.228.139.199]) by mx1.freebsd.org (Postfix) with ESMTP id 46tWjK6v0dz4fPt for ; Wed, 16 Oct 2019 12:25:41 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from titanium (p57A35420.dip0.t-ipconnect.de [87.163.84.32]) by sapphire.magnetkern.de (Postfix) with ESMTPSA id 3F3E79C1E for ; Wed, 16 Oct 2019 12:25:30 +0000 (UTC) Date: Wed, 16 Oct 2019 14:25:29 +0200 From: Jan Behrens 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> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46tWjK6v0dz4fPt X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jbe-mlist@magnetkern.de designates 185.228.139.199 as permitted sender) smtp.mailfrom=jbe-mlist@magnetkern.de X-Spamd-Result: default: False [-1.78 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-0.96)[-0.956,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; DMARC_NA(0.00)[magnetkern.de]; MV_CASE(0.50)[]; IP_SCORE(-0.13)[asn: 197540(-0.62), country: DE(-0.01)]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[32.84.163.87.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:197540, ipnet:185.228.136.0/22, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2019 12:25:43 -0000 On Wed, 16 Oct 2019 13:44:25 +0200 David Demelier 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