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

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.
This commit is contained in:
Peter Ross
2006-11-29 04:50:46 +00:00
parent 4b0663b520
commit c3db1eb9e4
4 changed files with 12 additions and 4 deletions

View File

@@ -655,14 +655,14 @@ mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
./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.

View File

@@ -1397,6 +1397,7 @@ if test "$mercury_cv_word_type" = unknown; then
[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
@@ -1510,6 +1511,7 @@ AC_CACHE_VAL(mercury_cv_int_least32_type,
[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
@@ -1571,6 +1573,7 @@ AC_CACHE_VAL(mercury_cv_int_least16_type,
[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
@@ -1623,6 +1626,7 @@ AC_CACHE_VAL(mercury_cv_low_tag_bits,
[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
@@ -1659,6 +1663,7 @@ AC_CACHE_VAL(mercury_cv_bytes_per_word,
[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
@@ -1691,6 +1696,7 @@ AC_CACHE_VAL(mercury_cv_sync_term_size,
[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
@@ -1716,6 +1722,7 @@ AC_CACHE_VAL(mercury_cv_bits_per_word,
[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

View File

@@ -12,7 +12,7 @@ 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

View File

@@ -39,7 +39,8 @@ MGNUCFLAGS-mkinit = --no-ansi
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)