www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/17/19:30:33

From: Michael Deck <deckm AT cleansoft DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Problems building djgpp (long)
Date: Mon, 17 Nov 1997 14:28:04 -0700
Organization: Cleanroom Software Engineering, Inc.
Lines: 167
Message-ID: <3470B6E3.729F@cleansoft.com>
Reply-To: deckm AT cleansoft DOT com
NNTP-Posting-Host: 204.133.96.24
Mime-Version: 1.0
CC: deckm AT cleansoft DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dear DJGPP-ers: 

I am running into a lot of roadblocks trying to rebuild DJGPP on a Win95
machine. I'm something of a newbie to gnu, and unfortunately not as
savvy about things UNIX as I should be. So I'm probably doing something
pretty dumb, but if someone out there could point it out to me I would
greatly appreciate it. This note has 4 parts: statement of the problem,
description of my environment, discussion, and a batch file that I'm
trying to use to rebuild djgpp. Thanks in advance! -Michael Deck

PROBLEMS: 

* some make targets (eg distclean) only work when SHELL=bash, some only
work when SHELL=/bin/sh (eg all), some don't really seem to work with
either (eg stage1) 

* can't make DJGPP with -g because linking it gives me a "line number
too large" error

* if I just "make" and copy the resulting files, when I try to compile a
simple case I get "file not recognized: File format not recognized"
  
ENVIRONMENT:

Win95 on a Pentium 200 machine. Plenty of disk space. All of djgpp is
installed under e:\djgpp with directories as they come defaulted (i.e.
/djgpp/bin contains the executables). Base compiler from gcc2721b has
been running without a hitch for months. Now I want to rebuild from
source because I would like to get into the code and use some pieces of
the front end for another purpose. I also have downloaded and installed
the following (** indicates pieces I think are needed for rebuild of
DJGPP)

  faq210b.zip
  djtst201.zip
  ** djdev201.zip
  ** gcc2721b.zip
  gpp2721b.zip
  lgp271b.zip
  txi390b.zip
  bnu27b.zip
  sw21_doc.zip
  ** bsn124b.zip
  flx252b.zip
  rhide12b.zip
  ** mak375b.zip
  gdb416b.zip
  em1934b.zip
  rcs5712b.zip
  gcc2721d.zip
  ** sed118b.zip
  ** fil316b.zip
  ** bsh1147b.zip

DISCUSSION:

I placed gcc2721s.zip into \djgpp\source and unpacked using -d. I found
a number of fragmentary pieces of advice on the web and usenet alerting
me to some issues with rebuilding on DOS. The first is the problem with
LFN=Y. I have attempted to get around this problem through renaming
because I need to use the same system for building some other files that
require LFN=Y. 

The first problem I seem to run into is with make distclean. If I change
to SHELL=bash in Makefile, make distclean will work but make won't (dies
on attempt to genattr, says command not found). So I am running make
with the default SHELL=/bin/sh and changing that to bash any time I want
to distclean.

Since I have a complete djgpp environment already it didn't seem like I
should have to go through the 3-stage rebuild but maybe I do. But I
can't get make stage1 to work in either bash or /bin/sh settings of
SHELL. 

Part of the problem may be my lack of understanding of where the files
should go in a DOS environment. It seems like /usr/local isn't really
the right thing to have for the prefix but I don't know what else to
try. I have tried to capture all of my (pitifully incomplete) knowledge
in the following .BAT file. Maybe there are clues there...

Of course I've copied my prior /bin and /lib directories in case this
doesn't work so every time I'm using straight gcc2721b binaries. 

======== DOS Batch File for Rebuilding DJGPP =========================

cd \djgpp\source
deltree gnu
\pk\pkunzip -d gcc2721s.zip

cd gnu\gcc-2721
REM The following rename overcomes an LFN problem
rename config\msdos\configur.bat configure.bat
command /c configur go32

REM Changes to Makefile
REM   change "$(srcdir)\bytecode.def"  "$(srcdir)/bytecode.def" in 3
places: ln 1273, 1279, 1285
REM   check SHELL
REM   change prefix = /djgpp
REM   change local_prefix = /djgpp/local
REM   change gxx_include_dir= $(prefix)/lang/cxx
PAUSE EDIT makefile

REM The following copy allows Makefile to proceed
copy   configur.bat configure

REM The following renames overcome LFN problems
rename c-parse.gpe c-parse.gperf
rename c-conver.c c-convert.c
rename c-aux-in.c c-aux-info.c
rename c-iterat.c c-iterate.c
rename move-if- move-if-change
rename print-tr.c print-tree.c
rename stor-lay.c stor-layout.c
rename fold-con.c fold-const.c
rename hard-reg.h hard-reg-set.h
rename genconfi.c genconfig.c
rename bc-typec.h bc-typecd.h
rename bc-typec.def bc-typecd.def
rename bi-opcod.c bi-opcode.c
rename bi-parse.y bi-parser.y
rename bi-rever.c bi-reverse.c
rename typeclas.h typeclass.h 
rename print-rt.c print-rtl.c
rename bi-opnam.c bi-opname.c
rename integrat.c integrate.c
rename integrat.h integrate.h
rename basic-bl.h basic-block.h
rename local-al.c local-alloc.c
rename local-al.h local-alloc.h
rename caller-s.c caller-save.c
rename conditio.h conditions.h
rename reg-stac.c reg-stack.c
rename genopini.c genopinit.c
rename genextra.c genextract.c
rename genoutpu.c genoutput.c
rename genattrt.c genattrtab.c
rename bytetype.h bytetypes.h
rename objc-tre.def objc-tree.def

REM We make with CFLAGS= because -g crashes the linker
PAUSE ready to make?
make "CFLAGS="  "LANGUAGES=c c++"

REM Changes to cp/Makefile
REM   add closing"'" to `echo $(PARSE_C) line 195
PAUSE EDIT cp/makefile

PAUSE ready to cp/make?
cd cp
make "CFLAGS="

cd ..

PAUSE Ready to copy binaries? 
cp cc1.exe /djgpp/bin
cp cc1plus.exe /djgpp/bin
cp cc1obj /djgpp/bin 
cp cccp.exe /djgpp/bin/cpp.exe

REM I don't know what the following line does -MDD
ln -s /djgpp/bin/cpp.exe /djgpp/bin/cccp.exe
cp xgcc.exe /djgpp/bin/gcc.exe
cp libgcc.a /djgpp/lib

cd \djgpp\mddtest
gcc -o test.exe test.cc -lgpp

- Raw text -


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