diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-10-05 03:40:52 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-10-05 03:40:52 +0200 |
commit | c645986437b143ae30eb76808c60a7471ac5d511 (patch) | |
tree | 29bb86e15a0bd08a64e96b8fdf40571f0c5e9cc3 /mpn/Makeasm.am | |
parent | 5015c353eb7b75880e488a1268544480b07b192a (diff) | |
download | gmp-c645986437b143ae30eb76808c60a7471ac5d511.tar.gz |
* mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
Diffstat (limited to 'mpn/Makeasm.am')
-rw-r--r-- | mpn/Makeasm.am | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/mpn/Makeasm.am b/mpn/Makeasm.am index 87c67532e..9efe1e2c3 100644 --- a/mpn/Makeasm.am +++ b/mpn/Makeasm.am @@ -25,6 +25,11 @@ COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +# Flags used for preprocessing (in ansi2knr rules). +# +PREPROCESS_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) + # Recent versions of automake (1.5 and up for instance) append automake # generated suffixes to this $(SUFFIXES) list. This is essential for us, @@ -57,20 +62,22 @@ RM_TMP = rm -f # .S assembler, preprocessed with cpp. # -# It was vaguely intended that CCAS would just be asked to assemble .s -# files, not do a combined preprocess and assemble, certainly that's how it -# was in the past. But arranging that for .S.lo would require something -# like the .asm.lo handling below, so instead take the easy way and pass .S -# directly. Since normally CCAS="$CC -c" the only thing lost from the past -# is removing "#line" and "#file" lines left by cpp. Let's hope CCAS is -# smart enough to do that itself if it's needed. +# It's necessary to run $(CPP) separately, since it seems not all compilers +# recognise .S files, in particular "cc" on HP-UX 10 and 11 doesn't (and +# will silently do nothing if given a .S). +# +# For .lo we need a helper script, as described below for .asm.lo. # .S.o: - $(CCAS) $(COMPILE_FLAGS) `test -f $< || echo '$(srcdir)/'`$< + $(CPP) $(PREPROCESS_FLAGS) `test -f $< || echo '$(srcdir)/'`$< | grep -v '^#' >tmp-$*.s + $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ + $(RM_TMP) tmp-$*.s .S.obj: - $(CCAS) $(COMPILE_FLAGS) `cygpath -w $<` + $(CPP) $(PREPROCESS_FLAGS) `cygpath -w $<` | grep -v '^#' >tmp-$*.s + $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ + $(RM_TMP) tmp-$*.s .S.lo: - $(LIBTOOL) --mode=compile $(CCAS) $(COMPILE_FLAGS) -o $@ `test -f $< || echo '$(srcdir)/'`$< + $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/cpp-ccas --cpp="$(CPP) $(PREPROCESS_FLAGS)" $(CCAS) $(COMPILE_FLAGS) `test -f $< || echo '$(srcdir)/'`$< # .asm assembler, preprocessed with m4. |