This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

"inconsistent operand constraints in an 'asm'"; newlib 1.16 & gcc 4.3.1 on gnu/linux


Greetings, readers of newlib at sourceware.org

I am finding that newlib 1.16.0 cannot be built with gcc-4.3.1 using my
best efforts at setting everything up right.

newlib/libc/sys/linux/linuxthreads/spinlock.c kills the build with the
error "inconsistent operand constraints in an 'asm'" (see full trace
below).

I'm not a familiar name to long-time readers; I've just subscribed. I've
been using Cygwin for about a decade and have managed to get myself into
a lot of `tight spots' in development. I'm in one now and maybe the List
could help me out. If not, maybe down the road I've helped someone else
out by posting.

I'm using an Ubuntu GNU/Linux system to try to build GCC-4.3.1 and
newlib 1.16.0 in a "unified tree" configuration (I'm putting that in
quotes because this is fairly new to me).  The machine is a core2duo
(intel) box. The build is "native", not cross.  Details about the
installed system GCC being used and the system libc are provided below
also.

Before starting to build gcc+newlib ("the build") I configured, built
and installed binutils-2.18 and prepended the install dir location for those
to my $PATH env var.

I unpacked gcc-4.3.1 and separately unpacked newlib 1.16.0; then I
copied the subdirs "newlib" and "libgloss" from newlib's tree into
gcc-4.3.1/gcc/.

The toplevel gcc build (that propagates to sub-levels) was configured
like this:

  /home/somian/Development/BigTools/GNUfundamentals/sourcetrees/gcc-4.3.1/configure --prefix=/usr/local/xbldt --exec-prefix=/usr/local/xbldt/i686-pc-linux-gnu.newlib --enable-languages=c --with-newlib --enable-newlib-hw-fp --enable-newlib-io-c99-formats --enable-newlib-io-long-long --enable-newlib-io-long-double --enable-newlib-iconv --disable-nls

My kernel description etc is:
  Linux bessemer 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux 

GCC is:
 gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

GlibC is:
 GNU C Library stable release version 2.6.1, by Roland McGrath et al.
 Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.
 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE.
 Compiled by GNU CC version 4.2.1 (Ubuntu 4.2.1-5ubuntu4).
 Compiled on a Linux >>2.6.15.7<< system on 2007-10-24.
 Available extensions:
	 crypt add-on version 2.1 by Michael Glad and others
	 GNU Libidn by Simon Josefsson
	 Native POSIX Threads Library by Ulrich Drepper et al
	 BIND-8.2.3-T5B



The detailed, but not raw and excessively hideous ;-) dump of make trace
output that shows where the error stops the build, follows now. Leading
segments of paths to my build and source trees have been replaced by
symbolic tokens since the convey no useful information about the issues
at hand.
========================================================================
<treetop>/libiberty/testsuite was already made
<treetop>/intl was already made
<treetop>/build-i686-pc-linux-gnu/libiberty/testsuite was already made
<treetop>/build-i686-pc-linux-gnu/fixincludes was already made
<treetop>/libdecnumber was already made
<treetop>/libiberty/testsuite was already made
<treetop>/intl was already made
<treetop>/build-i686-pc-linux-gnu/libiberty/testsuite was already made
<treetop>/build-i686-pc-linux-gnu/fixincludes was already made
<treetop>/libcpp was already made
<treetop>/libdecnumber was already made
<treetop>/libiberty/testsuite was already made
<treetop>/intl was already made
<treetop>/build-i686-pc-linux-gnu/libiberty/testsuite was already made
<treetop>/build-i686-pc-linux-gnu/fixincludes was already made
<treetop>/libcpp was already made
<treetop>/libdecnumber was already made
<treetop>/libiberty/testsuite was already made
<treetop>/fixincludes was already made
========================================================================================
<treetop>/i686-pc-linux-gnu/newlib/libc/argz was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/stdlib was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/ctype was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/search was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/stdio was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/stdio64 was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/string was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/signal was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/time was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/locale was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/machine/i386 was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/machine was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/argp was already made
<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/cmath was already made
========================================================================================
Making all in linuxthreads
make[7]: Entering directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads'
Making all in machine
make[8]: Entering directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine'
Making all in i386
make[9]: Entering directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine/i386'
make[9]: Nothing to be done for `all'.
make[9]: Leaving directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine/i386'
Making all in .
make[9]: Entering directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine'
make[9]: Nothing to be done for `all-am'.
make[9]: Leaving directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine'
make[8]: Leaving directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads/machine'
Making all in .
make[8]: Entering directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads'
/bin/bash ./libtool --tag=CC --mode=compile <treetop>/./gcc/xgcc [...] -o spinlock.lo <source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c
 [... echo from libtool ...]
In file included from <source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/internals.h:30,
                 from <source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:23:
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h:30: warning: '__nothrow__' attribute ignored
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h:32: warning: '__nothrow__' attribute ignored
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_release':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_lock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:113: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:113: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_release':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_compare_and_swap':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:728: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:728: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:728: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_unlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:701: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:701: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:701: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_unlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:182: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:182: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:182: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_lock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:437: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:437: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:437: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_timedlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:512: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:512: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:512: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_lock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: At top level:
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:772: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_compare_and_swap':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:717: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:717: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_unlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:566: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:566: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register

#  SHOWSTOPPER
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: error: inconsistent operand constraints in an 'asm'
# /SHOWSTOPPER

<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_unlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:170: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:170: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_lock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:64: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:64: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:113: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:113: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_lock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:410: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:410: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:410: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c: In function '__pthread_alt_timedlock':
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:479: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:479: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:479: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
<source_root>/gcc-4.3.1/newlib/libc/sys/linux/linuxthreads/spinlock.c:34: warning: matching constraint does not allow a register
make[8]: *** [spinlock.lo] Error 1
make[8]: Leaving directory `<treetop>/i686-pc-linux-gnu/newlib/libc/sys/linux/linuxthreads'

### ---- snip ----

It seems pretty likely that i am just suffering from being on the
bleeding edge of things -- gcc too new?

  Regards!
      somian (Soren Andersen)

   P.S. I don't mind (but don't need) CC:s; I don't even abhor html
   email when there's a good enough reason to use it; but PLEASE DON'T
   TOP-QUOTE AT ME thanks ;).
-- 
"All unaccompanied children will be given espresso and a free kitten."


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