Build failure on m68k and ia64: inconsistent operand constra

Build failure on m68k and ia64: inconsistent operand constra

时间:2015-07-13 11:02来源:网络整理 作者:KKWL 点击:
Martin Pitt Jun 7, 2004 at 11:37 pm 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

Martin Pitt

Jun 7, 2004 at 11:37 pm

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

reply

Tweet

Search Discussions

  • Tom Lane

    Tom Lane Just to clarify --- what you're reporting is that Debian changed their compiler to break our code, right? Because this asm has been the same for quite awhile ... We will need to find out whether this syntax also works with older gccs, and if not, what hoops we must leap through to determine which syntax to use. regards, tom lane

    Tom Lane

    at Jun 10, 2004 at 4:37 am


    Martin Pitt writes:
    Recently PostgreSQL did not build any more on the Debian ia64 and m68k buil=
    dds:

    Just to clarify --- what you're reporting is that Debian changed their
    compiler to break our code, right? Because this asm has been the same
    for quite awhile ...

    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.

    We will need to find out whether this syntax also works with older
    gccs, and if not, what hoops we must leap through to determine which
    syntax to use.

    regards, tom lane

  • Martin Pitt

    Martin Pitt Hi Tom! I know, but it would be nice to be able to compile PostgreSQL with recent compilers. This was not meant as a bug report, just a question to people who know more about assembler than me. Our porters proposed the new solution with "m"(*lock), but I wanted to get some more opinions. Concerning Debian it is not really required that it works also with old compilers (well, 2.95 would be nice, but it is not necessary). It is perfectly okay for me to patch this only for the Debian version. So

    Martin Pitt

    at Jun 10, 2004 at 9:50 am

    Hi Tom!

    On 2004-06-10 0:37 -0400, Tom Lane wrote:
    Martin Pitt <martin@piware.de> writes:

    Recently PostgreSQL did not build any more on the Debian ia64 and m68k buil=
    dds:

    Just to clarify --- what you're reporting is that Debian changed their
    compiler to break our code, right? Because this asm has been the same
    for quite awhile ...

    I know, but it would be nice to be able to compile PostgreSQL with
    recent compilers. This was not meant as a bug report, just a question
    to people who know more about assembler than me. Our porters proposed
    the new solution with "m"(*lock), but I wanted to get some more
    opinions.

  • ------分隔线----------------------------