2002-03-10 16:02:02

by Matthew Kirkwood

[permalink] [raw]
Subject: 2.5.6: JFS vs gcc 2.95.4

Hi,

I can't build jfs in 2.5.6 with gcc 2.95.4 from Debian
testing:

gcc -D__KERNEL__ -I/home/matthew/kern/linux-2.5.6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=k6 -D_JFS_4K -DKBUILD_BASENAME=jfs_imap -c -o jfs_imap.o
jfs_imap.c
jfs_imap.c: In function `diAlloc':
/home/matthew/kern/linux-2.5.6/include/asm/rwsem.h:169: inconsistent
operand constraints in an `asm'
jfs_imap.c: In function `diNewIAG':
/home/matthew/kern/linux-2.5.6/include/asm/rwsem.h:169: inconsistent
operand constraints in an `asm'

I don't really speak gcc asm, so I don't know where to start
on this. Is it a known issue?

Matthew.


2002-03-10 18:36:05

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.5.6: JFS vs gcc 2.95.4

Matthew Kirkwood wrote:
>
> Hi,
>
> I can't build jfs in 2.5.6 with gcc 2.95.4 from Debian
> testing:
>
> gcc -D__KERNEL__ -I/home/matthew/kern/linux-2.5.6/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
> -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
> -march=k6 -D_JFS_4K -DKBUILD_BASENAME=jfs_imap -c -o jfs_imap.o
> jfs_imap.c
> jfs_imap.c: In function `diAlloc':
> /home/matthew/kern/linux-2.5.6/include/asm/rwsem.h:169: inconsistent
> operand constraints in an `asm'
> jfs_imap.c: In function `diNewIAG':
> /home/matthew/kern/linux-2.5.6/include/asm/rwsem.h:169: inconsistent
> operand constraints in an `asm'
>
> I don't really speak gcc asm, so I don't know where to start
> on this. Is it a known issue?
>

This worked for me:

--- linux-2.5.6/include/asm-i386/rwsem.h Tue Feb 19 18:11:01 2002
+++ 25/include/asm-i386/rwsem.h Sat Mar 9 14:37:35 2002
@@ -164,7 +164,7 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n
" jmp 1b\n"
LOCK_SECTION_END
"# ending __up_read\n"
- : "+m"(sem->count), "+d"(tmp)
+ : /*"+m"(sem->count),*/ "+d"(tmp)
: "a"(sem)
: "memory", "cc");
}

-

2002-03-10 19:16:36

by Matthew Kirkwood

[permalink] [raw]
Subject: Re: 2.5.6: JFS vs gcc 2.95.4

On Sun, 10 Mar 2002, Andrew Morton wrote:

> This worked for me:

Builds for me, too. Are you sure that constraint
isn't useful?

Matthew.

> --- linux-2.5.6/include/asm-i386/rwsem.h Tue Feb 19 18:11:01 2002
> +++ 25/include/asm-i386/rwsem.h Sat Mar 9 14:37:35 2002
> @@ -164,7 +164,7 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n
> " jmp 1b\n"
> LOCK_SECTION_END
> "# ending __up_read\n"
> - : "+m"(sem->count), "+d"(tmp)
> + : /*"+m"(sem->count),*/ "+d"(tmp)
> : "a"(sem)
> : "memory", "cc");
> }

2002-03-10 19:27:18

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.5.6: JFS vs gcc 2.95.4

Matthew Kirkwood wrote:
>
> On Sun, 10 Mar 2002, Andrew Morton wrote:
>
> > This worked for me:
>
> Builds for me, too. Are you sure that constraint
> isn't useful?

The argument is not referenced in the assembly code. It seems to be
a cut-n-paste error.

-