Re: clang -pg, libm and the _end symbol

2016-02-24 Thread Raphael Kubo da Costa
Konstantin Belousov writes: > On Wed, Feb 24, 2016 at 01:54:25PM +0100, Dimitry Andric wrote: >> On 24 Feb 2016, at 12:27, Raphael Kubo da Costa 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 see

Re: clang -pg, libm and the _end symbol

2016-02-24 Thread Raphael Kubo da Costa
Konstantin Belousov writes: > This is probably not a clang bug, but could be. More likely it is ld problem. > I do not want to dig into the issue, but I can provide you some points to > look at further. > > The _end symbol is magic, it is defined as the address of the last byte > + 1 of zero-ini

Re: clang -pg, libm and the _end symbol

2016-02-24 Thread Konstantin Belousov
On Wed, Feb 24, 2016 at 01:54:25PM +0100, Dimitry Andric wrote: > On 24 Feb 2016, at 12:27, Raphael Kubo da Costa 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

Re: clang -pg, libm and the _end symbol

2016-02-24 Thread Dimitry Andric
On 24 Feb 2016, at 12:27, Raphael Kubo da Costa 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; }'

Re: clang -pg, libm and the _end symbol

2016-02-24 Thread Konstantin Belousov
On Wed, Feb 24, 2016 at 12:27:03PM +0100, Raphael Kubo da Costa 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) {

clang -pg, libm and the _end symbol

2016-02-24 Thread Raphael Kubo da Costa
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