Skip to content
Browse files

Move the patch for making the GNU assembler into the configuration sc…

…ript.

Estimated hours taken: 1

Move the patch for making the GNU assembler into the configuration script.

README.Linux-Alpha:
configure.in:
bindist/bindist.configure.in:
scripts/mgnuc.in:
	Autodetect whether "as" does full pre-processing or not.
	Set AS accordingly in mgnuc.
  • Loading branch information...
1 parent b44b4f7 commit c851b75aeb6fa4d11aabbf564d6a44592109a384 Tyson Dowd committed
Showing with 33 additions and 21 deletions.
  1. +2 −21 README.Linux-Alpha
  2. +31 −0 bindist/bindist.configure.in
View
23 README.Linux-Alpha
@@ -1,22 +1,3 @@
-For Linux/Alpha you need to apply the patch below.
-Just type `patch scripts/mgnuc < README.Linux-Alpha'.
-This patch is needed to make the Boehm collector work
-with the GNU assembler on Alphas.
-Index: mgnuc.in
-===================================================================
-RCS file: /home/mercury1/repository/mercury/scripts/mgnuc.in,v
-retrieving revision 1.48
-diff -u -u -r1.48 mgnuc.in
---- mgnuc.in 1998/03/11 05:58:58 1.48
-+++ mgnuc.in 1998/04/01 18:34:19
-@@ -60,7 +60,8 @@
- CC=${MERCURY_C_COMPILER="@CC@"}
- CFLAGS_FOR_REGS="@CFLAGS_FOR_REGS@"
- CFLAGS_FOR_GOTOS="@CFLAGS_FOR_GOTOS@"
--AS=as
-+# AS=as
-+AS="gcc -c -x assembler-with-cpp"
-
- case "$CC" in
- *gcc*)
+Linux/Alpha needs no special treatment at present.
+
View
31 bindist/bindist.configure.in
@@ -185,6 +185,37 @@ if test "$MKTEMP" = ""; then
fi
AC_SUBST(MKTEMP)
#-----------------------------------------------------------------------------#
+AC_PATH_PROG(AS,as)
+AC_MSG_CHECKING(whether the assembler does full preprocessing)
+
+AC_CACHE_VAL(mercury_cv_asm_does_full_preprocessing, [
+if test "$AS" != ""; then
+ # check that it really works
+ cat > conftest.s << EOF
+
+# define foo(x) \
+ /* foo */
+
+ foo(x)
+EOF
+ if
+ echo $AS conftest.s >&AC_FD_CC 2>&1 &&
+ $AS conftest.s </dev/null >&AC_FD_CC 2>&1
+ then
+ mercury_cv_asm_does_full_preprocessing="yes"
+ else
+ AS="gcc -c -x assembler-with-cpp"
+ mercury_cv_asm_does_full_preprocessing="no"
+ AC_MSG_RESULT(no)
+ fi
+ rm -f conftest*
+else
+ AS="gcc -c -x assembler-with-cpp"
+fi
+])
+AC_MSG_RESULT($mercury_cv_asm_does_full_preprocessing)
+AC_DEFINE(AS)
+#-----------------------------------------------------------------------------#
AC_PROG_CC
AC_SUBST(CC)
#-----------------------------------------------------------------------------#

0 comments on commit c851b75

Please sign in to comment.
Something went wrong with that request. Please try again.