delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/21/13:03:30

From: "Rossz Vámos-Wentworth" <rossw AT jps DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: More on building a cross compiler - help needed
Date: Sun, 20 Feb 2000 18:57:39 -0800
Lines: 158
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 209.239.197.219
X-Original-NNTP-Posting-Host: 209.239.197.219
Message-ID: <38b0aa3f_1@news.jps.net>
X-Trace: 20 Feb 2000 19:00:15 -0800, 209.239.197.219
X-Original-NNTP-Posting-Host: 209.63.224.240
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

My main problem seems to be in building the cross libraries.  I don't need
them, so how do I surpress their builds so that the "make install" ( or
"make install-gcc-cross" ? ) command will work for the executables?

Here's what's happened today...

I deleted my entire gcc & binutls source directories and started from
scratch.  I think I had polluted the build system with too many failed
attempts.

First I rebuilt binutils 2.9.1 with these settings (all one line):

sh configure --prefix=/djgpp/cross --program-prefix=h8300-hms-
     --host=i386-pc-msdosdjgpp --target=h8300-hms

I had to use the gnu version (which seems to support DJGPP just fine)
because the zip file found via www.delorie.com/djgpp did not contain the
cross-tools specific files.  Was this intentional or an oversite?  Other
than a small hiccup when I ran "make install", everything seems to be in
place ( had to run "make install" in each subdirectory instead of from the
main source directory).  This resulted in the list of files at the end of
this message.

I then switched to the gnu/gcc-2.952 directory and went to work on crossGCC.
I used these settings (all one line):

sh ./configure --prefix=/djgpp/cross --program-prefix=h8300-hms-
     --host=i386-pc-msdosdjgpp --target=h8300-hms --disable-shared
     --enable-cpp --enable-languages=c,c++  --with-newlib

The following were new on this attempt, but it didn't make any difference
(the problem remained the same):

    --disable-shared --enable-cpp --with-newlib

The configuration went smoothing (no problem with replacing "ln -s" this
time).  I then ran "make cross".  Part way through the process I started
getting errors about not being able to find h8300-hms-ar, etc.  I stopped
the build and dropped all the cross-tools into the main bin directory (I'm
sure there's a switch to fix this, what is it?).  I restarted "make cross".

I received a bunch of these errors:

     ./libgcc2.c:995: warning: right shift count >= width of type

Is this normal?  Since they are only warning errors and I don't care about
the runtime libraries, I didn't worry.  However, later on a fatal error
occurs:

BEGIN DUMP ----------------------------------------------------
make.exe[4]: Entering directory `f:/djgpp/gnu/gcc-2.952/gcc'
f:/djgpp/gnu/gcc-2.952/gcc/xgcc -Bf:/djgpp/gnu/gcc-2.952/gcc/ -B/djgpp/cross
/h8300-hms/bin/ -I/djgpp/cross/h8300-hms/include -O2  -DCROSS_COMPILE -DIN_G
CC     -g -O2 -I./include  -DDF=SF -DDI=SI -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_N
OT_NEEDED -Dinhibit_libc   -g -O2 -I. -I. -I./config -I./../include \
  -c ./cp/tinfo.cc
In file included from ./cp/tinfo.cc:32:
include/new:28: `operator new' takes type `size_t' as first parameter
include/new:29: `operator new' takes type `size_t' as first parameter
include/new:32: `operator new' takes type `size_t' as first parameter
include/new:33: `operator new' takes type `size_t' as first parameter
include/new:38: `operator new' takes type `size_t' as first parameter
include/new:39: `operator new' takes type `size_t' as first parameter
make.exe[4]: *** [tinfo.o] Error 1
make.exe[4]: Leaving directory `f:/djgpp/gnu/gcc-2.952/gcc'
make.exe[3]: *** [libgcc2.a] Error 1
make.exe[3]: Leaving directory `f:/djgpp/gnu/gcc-2.952/gcc'
make.exe[2]: *** [stmp-multilib-sub] Error 2
make.exe[2]: Leaving directory `f:/djgpp/gnu/gcc-2.952/gcc'
make.exe[1]: *** [stmp-multilib] Error 1
make.exe[1]: Leaving directory `f:/djgpp/gnu/gcc-2.952/gcc'
make.exe: *** [cross] Error 2
END DUMP ----------------------------------------------------------

I looked inside the problem file.  The first parameter IS 'size_t'.  Perhaps
a redefinition earlier in the build?

In desperation I tried to copy xgcc.exe and related executables manually,
but when I tried to use the cross-compiler it failed.  It didn't pick up the
cross-tools properly.

Here's the files as placed by binutil's "make install" (before gcc "make
install").  The executables in 'h8300-hms\bin' are identical to those in
'bin'.  Is there a purpose to the duplicate files?

F:\djgpp\cross\bin\
          h8300-hms-addr2line.exe
          h8300-hms-ar.exe
          h8300-hms-as.exe
          h8300-hms-c++filt.exe
          h8300-hms-coffdump.exe
          h8300-hms-gasp.exe
          h8300-hms-ld.exe
          h8300-hms-nm.exe
          h8300-hms-objcopy.exe
          h8300-hms-objdump.exe
          h8300-hms-ranlib.exe
          h8300-hms-size.exe
          h8300-hms-srconv.exe
          h8300-hms-strings.exe
          h8300-hms-strip.exe
          h8300-hms-sysdump.exe


F:\djgpp\cross\h8300-hms\bin\        # do I need these?
          ar.exe
          as.exe
          ld.exe
          nm.exe
          ranlib.exe
          strip.exe

F:\djgpp\cross\h8300-hms\lib\ldscripts\    # I don't need these for my
project
          h8300.x
          h8300.xbn
          h8300.xn
          h8300.xr
          h8300.xu
          h8300h.x
          h8300h.xbn
          h8300h.xn
          h8300h.xr
          h8300h.xu
          h8300s.x
          h8300s.xbn
          h8300s.xn
          h8300s.xr
          h8300s.xu

F:\djgpp\cross\lib\    # I don't need these for my project
          libbfd.a
          libbfd.la
          libiberty.a
          libopcodes.a
          libopcodes.la

F:\djgpp\cross\man\man1\    # I don't need thee for my project
          h8300-hms-addr2line.1
          h8300-hms-ar.1
          h8300-hms-as.1
          h8300-hms-c++filt.1
          h8300-hms-ld.1
          h8300-hms-nlmconv.1
          h8300-hms-nm.1
          h8300-hms-objcopy.1
          h8300-hms-objdump.1
          h8300-hms-ranlib.1
          h8300-hms-size.1
          h8300-hms-strings.1
          h8300-hms-strip.1

Thanks for your patience.

Rossz



- Raw text -


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