This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
no multiarch build issues
- From: Andi Kleen <andi at firstfloor dot org>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: Andi Kleen <andi at firstfloor dot org>, Carlos O'Donell <carlos at redhat dot com>, Andreas Jaeger <aj at suse dot com>, libc-alpha at sourceware dot org, Torvald Riegel <triegel at redhat dot com>, Rich Felker <dalias at aerifal dot cx>, Roland McGrath <roland at hack dot frob dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Tue, 2 Jul 2013 23:21:59 +0200
- Subject: no multiarch build issues
- References: <51D2121F dot 4020708 at redhat dot com> <51D27A43 dot 6020305 at suse dot com> <51D2ED73 dot 1090603 at redhat dot com> <20130702155326 dot GA6123 at two dot firstfloor dot org> <20130702171843 dot GA6555 at x4> <20130702201117 dot GB6123 at two dot firstfloor dot org> <20130702202122 dot GA518 at x4> <20130702203505 dot GC6123 at two dot firstfloor dot org> <20130702204300 dot GB518 at x4> <20130702211320 dot GC518 at x4>
On Tue, Jul 02, 2013 at 11:13:20PM +0200, Markus Trippelsdorf wrote:
> On 2013.07.02 at 22:43 +0200, Markus Trippelsdorf wrote:
> > 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
>
> This is fixed by the following patch. Glibc now builds without errors.
But you just didn't specify --enable-lock-elision right?
I don't think that's the correct fix, it is now completely disabled.
>
> diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
> index 118cfa7..5fa2268 100644
> --- a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
> +++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
> @@ -70,8 +70,8 @@ elision_init (int argc __attribute__ ((unused)),
> char **argv __attribute__ ((unused)),
> char **environ)
> {
> - __elision_available = HAS_RTM;
> #ifdef ENABLE_LOCK_ELISION
> + __elision_available = HAS_RTM;
> __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
> __rwlock_rtm_enabled = __libc_enable_secure ? 0 : __elision_available;
> #endif
> --
> Markus
>
--
ak@linux.intel.com -- Speaking for myself only.