* compile problem with kernel
@ 1998-03-30 7:42 Oliver Frommel
1998-03-30 13:42 ` ralf
0 siblings, 1 reply; 14+ messages in thread
From: Oliver Frommel @ 1998-03-30 7:42 UTC (permalink / raw)
To: linux
hello,
i got the kernel (linux-980326) from linux.sgi.com and had the following
problems crosscompiling it from intel-linux (which appeared on list once, but
without any answer/solution as far as i remember):
mips-linux-gcc -D__KERNEL__ -I/mnt/dsk1/devel/mips/linux-980326/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -pipe -c entry.S -o entry.o
entry.S: Assembler messages:
entry.S:147: Error: .previous without corresponding .section; ignored
entry.S:147: Error: .previous without corresponding .section; ignored
entry.S:148: Error: .previous without corresponding .section; ignored
entry.S:148: Error: .previous without corresponding .section; ignored
entry.S:154: Error: .previous without corresponding .section; ignored
entry.S:154: Error: .previous without corresponding .section; ignored
entry.S:156: Error: .previous without corresponding .section; ignored
entry.S:156: Error: .previous without corresponding .section; ignored
entry.S:157: Error: .previous without corresponding .section; ignored
entry.S:157: Error: .previous without corresponding .section; ignored
entry.S:158: Error: .previous without corresponding .section; ignored
entry.S:158: Error: .previous without corresponding .section; ignored
make[1]: *** [entry.o] Error 1
make[1]: Leaving directory `/mnt/dsk1/devel/mips/linux-980326/arch/mips/kernel'
make: *** [linuxsubdirs] Error 2
i'd appreciate an explanation what's happening here very much ..
thanks
-oliver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-30 7:42 compile problem with kernel Oliver Frommel
@ 1998-03-30 13:42 ` ralf
1998-03-31 7:26 ` Ulf Carlsson
0 siblings, 1 reply; 14+ messages in thread
From: ralf @ 1998-03-30 13:42 UTC (permalink / raw)
To: Oliver Frommel; +Cc: linux
On Mon, Mar 30, 1998 at 09:42:56AM +0200, Oliver Frommel wrote:
> i got the kernel (linux-980326) from linux.sgi.com and had the following
> problems crosscompiling it from intel-linux (which appeared on list once, but
> without any answer/solution as far as i remember):
>
> mips-linux-gcc -D__KERNEL__ -I/mnt/dsk1/devel/mips/linux-980326/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -pipe -c entry.S -o entry.o
> entry.S: Assembler messages:
> entry.S:147: Error: .previous without corresponding .section; ignored
> entry.S:147: Error: .previous without corresponding .section; ignored
> entry.S:148: Error: .previous without corresponding .section; ignored
> entry.S:148: Error: .previous without corresponding .section; ignored
> entry.S:154: Error: .previous without corresponding .section; ignored
> entry.S:154: Error: .previous without corresponding .section; ignored
> entry.S:156: Error: .previous without corresponding .section; ignored
> entry.S:156: Error: .previous without corresponding .section; ignored
> entry.S:157: Error: .previous without corresponding .section; ignored
> entry.S:157: Error: .previous without corresponding .section; ignored
> entry.S:158: Error: .previous without corresponding .section; ignored
> entry.S:158: Error: .previous without corresponding .section; ignored
> make[1]: *** [entry.o] Error 1
> make[1]: Leaving directory `/mnt/dsk1/devel/mips/linux-980326/arch/mips/kernel'
> make: *** [linuxsubdirs] Error 2
>
>
> i'd appreciate an explanation what's happening here very much ..
In the vanilla FSF sources the .previous pseudo is broken resulting in
these messages. The fix is in 2.7-4 and newer.
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-30 13:42 ` ralf
@ 1998-03-31 7:26 ` Ulf Carlsson
1998-03-31 7:14 ` ralf
0 siblings, 1 reply; 14+ messages in thread
From: Ulf Carlsson @ 1998-03-31 7:26 UTC (permalink / raw)
To: ralf; +Cc: linux
On Mon, 30 Mar 1998 ralf@uni-koblenz.de wrote:
> On Mon, Mar 30, 1998 at 09:42:56AM +0200, Oliver Frommel wrote:
>
> > i got the kernel (linux-980326) from linux.sgi.com and had the following
> > problems crosscompiling it from intel-linux (which appeared on list once, but
> > without any answer/solution as far as i remember):
> >
> > mips-linux-gcc -D__KERNEL__ -I/mnt/dsk1/devel/mips/linux-980326/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -pipe -c entry.S -o entry.o
> > entry.S: Assembler messages:
> > entry.S:147: Error: .previous without corresponding .section; ignored
> > make[1]: *** [entry.o] Error 1
> > make[1]: Leaving directory `/mnt/dsk1/devel/mips/linux-980326/arch/mips/kernel'
> > make: *** [linuxsubdirs] Error 2
> >
> >
> > i'd appreciate an explanation what's happening here very much ..
>
> In the vanilla FSF sources the .previous pseudo is broken resulting in
> these messages. The fix is in 2.7-4 and newer.
What are the vanilla FSF sources? The only FSF I have knowlegde of is the
Free Software Foundation :-)
Do I need a new crosscompiler?
- Ulf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 7:26 ` Ulf Carlsson
@ 1998-03-31 7:14 ` ralf
1998-03-31 7:32 ` Oliver Frommel
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: ralf @ 1998-03-31 7:14 UTC (permalink / raw)
To: Ulf Carlsson; +Cc: linux
On Tue, Mar 31, 1998 at 09:26:20AM +0200, Ulf Carlsson wrote:
> On Mon, 30 Mar 1998 ralf@uni-koblenz.de wrote:
>
> > On Mon, Mar 30, 1998 at 09:42:56AM +0200, Oliver Frommel wrote:
> >
> > > i got the kernel (linux-980326) from linux.sgi.com and had the following
> > > problems crosscompiling it from intel-linux (which appeared on list once, but
> > > without any answer/solution as far as i remember):
> > >
> > > mips-linux-gcc -D__KERNEL__ -I/mnt/dsk1/devel/mips/linux-980326/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -pipe -c entry.S -o entry.o
> > > entry.S: Assembler messages:
> > > entry.S:147: Error: .previous without corresponding .section; ignored
> > > make[1]: *** [entry.o] Error 1
> > > make[1]: Leaving directory `/mnt/dsk1/devel/mips/linux-980326/arch/mips/kernel'
> > > make: *** [linuxsubdirs] Error 2
> > >
> > >
> > > i'd appreciate an explanation what's happening here very much ..
> >
> > In the vanilla FSF sources the .previous pseudo is broken resulting in
> > these messages. The fix is in 2.7-4 and newer.
>
> What are the vanilla FSF sources? The only FSF I have knowlegde of is the
> Free Software Foundation :-)
Sorry, but the FSF doesn't over any other flavour except vanilla ;-)
> Do I need a new crosscompiler?
Not really, if you have a native compiler setup. A crosscompiler is
however very handy and sometimes even necessary when bootstrapping for a
new system.
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: compile problem with kernel
1998-03-31 7:14 ` ralf
@ 1998-03-31 7:32 ` Oliver Frommel
1998-03-31 14:49 ` ralf
1998-03-31 7:39 ` Oliver Frommel
1998-03-31 16:16 ` Dong Liu
2 siblings, 1 reply; 14+ messages in thread
From: Oliver Frommel @ 1998-03-31 7:32 UTC (permalink / raw)
To: ralf; +Cc: Ulf Carlsson, linux
Hi,
I am currently trying to rebuild recent binutils and gcc with host=x86 and
target=mips-linux. So far I've built binutils-2.8.1 with the patch from sgi.com
applied but I have some problems building gcc. I have two questions regarding
the setup of the crosscompilation environment:
1. is gas supposed to be part of the binutils package, of the gcc package or
is it a package on its own? I've built gas from the binutils dist and put it
into the binutils.rpm now while I found it in gcc-xcompile...2.7.2-3.rpm
on sgi.com ..
2. which compiler source & patches am i supposed to use? I've tried the original
gcc-2.7.2 with patches 2.7.2-6 and 2.7.2-7 from sgi.com applied, but I am not
sure if those are meant to be used with a native mips-linux host & target.
Anyway I am getting this error when I try to compile gcc now:
./xgcc -B./ -DCROSS_COMPILE -DIN_GCC -I./include -I. -I. -I./config \
-DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
-c ./crtstuff.c
as: unrecognized option `-PIC'
make: *** [stamp-crt] Error 1
(btw.: I am using a non-optimizing version of gcc on the crosscompiler host due
to a problem with the Cyrix processor ..)
thanks
-oliver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 7:32 ` Oliver Frommel
@ 1998-03-31 14:49 ` ralf
0 siblings, 0 replies; 14+ messages in thread
From: ralf @ 1998-03-31 14:49 UTC (permalink / raw)
To: Oliver Frommel; +Cc: Ulf Carlsson, linux
On Tue, Mar 31, 1998 at 09:32:33AM +0200, Oliver Frommel wrote:
> I am currently trying to rebuild recent binutils and gcc with host=x86 and
> target=mips-linux. So far I've built binutils-2.8.1 with the patch from sgi.com
> applied but I have some problems building gcc. I have two questions regarding
> the setup of the crosscompilation environment:
>
> 1. is gas supposed to be part of the binutils package,
Yes.
> of the gcc package or
> is it a package on its own? I've built gas from the binutils dist and put it
> into the binutils.rpm now while I found it in gcc-xcompile...2.7.2-3.rpm
> on sgi.com ..
> 2. which compiler source & patches am i supposed to use?
Binutils 2.7-4 and newer are ok for kernels; userland needs 2.8.1-1 or
newer or building certain shared libs will fail.
GCC 2.7.2-7 is ok. Btw, you only need to apply one of these patches;
none of my binutils or gcc patches was meant to be applied incrementally.
> gcc-2.7.2 with patches 2.7.2-6 and 2.7.2-7 from sgi.com applied, but I am not
> sure if those are meant to be used with a native mips-linux host & target.
> Anyway I am getting this error when I try to compile gcc now:
You can build both native and crosscompilers from the same source. That's
the beauty of GCC.
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 7:14 ` ralf
1998-03-31 7:32 ` Oliver Frommel
@ 1998-03-31 7:39 ` Oliver Frommel
1998-03-31 14:38 ` ralf
1998-03-31 16:16 ` Dong Liu
2 siblings, 1 reply; 14+ messages in thread
From: Oliver Frommel @ 1998-03-31 7:39 UTC (permalink / raw)
To: linux
Hi,
i forgot to add the output of xgcc compiling with -v ...
$ ../xgcc -v -B../ -c test.c
../cpp -lang-c -v -isystem ../include -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__PIC__ -D__pic__ -Dunix -Dmips -DR3000 -DMIPSEB -Dlinux -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__PIC__ -D__pic__ -D__unix__ -D__mips__
-D__R3000__ -D__MIPSEB__ -D__linux__ -D__unix -D__mips -D__R3000 -D__MIPSEB -D__linux -Asystem(linux) -Asystem(posix) -Acpu(mips) -Amachine(mips) -D__LANGUAGE_C__ -DLANGUAGE_C -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS1 -D_MIPS_SZINT=32 -D__SIZE_TYPE__=u
nsigned int -D__SSIZE_TYPE__=int -D__PTRDIFF_TYPE__=int -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 test.c /tmp/cca22420.i
GNU CPP version 2.7.2 [AL 1.1, MM 40] (MIPS Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
../include
/usr/lib/gcc-lib/mips-linux/2.7.2/include
/usr/lib/gcc-lib/mips-linux/2.7.2/sys-include
/usr/mips-linux/include
End of search list.
../cc1 /tmp/cca22420.i -quiet -dumpbase test.c -version -o /tmp/cca22420.s
GNU C version 2.7.2 [AL 1.1, MM 40] (MIPS Linux/ELF) compiled by GNU C version 2.7.2.3.
as -v -KPIC -o test.o /tmp/cca22420.s
GNU assembler version 2.8.1 (i686-pc-linux-gnu), using BFD version linux-2.8.1.0.1
as: unrecognized option `-PIC'
-oliver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 7:39 ` Oliver Frommel
@ 1998-03-31 14:38 ` ralf
1998-03-31 14:46 ` Oliver Frommel
0 siblings, 1 reply; 14+ messages in thread
From: ralf @ 1998-03-31 14:38 UTC (permalink / raw)
To: Oliver Frommel; +Cc: linux
On Tue, Mar 31, 1998 at 09:39:47AM +0200, Oliver Frommel wrote:
> Hi,
>
> i forgot to add the output of xgcc compiling with -v ...
>
> $ ../xgcc -v -B../ -c test.c
>
> ../cpp -lang-c -v -isystem ../include -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__PIC__ -D__pic__ -Dunix -Dmips -DR3000 -DMIPSEB -Dlinux -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__PIC__ -D__pic__ -D__unix__ -D__mips__
> -D__R3000__ -D__MIPSEB__ -D__linux__ -D__unix -D__mips -D__R3000 -D__MIPSEB -D__linux -Asystem(linux) -Asystem(posix) -Acpu(mips) -Amachine(mips) -D__LANGUAGE_C__ -DLANGUAGE_C -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS1 -D_MIPS_SZINT=32 -D__SIZE_TYPE__=u
> nsigned int -D__SSIZE_TYPE__=int -D__PTRDIFF_TYPE__=int -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 test.c /tmp/cca22420.i
> GNU CPP version 2.7.2 [AL 1.1, MM 40] (MIPS Linux/ELF)
> #include "..." search starts here:
> #include <...> search starts here:
> ../include
> /usr/lib/gcc-lib/mips-linux/2.7.2/include
> /usr/lib/gcc-lib/mips-linux/2.7.2/sys-include
> /usr/mips-linux/include
> End of search list.
> ../cc1 /tmp/cca22420.i -quiet -dumpbase test.c -version -o /tmp/cca22420.s
> GNU C version 2.7.2 [AL 1.1, MM 40] (MIPS Linux/ELF) compiled by GNU C version 2.7.2.3.
> as -v -KPIC -o test.o /tmp/cca22420.s
> GNU assembler version 2.8.1 (i686-pc-linux-gnu), using BFD version linux-2.8.1.0.1
> as: unrecognized option `-PIC'
Your crosscompiler is caling the native assembler. Did you install binutils?
Did you configure the sources them using the same --prefix option?
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 14:38 ` ralf
@ 1998-03-31 14:46 ` Oliver Frommel
1998-03-31 14:55 ` ralf
0 siblings, 1 reply; 14+ messages in thread
From: Oliver Frommel @ 1998-03-31 14:46 UTC (permalink / raw)
To: linux
> > as -v -KPIC -o test.o /tmp/cca22420.s
> > GNU assembler version 2.8.1 (i686-pc-linux-gnu), using BFD version linux-2.8.1.0.1
> > as: unrecognized option `-PIC'
>
> Your crosscompiler is caling the native assembler. Did you install binutils?
> Did you configure the sources them using the same --prefix option?
>
i installed the binutils-2.8.1 with the following configuration:
./configure --prefix=/tmp/binutils-xcompile-root/usr/local --program-prefix=mips
-linux- --enable-shared --target=mips-linux
-oliver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 14:46 ` Oliver Frommel
@ 1998-03-31 14:55 ` ralf
1998-03-31 14:57 ` Oliver Frommel
0 siblings, 1 reply; 14+ messages in thread
From: ralf @ 1998-03-31 14:55 UTC (permalink / raw)
To: Oliver Frommel; +Cc: linux
On Tue, Mar 31, 1998 at 04:46:53PM +0200, Oliver Frommel wrote:
> i installed the binutils-2.8.1 with the following configuration:
>
> ./configure --prefix=/tmp/binutils-xcompile-root/usr/local --program-prefix=mips
> -linux- --enable-shared --target=mips-linux
You loose. You install software in /tmp???
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 14:55 ` ralf
@ 1998-03-31 14:57 ` Oliver Frommel
1998-03-31 15:33 ` ralf
0 siblings, 1 reply; 14+ messages in thread
From: Oliver Frommel @ 1998-03-31 14:57 UTC (permalink / raw)
To: linux
> >
> > ./configure --prefix=/tmp/binutils-xcompile-root/usr/local --program-prefix=mips
> > -linux- --enable-shared --target=mips-linux
>
> You loose. You install software in /tmp???
>
yeah. i lose - i use RPM :-)
seriuosly, i've installed it in /tmp/binutils-xcompile-root and packaged the RPM
from there, then installed the RPM whose -qpl looks like this:
/usr/local/bin/mips-linux-c++filt
/usr/local/bin/mips-linux-gasp
/usr/local/bin/mips-linux-ld
/usr/local/bin/mips-linux-nm
/usr/local/bin/mips-linux-objcopy
/usr/local/bin/mips-linux-objdump
/usr/local/bin/mips-linux-ranlib
/usr/local/bin/mips-linux-size
/usr/local/bin/mips-linux-strings
/usr/local/bin/mips-linux-strip
/usr/local/bin/mips-linux-as
/usr/local/bin/mips-linux-ar
/usr/local/mips-linux/bin/ar
/usr/local/mips-linux/bin/as
/usr/local/mips-linux/bin/ld
/usr/local/mips-linux/bin/nm
/usr/local/mips-linux/bin/ranlib
/usr/local/mips-linux/bin/strip
/usr/local/lib/libmips-linux-bfd.so
/usr/local/lib/libmips-linux-bfd.so.2.8.1
/usr/local/lib/libmips-linux-opcodes.a
/usr/local/lib/libmips-linux-opcodes.so
/usr/local/lib/libmips-linux-opcodes.so.2.8.1
...
-oliver
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 14:57 ` Oliver Frommel
@ 1998-03-31 15:33 ` ralf
1998-03-31 15:59 ` Oliver Frommel
0 siblings, 1 reply; 14+ messages in thread
From: ralf @ 1998-03-31 15:33 UTC (permalink / raw)
To: Oliver Frommel; +Cc: linux
On Tue, Mar 31, 1998 at 04:57:52PM +0200, Oliver Frommel wrote:
> > > ./configure --prefix=/tmp/binutils-xcompile-root/usr/local --program-prefix=mips
> > > -linux- --enable-shared --target=mips-linux
> >
> > You loose. You install software in /tmp???
> >
>
> yeah. i lose - i use RPM :-)
> seriuosly, i've installed it in /tmp/binutils-xcompile-root and packaged the RPM
> from there, then installed the RPM whose -qpl looks like this:
That strategy fails for alot of GNU autoconf'ed software. Better do it
like:
./configure --prefix=/usr/local
make ...
make prefix=/tmp/binutils-xcompile-root/usr/local install
Otherwise you might end up with an embedded /tmp/binutils... path in
some files. This for example happens when building GCC.
Ralf
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: compile problem with kernel
1998-03-31 7:14 ` ralf
1998-03-31 7:32 ` Oliver Frommel
1998-03-31 7:39 ` Oliver Frommel
@ 1998-03-31 16:16 ` Dong Liu
2 siblings, 0 replies; 14+ messages in thread
From: Dong Liu @ 1998-03-31 16:16 UTC (permalink / raw)
To: ralf; +Cc: linux
ralf@uni-koblenz.de writes:
> On Tue, Mar 31, 1998 at 09:26:20AM +0200, Ulf Carlsson wrote:
> > > In the vanilla FSF sources the .previous pseudo is broken resulting in
> > > these messages. The fix is in 2.7-4 and newer.
> >
> > What are the vanilla FSF sources? The only FSF I have knowlegde of is the
> > Free Software Foundation :-)
>
> Sorry, but the FSF doesn't over any other flavour except vanilla ;-)
>
> > Do I need a new crosscompiler?
>
> Not really, if you have a native compiler setup. A crosscompiler is
> however very handy and sometimes even necessary when bootstrapping for a
> new system.
>
> Ralf
>
I also have the same problem, however I don't have a native compiler,
I can't make the pre-compiled kernel boot on my Indy:), I'm cross
compiling it on i486-linux I got my binutils from
ftp://ftp.linux.sgi.com/pub/crossdev/i486-linux/mips-linux
Where can I ftp binutils 2.7-4 ?
Thanks!
Dong
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~1998-03-31 16:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-30 7:42 compile problem with kernel Oliver Frommel
1998-03-30 13:42 ` ralf
1998-03-31 7:26 ` Ulf Carlsson
1998-03-31 7:14 ` ralf
1998-03-31 7:32 ` Oliver Frommel
1998-03-31 14:49 ` ralf
1998-03-31 7:39 ` Oliver Frommel
1998-03-31 14:38 ` ralf
1998-03-31 14:46 ` Oliver Frommel
1998-03-31 14:55 ` ralf
1998-03-31 14:57 ` Oliver Frommel
1998-03-31 15:33 ` ralf
1998-03-31 15:59 ` Oliver Frommel
1998-03-31 16:16 ` Dong Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox