Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 May 2013 12:30:58 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Kennith Caudill <ken@furosys.com>, freebsd-toolchain@freebsd.org
Subject:   Re: Miscellaneous questions
Message-ID:  <518391E2.5000002@FreeBSD.org>
In-Reply-To: <CC4D1CB7-1F31-4B46-B0A8-91BBC4F7065A@furosys.com>
References:  <CC4D1CB7-1F31-4B46-B0A8-91BBC4F7065A@furosys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-05-03 03:08, Kennith Caudill wrote:
> 1.) Processor affinity with C++11 threads
>
> Will there be a standard non-hackish way to set processor affinity on C++11 std::threads?
>
> This would be a great feature imho. I admit that I haven't researched this and maybe it's
> possible to use the pthreads API to accomplish this but I'd prefer a more idiomatic choice.

As far as I understand the standard, there is no portable way to do it.
For libc++, you can call std::thread::native_handle() to retrieve the
implementation-defined thread type, which is just pthread_t.

Maybe in C++14 or C++17, just keep on lobbying... :-)


> 2.) Alternative linkers
>
> Is there a document available detailing the current feasible linkers and their status?
>
> e.g., is it possible to build a working system with mclinker, gold, etc., and what is the
> process for accomplishing this? I'm willing to write up detailed guides if someone
> will provide the broad strokes of how to test this out.

I am not aware of any documentation, but there have been a few efforts,
by different people.  In all cases, it seems to be highly experimental,
and a lot of things might still be broken.  The most interesting
challenge is linking the kernel, of course.  And custom linker scripts,
written specifically for GNU ld.


> 3.) DWARF support
>
> My application returns tens of thousands of link warnings when built with -g:
>
> /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 25.
>
> I assume this is a DWARF4 thing,  relating to my second question.

I fixed this in head, in r248802, and merged it to stable/9 in r249040,
to stable/8 in r249058, and to stable/7 in r249059.  If you update your
binutils, the message should go away.

This does not mean full DWARF4 support, though.  We need binutils and
gdb replacements for that, especially for the linker (and possibly the
assembler, but the assembler could already be mostly replaced with
clang's integrated assembler).  Alternatively, we could attempt to
support using more recent binutils from ports.


> 4.) lldb status
>
> Is this described in detail anywhere?

Last I know, Kip Macy was working on this for a time, but he disappeared
again.  I am not sure of any other efforts.

-Dimitry



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