Build failure on m68k and ia64: inconsistent operand constraints in an `asm' - Mailing list pgsql-ports

From Martin Pitt
Subject Build failure on m68k and ia64: inconsistent operand constraints in an `asm'
Date
Msg-id 20040607233741.GA12284@donald.intranet.fbn-dd.de
Whole thread Raw
Responses Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'  (Peter Eisentraut <peter_e@gmx.net>)
Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-ports
Hi PostgreSQL developers!

Recently PostgreSQL did not build any more on the Debian ia64 and m68k buildds:

----------
m68k-linux-gcc -DCHECK_RLIMIT_NOFILE -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -pipe
-I../../../../src/include-D_GNU_SOURCE  -I/usr/include/tcl8.4  -c -o xlog.o xlog.c 
../../../../src/include/storage/s_lock.h: In function `tas':
../../../../src/include/storage/s_lock.h:292: error: inconsistent operand constraints in an `asm'
make[5]: *** [xlog.o] Error 1
----------

The relevant code on m68K:

----------
        __asm__ __volatile__(
                "       clrl    %0              \n"
                "       tas             %1              \n"
                "       sne             %0              \n"
:               "=d"(rv), "=m"(*lock)
:               "1"(*lock)
:               "cc");
----------

and on IA64:

----------
        __asm__ __volatile__(
                "       xchg4   %0=%1,%2        \n"
:               "=r"(ret), "=m"(*lock)
:               "r"(1), "1"(*lock)
:               "memory");
----------

A Debian porter suggested that "1"(*lock) is an obsolete syntax and
should be replaced by "m"(*lock) in both cases; however, I would like
to get a second opinion about this.

Does this make sense? Would you consider doing this in the next
release?

Thanks and have a nice day!

Martin

--
Martin Pitt                 Debian GNU/Linux Developer
martin@piware.de                      mpitt@debian.org
http://www.piware.de             http://www.debian.org

Attachment

pgsql-ports by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: OS X & thread safety
Next
From: Tom Lane
Date:
Subject: Re: Build failure on m68k and ia64: inconsistent operand constraints in an `asm'