Message-ID: <34C5205D.607CB8FD@gmx.net> Date: Tue, 20 Jan 1998 23:08:29 +0100 From: Robert Hoehne Organization: none provided MIME-Version: 1.0 To: "A.P. Zijlstra" CC: Chris Croughton , DJGPP Mailing list Subject: Re: DJ port of GCC 2.8.0? References: <34BF0266 DOT 6231 AT amc DOT de> <34C4982F DOT 4298 AT wins DOT uva DOT nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk A.P. Zijlstra wrote : > > yet). the configure.bat file dosn't work It is really old, and if you have installed all the GNU tools (fileutils, shellutils, ...) you don't need it. > , however the './configure --host=i386-go32-msdos --with-stabs > --prefix=c:/gnu' bash script does The "official" name for the DJGPP is i[3456]86-pc-msdosdjgpp and is recognised by configure already!! So do not use the --host switch, but the following patch --- gnu/gcc-2.80/configure.in~ Sat Jan 17 23:01:04 1998 +++ gnu/gcc-2.80/configure.in Sat Jan 17 22:30:34 1998 @@ -858,6 +858,13 @@ tm_file=i386/go32.h tmake_file=i386/t-go32 ;; + i[[3456]]86-pc-msdosdjgpp*) + xm_file=i386/xm-go32.h + tm_file=i386/go32.h + tmake_file=i386/t-go32 + gnu_ld=yes + gas=yes + ;; i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*) tm_file=i386/moss.h tmake_file=t-libc-ok and then run autoconf to get a updated configure script. > then edited all produced makefiles (./makefile ./cp/makefile > ./objc/makefile) to disable debug info in all objects (I havn't got That's now really a bad idea. running make CFLAGS=-O2 does the same. > after typing: ./make it runs for quite a while ( 486dx66, 20mb ram > argh). But stops with an error in compiling libgcc2.c (line 1724, > includeing sting.h) on some syntax error. Apply the following patch and it should work (of course before running the configure script!!) --- gnu/gcc-2.80/config/i386/t-go32~ Thu Jan 18 00:47:06 1996 +++ gnu/gcc-2.80/config/i386/t-go32 Sat Jan 17 23:54:26 1998 @@ -1,2 +1,7 @@ LIBGCC1 = libgcc1.null CROSS_LIBGCC1 = libgcc1.null + +# when building libgcc.a the following defines are needed to ignore +# the definitions in gansidecl.h +TARGET_LIBGCC2_CFLAGS=-DHAVE_BCOPY -DHAVE_BZERO -DHAVE_BCMP \ + -DHAVE_RINDEX -DHAVE_INDEX And last but not least, you will need some special tricks before running the configure script and also before running make. So I made two scripts, which are replacements of the configure script and the make command: --- gnu/gcc-2.80/djconfig.sh~ Sat Jan 17 22:51:48 1998 +++ gnu/gcc-2.80/djconfig.sh Sat Jan 17 23:42:08 1998 @@ -0,0 +1,35 @@ +# where are the sources? If you use (like I) to have the sources +# in a separate directory and the objects in an other, then set +# here the full path to the source directory and run this script +# in the directory where you want to build gcc!! +# WARNING: Only unix-like absolute paths are known to work, like +# +# /src/gcc-2.80 +# +# do not use any drive in it like +# +# c:/src/gcc-2.80 +# +# since this will confuse all that unix like scrips, which +# assume that a absolute path starts with a slash. +srcdir=. + +# just in case +export PATH_SEPARATOR=: + +# The following is needed, to get not the // syntax, when +# the configure script or the makefile calls pwd +current_drive=`pwd | sed 's,//\(.\).*,\1,'` +export SYSROOT=$current_drive:/ + +# give now the configure script some hints +export CC=gcc +export LD=ld +export DEFAULT_LEX=flex +export LEX=flex +# force to use cp instead of ln +export ac_cv_prog_LN_S=cp +export RANLIB=ranlib +export ac_cv_path_install="ginstall -c" +$srcdir/configure --srcdir=$srcdir --disable-shared --verbose + --- gnu/gcc-2.80/djmake.sh~ Sat Jan 17 22:51:56 1998 +++ gnu/gcc-2.80/djmake.sh Sat Jan 17 23:52:42 1998 @@ -0,0 +1,15 @@ +# just in case +export PATH_SEPARATOR=: + +# The following is needed, to get not the // syntax, when +# the configure script or the makefile calls pwd +current_drive=`pwd | sed 's,//\(.\).*,\1,'` +export SYSROOT=$current_drive:/ + +# set this to the wanted CFLAGS, I set here also the default output +# debugging type to stabs. +CFLAGS="-g -O2 -DPREFERRED_DEBUGGING_TYPE=DBX_DEBUG" + +# now call make with any additional commandline argument +make CFLAGS="$CFLAGS" $* + And a last note: Please use the above at your own risk, but it worked at least for me. > Is this my error, gnu's distributor or some other thingy I overlooked? Your problem is probably, that you haven't compiled so often a GNU package so you don't know, where to search and fix such common problems. Robert -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************