Date: Wed, 24 Feb 2016 13:54:25 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Raphael Kubo da Costa <rakuco@FreeBSD.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: clang -pg, libm and the _end symbol Message-ID: <1CEB597F-1446-4E73-B5E2-5E5A4B3E9313@FreeBSD.org> In-Reply-To: <86povmbb7c.fsf@FreeBSD.org> References: <86povmbb7c.fsf@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_1D12CB61-D311-488D-8BD3-8B58193317CC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 24 Feb 2016, at 12:27, Raphael Kubo da Costa <rakuco@FreeBSD.org> wrote: > > I'm reviewing an update to the textproc/miller port in bug 207194, and > noticed it does some ugly things in post-configure to seemingly > work around the following problem (on 11-HEAD at least): > > % echo 'int main(void) { return 0; }' > foo.c > % clang -pg foo.c -lm > /usr/bin/ld: undefined reference to symbol `_end' (try adding -lc) > //lib/libc.so.7: could not read symbols: Bad value > cc: error: linker command failed with exit code 1 (use -v to see > invocation) Try using: clang -pg foo.c -lm_p That works for me (also with gcc). -Dimitry --Apple-Mail=_1D12CB61-D311-488D-8BD3-8B58193317CC Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.29 iEYEARECAAYFAlbNqBYACgkQsF6jCi4glqOhrgCeOBBciOqLUtG1+0Ycv36tDPGN txYAn0AZ8f6/jOvm/b9o+j12txoZCsDx =xoBd -----END PGP SIGNATURE----- --Apple-Mail=_1D12CB61-D311-488D-8BD3-8B58193317CC--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1CEB597F-1446-4E73-B5E2-5E5A4B3E9313>