linux-mips
[Top] [All Lists]

Re: [PATCH] const mips_io_port_base !?

To: Ralf Baechle <ralf@oss.sgi.com>
Subject: Re: [PATCH] const mips_io_port_base !?
From: Florian Lohoff <flo@rfc822.org>
Date: Wed, 28 Nov 2001 14:13:39 +0100
Cc: linux-mips@oss.sgi.com
In-reply-to: <20011127171544.A29424@dea.linux-mips.net>
Organization: rfc822 - pure communication
References: <20011127010214.B21296@paradigm.rfc822.org> <20011127171544.A29424@dea.linux-mips.net>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.3.23i
On Tue, Nov 27, 2001 at 05:15:44PM +1100, Ralf Baechle wrote:
> On Tue, Nov 27, 2001 at 01:02:14AM +0100, Florian Lohoff wrote:
> 
> Blame whoever designed C that there is no sane way to give a variable an
> attribute like "will never change again after the first initalization thus
> keeping the value in a register beyond function calls and any other kind
> of memory barrier is ok".  This inconsistence merily achieves a better
> optimization of the code; the set_* function is intended to hide this cute
> little standard violation away ...

The problem is that it doesnt build without the patch:

mipsel-linux-gcc -I /home/mnt/mips/dec/linux/include/asm/gcc
-D__KERNEL__ -I/home/mnt/mips/dec/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -mcpu=r4600
-mips2 -Wa,--trap -pipe    -DEXPORT_SYMTAB -c setup.c
Assembler messages:
Warning: The -mcpu option is deprecated.  Please use -march and -mtune
instead.
Warning: The -march option is incompatible to -mipsN and therefore
ignored.
setup.c:109: conflicting types for `mips_io_port_base'
/home/mnt/mips/dec/linux/include/asm/io.h:63: previous declaration of
`mips_io_port_base'
setup.c: In function `setup_arch':
setup.c:678: warning: unused variable `tmp'
setup.c:679: warning: unused variable `initrd_header'
make[1]: *** [setup.o] Error 1
make[1]: Leaving directory `/home/mnt/mips/dec/linux/arch/mips/kernel'
make: *** [_dir_arch/mips/kernel] Error 2
(flo@paradigm)/home/mnt/mips/dec/linux# 

(flo@paradigm)/home/mnt/mips/dec/linux# mipsel-linux-gcc -v
Reading specs from /usr/local/lib/gcc-lib/mipsel-linux/3.0.2/specs
Configured with: ./configure --target=mipsel-linux --enable-languages=c
--disable-shared
Thread model: single
gcc version 3.0.2 20010825 (Debian prerelease)
(flo@paradigm)/home/mnt/mips/dec/linux# mipsel-linux-as --version
GNU assembler 2.11.92.0.10 Debian/GNU Linux
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License.  This program has absolutely no
warranty.
This assembler was configured for a target of `mipsel-linux'.


-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

Attachment: pgpihnVyeLTBl.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>