www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/12/01:45:06

From: Rob Kramer <robk AT starhub DOT net DOT sg>
Newsgroups: comp.os.msdos.djgpp
Subject: Small problem cross-building CVS DJGPP.
Date: Wed, 12 Jun 2002 13:28:14 +0800
Organization: Singapore Telecommunications Ltd
Lines: 56
Message-ID: <ae6mr6$46a$1@violet.singnet.com.sg>
NNTP-Posting-Host: bb-203-125-72-35.singnet.com.sg
Mime-Version: 1.0
User-Agent: KNode/0.7.1
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hey there,

While trying to build the latest cvs djgpp on a linux machine, the following 
error pops up:

make -C common e
i586-pc-msdosdjgpp-ld -s  ../../../lib/crt0.o symify.o ../../../lib/libdbg.a 
../../../lib/libc.a -o ../../../bin/symify.exe 
/opt/djgpp/lib/gcc-lib/i586-pc-msdosdjgpp/2.95.3/libgcc.a -T 
/opt/djgpp/i586-pc-msdosdjgpp/lib/djgpp.djl
../../../lib/crt0.o: file not recognized: File format not recognized
make[3]: *** [../../../bin/symify.exe] Error 1

It seems crt.o is the wrong format:

> file ../lib/crt0.o
../lib/crt0.o: ELF 32-bit LSB relocatable, Intel 80386, version 1, not 
stripped

A bit more investigation shows cross-gcc invokes the native as instead of 
cross-as:

> i586-pc-msdosdjgpp-gcc -pipe -MD -O2 -mcpu=pentium -march=i386 -Wall 
-Wbad-function-cast -Wcast-qual -Werror -Wmissing-declarations 
-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes 
-Wwrite-strings -Wundef -Wcast-align -Wsign-compare -nostdinc -I. -I- 
-isystem ../../../include -DGAS_MAJOR=2 -DGAS_MINOR=11 -DGAS_MINORMINOR=90 
-MMD -v -c crt0.S
Reading specs from /opt/djgpp/lib/gcc-lib/i586-pc-msdosdjgpp/2.95.3/specs
gcc version 2.95.3 20010315/djgpp (release)
 /opt/djgpp/lib/gcc-lib/i586-pc-msdosdjgpp/2.95.3/cpp0 -lang-asm -nostdinc 
-v -I. -I- -MD crt0.d -MMD crt0.d -$ -Dunix -Di386 -DGO32 -DDJGPP=2 -DMSDOS 
-D__unix__ -D__i386__ -D__GO32__ -D__DJGPP__=2 -D__MSDOS__ -D__unix 
-D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asystem(unix) -Asystem(msdos) 
-Acpu(i386) -Amachine(i386) -D__ASSEMBLER__ -D__OPTIMIZE__ -Wall 
-Wbad-function-cast -Wcast-qual -Werror -Wmissing-declarations 
-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes 
-Wwrite-strings -Wundef -Wcast-align -Wsign-compare -Acpu(i386) 
-Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_pentium__ -imacros 
/opt/djgpp/lib/gcc-lib/i586-pc-msdosdjgpp/2.95.3/djgpp.ver -remap 
-DGAS_MAJOR=2 -DGAS_MINOR=11 -DGAS_MINORMINOR=90 -isystem ../../../include 
crt0.S |
 as -o crt0.o
[...]

Gcc pipes through as, which should be i586-pc-msdosdjgpp-as.

Any idea why this is? Perhaps I didn't compile my cross-compiler correctly? 
Normally, when I cross compile, I do it in an environment where 
/opt/djgpp/bin is prepended to the path, so never noticed the as pipe 
problem (and never use -pipe in the first place). But this can't be done 
for building djgpp since it needs both compiler sets.

Thanks!

    Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019