This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Decision time: Intel TSX Lock elision for glibc.


On 2013.07.02 at 22:35 +0200, Andi Kleen wrote:
> > Unfortunately no:
> > 
> > ../nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c:21:23: fatal error:
> > init-arch.h: No such file or directory
> 
> Odd. What distribution is that? Are you building without multiarch?

Gentoo without multiarch:

 ~/glibc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib
 --with-headers=/usr/include --enable-add-ons=nptl,libidn
 --enable-kernel=3.9 --with-tls --with-__thread --enable-bind-now
 --without-gd --without-cvs --disable-profile --disable-multi-arch

The following patch fixes the issue above:

diff --git a/nptl/sysdeps/unix/sysv/linux/x86/Makefile b/nptl/sysdeps/unix/sysv/linux/x86/Makefile
index 61b7552..a361578 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/nptl/sysdeps/unix/sysv/linux/x86/Makefile
@@ -1,3 +1,6 @@
-libpthread-sysdep_routines += init-arch
+CFLAGS-elision-lock.c = -I../sysdeps/x86_64/multiarch
+CFLAGS-elision-unlock.c = -I../sysdeps/x86_64/multiarch
+CFLAGS-elision-timed.c = -I../sysdeps/x86_64/multiarch
+CFLAGS-elision-trylock.c = -I../sysdeps/x86_64/multiarch
 libpthread-sysdep_routines += elision-lock elision-unlock elision-timed \
 			      elision-trylock

But the build now fails later:

/var/tmp/glibc-build/nptl/libpthread_pic.a(elision-lock.os): In function
`elision_init':
/home/markus/glibc/nptl/../nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c:73:
undefined reference to `__get_cpu_features'
collect2: error: ld returned 1 exit status
make[2]: *** [/var/tmp/glibc-build/nptl/libpthread.so] Error 1

-- 
Markus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]