Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Oct 2012 20:07:39 -0400
From: Rich Felker <>
Subject: Re: musl mips fails to compile with gcc 3.4.6

On Wed, Oct 10, 2012 at 11:51:25PM +0200, John Spencer wrote:
> src/aio/aio_readwrite.c: In function `io_thread':
> ../arch/mips/pthread_arch.h:7: error: impossible constraint in `asm'
> __asm__ __volatile__ (".word 0x7c03e83b" : "=v" (self) );
> #ifdef __clang__
> -->
> #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ < 4))
> fixes it

I have a potential alternate fix: using

register pthread_t self __asm__("$3");

and "=r"(self) as the constraint. This should work on any gcc version
without incurring the extra cost of the clang-workaround. And it will
work with clang too if they ever fix their register allocator to work
with this kind of code.

Can you confirm whether or not it works?


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.