2001-04-23 21:11:41

by Axel Siebenwirth

[permalink] [raw]
Subject: compile error 2.4.4pre6: inconsistent operand constraints in an `asm'

Hallo,

after having had trouble with compilation due to old gcc version, i have
updated to gcc 3.0 and received the following error:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.4pre6/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i586 -DEXPORT_SYMTAB -c sys.c
sys.c: In function `sys_gethostname':
/usr/src/linux-2.4.4pre6/include/asm/rwsem.h:142: inconsistent operand
constraints in an `asm'
make[2]: *** [sys.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.4pre6/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.4pre6/kernel'
make: *** [_dir_kernel] Error 2

I'm very thankful for any help,

Regards,
Axel Siebenwirth


2001-04-23 21:44:41

by Erik Mouw

[permalink] [raw]
Subject: Re: compile error 2.4.4pre6: inconsistent operand constraints in an `asm'

On Mon, Apr 23, 2001 at 11:11:14PM +0200, axel wrote:
> after having had trouble with compilation due to old gcc version, i have
> updated to gcc 3.0 and received the following error:

Although bug reports about a kernel compiled with gcc-3.0 are welcome,
this is still not the recommended compiler. The recommended compiler is
gcc-2.91.66 (aka egcs-1.1.2), but for most people gcc-2.95.2 works as
well.


Erik

--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: [email protected]
WWW: http://www-ict.its.tudelft.nl/~erik/

2001-04-23 22:57:22

by Alan

[permalink] [raw]
Subject: Re: compile error 2.4.4pre6: inconsistent operand constraints in an

> after having had trouble with compilation due to old gcc version, i have
> updated to gcc 3.0 and received the following error:

2.4.4pre6 only builds with gcc 2.96. If you apply the __builtin_expect fixes
it builds and runs fine with 2.95. Not tried egcs. The gcc 3.0 asm constraints
one I've yet to see a fix for.

2001-04-24 00:25:25

by Jeff Chua

[permalink] [raw]
Subject: Re: compile error 2.4.4pre6: inconsistent operand constraints in an

On Mon, 23 Apr 2001, Alan Cox wrote:

> 2.4.4pre6 only builds with gcc 2.96. If you apply the __builtin_expect fixes
> it builds and runs fine with 2.95. Not tried egcs. The gcc 3.0 asm constraints
> one I've yet to see a fix for.

So, should I upgrade to 2.96 from 2.95.3?

But, from http://gcc.gnu.org/gcc-2.96.html ...

Please note that both GCC 2.96 and 2.97 are development versions; we
do not recommend using them for production purposes. Binaries built
using any version of GCC 2.96 or 2.97 will not be portable to systems
based on one of our regular releases.


Does this still hold?

Thanks,
Jeff

2001-04-24 11:52:00

by Axel Siebenwirth

[permalink] [raw]
Subject: Re: compile error 2.4.4pre6: inconsistent operand constraints in an

How about correcting the needed gcc version in Documentation/Changes?

On Mon, 23 Apr 2001, Alan Cox wrote:

> > after having had trouble with compilation due to old gcc version, i have
> > updated to gcc 3.0 and received the following error:
>
> 2.4.4pre6 only builds with gcc 2.96. If you apply the __builtin_expect fixes
> it builds and runs fine with 2.95. Not tried egcs. The gcc 3.0 asm constraints
> one I've yet to see a fix for.
>