Mail Archives: djgpp/1994/10/19/17:56:06
A new set of binutils was just released (which has
problems, but it has more complete linux support).
Here's the instructions I began to put together with
gcc 2.5.8/binutils 2.4 (it seems to cross-compile
well, I cross-compiled a number of applications, but
haven't used them much) -- the dosemu needs enough dpmi
support on linux to run go32 applications.
Anyway, its far preferable to compile on linux than dos...
There was a distribution on the Linux infomagic June release
of Linux cross-compiling, but I found it too cumbersome
(any distribution which untars into /usr I find cumbersome).
When binutils 2.5 is a little more stable, I'm going to look
at doing shared libraries with libbfd and come up with another
set of instructions. I'm using gcc 2.5.8 and there was just
one minor annoyance with stdarg.h over 2.6.0.
Cross compiling djgcc for linux (with 2.5.8 on slackware 2.0)
1) make binutils 2.4
specify:
--with-targets=i386-go32
2)
make gas
--with-targets=i386-go32
3) I have this script to run djgcc:
#! /bin/bash
# $Id$
export LIBRARY_PATH=/dos/gnu/lib:/u/marty/binutils-2.4/i486-unknown-linux/lib
include=/u/marty/binutils-2.4/djgpp-include
export LDEMULATION=i386go32
export GCC_EXEC_PREFIX=/u/marty/binutils-2.4/bin/
#exec gcc -nostdinc -idirafter /dos/gnu/include $*
exec gcc -idirafter $include -nostdinc ${1+"$@"}
I have another script to run cross tools:
#! /bin/bash
# $Id$
binutils=/u/marty/binutils
export LIBRARY_PATH=/dos/gnu/lib:/u/marty/binutils/i486-unknown-linux/lib
# export LDEMULATION=i386go32
export GCC_EXEC_PREFIX=/u/marty/binutils-2.4/bin/
export PATH=$binutils/bin:"$PATH"
export MANPATH=$binutils/man
export INFOPATH=$binutils/info
#exec gcc -nostdinc -idirafter /dos/gnu/include $*
${1+"$@"}
The idea is I can run
djcross man objdump
and get the man page for objdump or run
djcross size foo
and get foo's size...
4) I'm leaving the libraries on a dos file system with no conversion...
however, the header files have to be on an umsdos/unix file system
(since the compiler has to be able to detect \
at the end of a line).
5) I'm having problems with nm when I do:
--with-targets=linux,go32
6) I had problems with varags/stdargs (seems it changed between
2.5.8 and 2.6.0, so I'm:
marty AT compaq$ ls -l *arg*.h
lrwxrwxrwx 1 marty users 50 Sep 21 19:41 stdarg.h -> /usr/lib/gcc-lib/i486-linux/2.5.8/include/stdarg.h
lrwxrwxrwx 1 marty users 51 Sep 21 19:38 varargs.h -> /usr/lib/gcc-lib/i486-linux/2.5.8/include/varargs.h
(using the one's install with the compiler...
[do I need to recompile the libraries??? ]
marty
Member of the League of Programming Freedom
leisner AT sdsp DOT mc DOT xerox DOT com leisner AT eso DOT mc DOT xerox DOT com
- Raw text -