mailing list of musl libc
 help / color / mirror / code / Atom feed
* question about xmmintrin.h
@ 2013-06-06 17:50 Jens
  2013-06-06 20:52 ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: Jens @ 2013-06-06 17:50 UTC (permalink / raw)
  To: musl


x264 wants the gcc include header xmmintrin.h.

It seems like it is not picked up when using the musl-gcc wrapper.

In my case gcc is compiled with uclibc.

xmmintrin.h  is used for MMX, SSE and the like, if I understand things 
correctly.

Any suggestions on how to go get CPU-specific optimizations when using 
musl ?

(x264 works without it, but a bit slow).

Thanks,
Jens



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about xmmintrin.h
  2013-06-06 17:50 question about xmmintrin.h Jens
@ 2013-06-06 20:52 ` Szabolcs Nagy
  2013-06-07  1:12   ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2013-06-06 20:52 UTC (permalink / raw)
  To: musl

* Jens <jensl@laas.mine.nu> [2013-06-06 19:50:46 +0200]:
> 
> x264 wants the gcc include header xmmintrin.h.
> 
> It seems like it is not picked up when using the musl-gcc wrapper.
> 

yes the compiler provides some headers which should be available
with musl-gcc

as a workaround you may try

CFLAGS="-isystem `musl-gcc -print-file-name=include`"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about xmmintrin.h
  2013-06-06 20:52 ` Szabolcs Nagy
@ 2013-06-07  1:12   ` Rich Felker
  2013-06-07 13:33     ` Jens
  0 siblings, 1 reply; 4+ messages in thread
From: Rich Felker @ 2013-06-07  1:12 UTC (permalink / raw)
  To: musl

On Thu, Jun 06, 2013 at 10:52:48PM +0200, Szabolcs Nagy wrote:
> * Jens <jensl@laas.mine.nu> [2013-06-06 19:50:46 +0200]:
> > 
> > x264 wants the gcc include header xmmintrin.h.
> > 
> > It seems like it is not picked up when using the musl-gcc wrapper.
> > 
> 
> yes the compiler provides some headers which should be available
> with musl-gcc
> 
> as a workaround you may try
> 
> CFLAGS="-isystem `musl-gcc -print-file-name=include`"

The gcc include directory needs to be _after_ the libc include
directory in order not to interfere with the libc headers. I think
this could best be accomplished in the spec file for the wrapper.

By the way, the same order issue exists for native compilers. I just
rm the harmful gcc headers when installing, but it would be nice if
the patch for musl support in gcc could fix the include order so that
the libc include directory is searched before the gcc one rather than
after.

Rich



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question about xmmintrin.h
  2013-06-07  1:12   ` Rich Felker
@ 2013-06-07 13:33     ` Jens
  0 siblings, 0 replies; 4+ messages in thread
From: Jens @ 2013-06-07 13:33 UTC (permalink / raw)
  To: musl



On Thu, 6 Jun 2013, Rich Felker wrote:

> On Thu, Jun 06, 2013 at 10:52:48PM +0200, Szabolcs Nagy wrote:
>> * Jens <jensl@laas.mine.nu> [2013-06-06 19:50:46 +0200]:
>>>
>>> x264 wants the gcc include header xmmintrin.h.
>>>
>>> It seems like it is not picked up when using the musl-gcc wrapper.
>>>
>>
>> yes the compiler provides some headers which should be available
>> with musl-gcc
>>
>> as a workaround you may try
>>
>> CFLAGS="-isystem `musl-gcc -print-file-name=include`"
>
> The gcc include directory needs to be _after_ the libc include
> directory in order not to interfere with the libc headers. I think
> this could best be accomplished in the spec file for the wrapper.

Thanks, modifying the spec file worked.

*cpp_options:
-nostdinc -isystem /opt/musl/include -isystem /usr/gcc/include 
%(old_cpp_options)

*cc1:
%(cc1_cpu) -nostdinc -isystem /opt/musl/include -isystem /usr/gcc/include

Not sure if the entry in cpp_options is needed.

Cheers,
Jens

>
> By the way, the same order issue exists for native compilers. I just
> rm the harmful gcc headers when installing, but it would be nice if
> the patch for musl support in gcc could fix the include order so that
> the libc include directory is searched before the gcc one rather than
> after.
>
> Rich
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-07 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-06 17:50 question about xmmintrin.h Jens
2013-06-06 20:52 ` Szabolcs Nagy
2013-06-07  1:12   ` Rich Felker
2013-06-07 13:33     ` Jens

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).