Mail Archives: cygwin/2000/02/24/15:41:12
I need help redefining the LD make production for the native CYGWIN
tools so that they will work "properly" under WINE (which needs relocable
exe's). I've figured out that this unfortunate script will do what I want:
-- Start rlink:
#!/bin/sh
# This creates a relocateable .exe that works under wine as a single
# script easily replacing a "gcc" line in a Makefile.
#
# This script is stupid. Just look at how it uses what should
# be Makefile args, etc.
#
# This unfortunate script can be kicked off from within a GNUmakefile as:
# rlink "$@" "$^" "$(LDADD)"
BINPREF=i586-cygwin32-
AS=${BINPREF}as
DLLTOOL="${BINPREF}dlltool -k --as ${AS}"
LINKER=${BINPREF}gcc
NM=${BINPREF}nm
# rlink $@ "$^" "$(LDADD)"
EXE=$1
LDARGS=$2
LDADD=$3
(echo EXPORTS > ${EXE}.exp) ||
(${NM} ${LDARGS} | sed -n "/^........ [DT] _/s/^........ [DT] _/ /p" >> ${EXE}.exp) &&
(${DLLTOOL} --dllname ${EXE} --output-exp ${EXE}.e --def ${EXE}.exp) &&
(${LINKER} ${CFLAGS} -o ${EXE} -Wl,--base-file,${EXE}.b ./${EXE}.e ${LDARGS} -s ${LDADD}) &&
(${DLLTOOL} --dllname ${EXE} \
--base-file ${EXE}.b --output-exp ./${EXE}.e --def ${EXE}.exp) &&
(${LINKER} ${CFLAGS} -o ${EXE} ${EXE}.e ${LDARGS} -s ${LDADD}) &&
(rm -f ${EXE}.e ${EXE}.b ${EXE}.exp)
exit $?
-- End rlink.
However, I can't figure out the "right way to do it", that is,
I can't figure out where I change one or two things and have this
sort of script (it doesn't have to be this, and I know it might have
something to do with "dllwrap") apply across the board.
Can anyone tell me how to do this properly?
I've crawled through some Makefile.in's and some Makefile.am's
and darned if I can figure out where to redefine the load production.
Peter
--
Peter Dufault (dufault AT hda DOT com) Realtime development, Machine control,
HD Associates, Inc. Fail-Safe systems, Agency approval
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -