[m-rev.] diff: "gcc -mno-cygwin" fixes

Peter Ross pro at missioncriticalit.com
Wed Nov 29 15:49:37 AEDT 2006


Hi,


===================================================================


Estimated hours taken: 1
Branches: main

Get "gcc -mno-cygwin" as the C compiler to build under cygwin.

configure.in:
	Remove the \r before using the string result of c programs.

boehm_gc/Makefile:
	Add some - before ./if_not_there commands as these commands
	appear to fail to make, when they succeed.  I don't understand
	why.
	
robdd/Mmakefile:
util/Mmakefile:
	Add --no-mercury-stdlib-dir when compiling the C files otherwise
	one gets the C includes coming from the installed compiler which
	may not be compatible with -mno-cygwin.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.480
diff -U5 -r1.480 configure.in
--- configure.in	28 Nov 2006 06:57:41 -0000	1.480
+++ configure.in	29 Nov 2006 04:42:42 -0000
@@ -1395,10 +1395,11 @@
 	}],
 	[mercury_cv_word_type=`cat conftest.tags`],
 	[mercury_cv_word_type=unknown],
 	[mercury_cv_word_type=unknown])
 fi
+mercury_cv_word_type=`echo $mercury_cv_word_type | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_word_type)
 AC_DEFINE_UNQUOTED(MR_WORD_TYPE, $mercury_cv_word_type)
 MR_WORD_TYPE=$mercury_cv_word_type
 AC_SUBST(MR_WORD_TYPE)
 
@@ -1508,10 +1509,11 @@
 	}],
 	[mercury_cv_int_least32_type=`cat conftest.tags`],
 	[mercury_cv_int_least32_type=unknown],
 	[mercury_cv_int_least32_type=unknown])
 )
+mercury_cv_int_least32_type=`echo $mercury_cv_int_least32_type | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_int_least32_type)
 AC_DEFINE_UNQUOTED(MR_INT_LEAST32_TYPE, $mercury_cv_int_least32_type)
 MR_INT_LEAST32_TYPE=$mercury_cv_int_least32_type
 AC_SUBST(MR_INT_LEAST32_TYPE)
 
@@ -1569,10 +1571,11 @@
 	}],
 	[mercury_cv_int_least16_type=`cat conftest.tags`],
 	[mercury_cv_int_least16_type=unknown],
 	[mercury_cv_int_least16_type=unknown])
 )
+mercury_cv_int_least16_type=`echo $mercury_cv_int_least16_type | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_int_least16_type)
 AC_DEFINE_UNQUOTED(MR_INT_LEAST16_TYPE, $mercury_cv_int_least16_type)
 MR_INT_LEAST16_TYPE=$mercury_cv_int_least16_type
 AC_SUBST(MR_INT_LEAST16_TYPE)
 
@@ -1621,10 +1624,11 @@
 	}],
 	[mercury_cv_low_tag_bits=`cat conftest.tags`],
 	[mercury_cv_low_tag_bits=0],
 	[mercury_cv_low_tag_bits=0])
 )
+mercury_cv_low_tag_bits=`echo $mercury_cv_low_tag_bits | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_low_tag_bits)
 if test "$mercury_cv_low_tag_bits" -lt 2; then
 	if test "$BOOTSTRAP_MC" = ""; then
 		AC_MSG_ERROR(cannot bootstrap: low tag bits less than 2)
 		exit 1
@@ -1657,10 +1661,11 @@
 	}],
 	[mercury_cv_bytes_per_word=`cat conftest.wordbytes`],
 	[mercury_cv_bytes_per_word=0],
 	[mercury_cv_bytes_per_word=0])
 )
+mercury_cv_bytes_per_word=`echo $mercury_cv_bytes_per_word | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_bytes_per_word)
 AC_DEFINE_UNQUOTED(MR_BYTES_PER_WORD, $mercury_cv_bytes_per_word)
 BYTES_PER_WORD=$mercury_cv_bytes_per_word
 AC_SUBST(BYTES_PER_WORD)
 #-----------------------------------------------------------------------------#
@@ -1689,10 +1694,11 @@
 	}],
 	[mercury_cv_sync_term_size=`cat conftest.syncsize`],
 	[mercury_cv_sync_term_size=0],
 	[mercury_cv_sync_term_size=0])
 )
+mercury_cv_sync_term_size=`echo $mercury_cv_sync_term_size | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_sync_term_size)
 AC_DEFINE_UNQUOTED(MR_SYNC_TERM_SIZE, $mercury_cv_sync_term_size)
 SYNC_TERM_SIZE=$mercury_cv_sync_term_size
 AC_SUBST(SYNC_TERM_SIZE)
 #-----------------------------------------------------------------------------#
@@ -1714,10 +1720,11 @@
 	}],
 	[mercury_cv_bits_per_word=`cat conftest.wordbits`],
 	[mercury_cv_bits_per_word=0],
 	[mercury_cv_bits_per_word=0])
 )
+mercury_cv_bits_per_word=`echo $mercury_cv_bits_per_word | tr -d '\r'`
 AC_MSG_RESULT($mercury_cv_bits_per_word)
 AC_DEFINE_UNQUOTED(MR_BITS_PER_WORD, $mercury_cv_bits_per_word)
 BITS_PER_WORD=$mercury_cv_bits_per_word
 AC_SUBST(BITS_PER_WORD)
 #-----------------------------------------------------------------------------#
Index: boehm_gc/Makefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Makefile,v
retrieving revision 1.64
diff -U5 -r1.64 Makefile
--- boehm_gc/Makefile	2 Oct 2006 09:06:48 -0000	1.64
+++ boehm_gc/Makefile	29 Nov 2006 04:42:42 -0000
@@ -653,18 +653,18 @@
 	./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
 	./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
 	./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
 	-./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
-	./if_not_there mach_dep.o /bin/sh $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
+	-./if_not_there mach_dep.o /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 `cygpath -w /bin/sh` $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
-	./if_not_there mark_rts.o /bin/sh $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
+	-./if_not_there mark_rts.o /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.
 
 alloc.o: version.h
 
Index: robdd/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/Mmakefile,v
retrieving revision 1.2
diff -U5 -r1.2 Mmakefile
--- robdd/Mmakefile	15 Dec 2004 06:57:44 -0000	1.2
+++ robdd/Mmakefile	29 Nov 2006 04:42:42 -0000
@@ -10,11 +10,11 @@
 
 MERCURY_DIR=..
 include $(MERCURY_DIR)/Mmake.common
 
 
-MGNUC		= $(SCRIPTS_DIR)/mgnuc
+MGNUC		= $(SCRIPTS_DIR)/mgnuc --no-mercury-stdlib-dir
 
 EXTRA_CFLAGS	= -I$(BROWSER_DIR) -I$(LIBRARY_DIR) -I$(RUNTIME_DIR) \
 			-I$(BOEHM_GC_DIR) -I$(BOEHM_GC_DIR)/include
 
 CFILES	= bryant.c
Index: util/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/util/Mmakefile,v
retrieving revision 1.17
diff -U5 -r1.17 Mmakefile
--- util/Mmakefile	14 Jan 2005 05:53:44 -0000	1.17
+++ util/Mmakefile	29 Nov 2006 04:42:43 -0000
@@ -37,11 +37,12 @@
 #-----------------------------------------------------------------------------#
 
 all:	$(PROGS) $(TAGS_FILE_EXISTS)
 
 .c:
-	$(MGNUC) $(GRADEFLAGS) $(ALL_MGNUCFLAGS) -o $@ $< $(GETOPT_SRC)
+	$(MGNUC) --no-mercury-stdlib-dir \
+		$(GRADEFLAGS) $(ALL_MGNUCFLAGS) -o $@ $< $(GETOPT_SRC)
 
 tags:
 	ctags $(SRC)
 
 .PHONY: tags_file_exists

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list