public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Wilco Dijkstra" <wdijkstr@arm.com>
To: "'Joseph Myers'" <joseph@codesourcery.com>
Cc: "'GNU C Library'" <libc-alpha@sourceware.org>
Subject: RE: [PATCH 2/2] Remove ancient GCC string inlines
Date: Mon, 12 Oct 2015 12:54:00 -0000	[thread overview]
Message-ID: <000a01d104ed$0b7a9c00$226fd400$@com> (raw)
In-Reply-To: <alpine.DEB.2.10.1510121131000.16894@digraph.polyomino.org.uk>



> Joseph Myers wrote:
> On Mon, 12 Oct 2015, Wilco Dijkstra wrote:
> 
> > So what is the magic to do a cross build for 32-bit? I can't find anything in
> > the GLIBC documentation that gives the correct recipe to do this, and when I
> > try to force it to use 32-bit using -m32 -arch=i686 I only get configure and
> > build failures...
> 
> Assuming you have a compiler with working -m32 support (startup files etc.
> installed), you should set CC and CXX to include -m32, and use
> --host=i686-pc-linux-gnu when configuring.  If you want to treat it as a
> native build for testing purposes, --build=i686-pc-linux-gnu is a good
> idea as well.  This is in addition to usual configure options such as
> --prefix=/usr --enable-add-ons.

Thanks, that seems to pass the configure correctly. However it fails later
compiling tls code with either GCC 4.8.2 or trunk:

CC="/work/install/gcc_x64/bin/gcc -m32"
CXX="/work/install/gcc_x64/bin/g++ -m32"
CFLAGS="-O2"
CXXFLAGS="-O2"

export CFLAGS
export CXXFLAGS
export CC
export CXX

cd ${build}
${src}/configure --prefix=/usr --enable-add-ons --target=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--build=i686-pc-linux-gnu 
make -j20

It reports on latest GLIBC:

In file included from ../sysdeps/i386/nptl/tls.h:28:0,
                 from ../sysdeps/i386/i686/nptl/tls.h:33,
                 from ../include/errno.h:27,
                 from libc-tls.c:19:
libc-tls.c: In function '__libc_setup_tls':
../sysdeps/unix/sysv/linux/i386/sysdep.h:409:12: error: '__NR_set_thread_area' undeclared (first use
in this function)
     : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
            ^
../sysdeps/unix/sysv/linux/i386/sysdep.h:346:5: note: in expansion of macro
'INTERNAL_SYSCALL_MAIN_INLINE'
     INTERNAL_SYSCALL_MAIN_INLINE(name, err, 1, args)
     ^
../sysdeps/unix/sysv/linux/i386/sysdep.h:374:5: note: in expansion of macro
'INTERNAL_SYSCALL_MAIN_1'
     INTERNAL_SYSCALL_MAIN_##nr (name, err, args);         \
     ^
../sysdeps/i386/nptl/tls.h:213:16: note: in expansion of macro 'INTERNAL_SYSCALL'
      _result = INTERNAL_SYSCALL (set_thread_area, err, 1, &_segdescr.desc);   \
                ^
libc-tls.c:188:25: note: in expansion of macro 'TLS_INIT_TP'
   const char *lossage = TLS_INIT_TP ((char *) tlsblock + tcb_offset);


This is a common error (lots of hits on Google) but nobody seems to offer an actual fix...

Wilco


  reply	other threads:[~2015-10-12 12:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 15:53 Wilco Dijkstra
2015-10-09 16:01 ` Joseph Myers
2015-10-09 16:40   ` Wilco Dijkstra
2015-10-09 17:01     ` Joseph Myers
2015-10-12 11:20       ` Wilco Dijkstra
2015-10-12 11:33         ` Joseph Myers
2015-10-12 12:54           ` Wilco Dijkstra [this message]
2015-10-12 13:00             ` Joseph Myers
2015-10-12 18:06               ` Wilco Dijkstra
2015-10-12 18:10                 ` Joseph Myers
2015-10-13 15:08                   ` Wilco Dijkstra
2015-10-13 15:21                     ` Joseph Myers
2015-10-13 16:33                       ` Wilco Dijkstra
2015-10-13 17:34                       ` Andreas Schwab
2015-10-13 17:29                         ` Joseph Myers
2015-10-09 17:07     ` Joseph Myers
     [not found] <FF1B652685AE434E94C2981B001E196529AF7B0DBC@GEORGE.Emea.Arm.com>
2015-12-16 13:08 ` Wilco Dijkstra
2015-12-16 18:38   ` Joseph Myers
2015-12-17 13:48     ` Wilco Dijkstra
2015-12-17 20:33       ` Joseph Myers
2015-12-17 22:59         ` Wilco Dijkstra
2016-02-19 17:20 Wilco Dijkstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000a01d104ed$0b7a9c00$226fd400$@com' \
    --to=wdijkstr@arm.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).