Help redifining the LD make production

Peter Dufault
Thu Feb 24 12:48:00 GMT 2000

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:
# 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)"

DLLTOOL="${BINPREF}dlltool -k --as ${AS}"

# rlink $@ "$^" "$(LDADD)"


(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's and some's
and darned if I can figure out where to redefine the load production.

Peter Dufault (   Realtime development, Machine control,
HD Associates, Inc.               Fail-Safe systems, Agency approval

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list