public inbox for
 help / color / mirror / Atom feed
* ../nptl/sysdeps/x86_64/tls.h:71:3: error: unknown type name '__m128
@ 2013-05-23  7:15 Игорь Пашев
  0 siblings, 0 replies; only message in thread
From: Игорь Пашев @ 2013-05-23  7:15 UTC (permalink / raw)
  To: libc-ports

Hi, all!

First off, i'm going forward porting glibc on illumos kernel (aka OpenSolaris).
The port is based on glibc 2.16.

I know, that __m128 was replaced by hand-made type in
nptl/sysdeps/x86_64/tls.h [1], because rtld
is compiled without sse.

But I'd like to figure out how it worked previously, and whether there
are other bugs in my port.

Here is compiler message:
============= >8 ===================

gcc ../sysdeps/x86_64/multiarch/strstr.c -c -std=gnu99 -fgnu89-inline
-O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants
-frounding-math -g -Wstrict-
  -msse4      -I../include -I/home/pashev/glibc/build/string
-I../nptl/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64 -I../np
-I../sysdeps/unix/sysv/solaris2/kopensolaris-gnu/x86_64 -I../np
unix/sysv/solaris2/kopensolaris-gnu -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../sysdeps/unix/sysv/solaris2/kopensolaris-gnu
-I../sysdeps/gnu -I../sy
inet -I../nptl/sysdeps/unix/sysv/solaris2
-I../sysdeps/unix/sysv/solaris2 -I../nptl/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../n
/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64
-I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch
-I../sysdeps/x86_64/fpu -I..
6_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64
-I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysde
dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64
-I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl  -I.. -I../libio
lude/libc-symbols.h       -o /home/pashev/glibc/build/string/strstr.o
-MD -MP -MF /home/pashev/glibc/build/string/strstr.o.dt -MT
In file included from
                 from ../include/errno.h:22,
                 from ../sysdeps/x86_64/multiarch/strstr.c:20:
../nptl/sysdeps/x86_64/tls.h:71:3: error: unknown type name '__m128'
============= 8< ===================

The "nptl/sysdeps/x86_64/tls.h" includes "xmmintrin.h" for __m128 [2],
but from the above output it is obvious, that is already included. But
this file defines __m128
*after* including mm_malloc.h and thus errno.h and tls.h.
So "xmmintrin.h" is not included in "nptl/sysdeps/x86_64/tls.h".

Here is top of /usr/lib/gcc/x86_64-pc-solaris2.11/4.7/include/xmmintrin.h:
================= >8 ===============

#ifndef __SSE__
# error "SSE instruction set not enabled"

/* We need type definitions from the MMX header file.  */
#include <mmintrin.h>

/* Get _mm_malloc () and _mm_free ().  */
#include <mm_malloc.h>

/* The Intel API is flexible enough that we must allow aliasing with other
   vector types, and their scalar components.  */
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
================= 8< ===============

The "/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/include/mm_malloc.h" file
includes errno.h for one of inline functions.
I've compared it with linux mm_malloc.h: the latter does not include errno.h.

So the problem is specific to OpenSolaris.

What is the best way to fix it? Is it safe to backport [1] ? Should I
fix GCC headers?
Or maybe include/errno.h is not that errno.h file which should be included?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-23  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-23  7:15 ../nptl/sysdeps/x86_64/tls.h:71:3: error: unknown type name '__m128 Игорь Пашев

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 read-only IMAP folder(s) and NNTP newsgroup(s).