[m-rev.] for review: another MinGW portability fix

Peter Ross peter.ross at miscrit.be
Sat Apr 7 19:36:14 AEST 2001


On Sat, Apr 07, 2001 at 07:21:00PM +1000, Fergus Henderson wrote:
> Estimated hours taken: 1
> 
> Another change needed to port Mercury to work on MinGW <http://www.mingw.org>.
> 
> boehm_gc/Makefile:
> 	If using "if_not_there foo.o $(CC) ..." fails,
> 	then try "if_not_there foo.o `cygpath -w /bin/sh` -c $(CC) ...".
> 	This is needed when `if_not_there.c' is compiled with MinGW,
> 	and $(CC) is a shell script (mgnuc), since `if_not_there.c'
> 	uses exec() and the MinGW exec() of course doesn't handle
> 	Bourne shell scripts.
> 
> Workspace: traveler:/home/administrator/0.10.1/port-to-mingw/mercury
> cvs -n diff -u boehm_gc/Makefile
> Index: boehm_gc/Makefile
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/boehm_gc/Makefile,v
> retrieving revision 1.44
> diff -u -r1.44 Makefile
> --- boehm_gc/Makefile	2001/02/12 04:28:12	1.44
> +++ boehm_gc/Makefile	2001/04/07 09:19:05
> @@ -384,12 +384,14 @@
>  	./if_mach HP_PA HPUX $(AS) -o hpux_test_and_clear.o $(srcdir)/hpux_test_and_clear.s
>  	./if_mach HP_PA HPUX $(CC) -c -o md_tmp.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
>  	./if_mach HP_PA HPUX ld -r -o mach_dep.o md_tmp.o hpux_test_and_clear.o
> -	./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
> +	-./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
> +	./if_not_there mach_dep.o `cygpath -w /bin/sh` $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
>  
>  mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
>  	rm -f mark_rts.o
>  	-./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
> -	./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
> +	-./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
> +	./if_not_there mark_rts.o `cygpath -w /bin/sh` $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
>  #	Work-around for DEC optimizer tail recursion elimination bug.
>  #  The ALPHA-specific line should be removed if gcc is used.
>  
I am not sure that this change will work on a non MinGW system, if you
have tested it and it doesn't cause any problems then commit away.

Pete
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list