summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/Makefile.in13
-rw-r--r--gcc/machmode.h15
-rw-r--r--gcc/mips-tfile.c2
-rw-r--r--gcc/system.h11
5 files changed, 29 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index da29b61f25a..614f1f95995 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+Tue Sep 21 18:29:11 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * machmode.h (HOST_PTR_PRINTF): Move from here ...
+
+ * system.h (HOST_PTR_PRINTF): ... to here.
+
+ * mips-tfile.c: Don't include machmode.h.
+
+ * Makefile.in (MACHMODE_H): New variable. Update to use it.
+ (mips-tfile.o): Don't depend on machmode.h.
+
Tue Sep 21 18:27:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* haifa-sched.c (sched_analyze): Rename local variable `region' to
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fa25f05d175..34473bf1a48 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -739,14 +739,15 @@ DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
# If it is, rm *.o is an easy way to do it.
# CONFIG_H = $(host_xm_file) $(tm_file)
CONFIG_H =
-RTL_BASE_H = rtl.h rtl.def machmode.h machmode.def
+MACHMODE_H = machmode.h machmode.def
+RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def machmode.h machmode.def tree-check.h
+TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h
DEMANGLE_H = $(srcdir)/../include/demangle.h
RECOG_H = recog.h
EXPR_H = expr.h insn-codes.h
-REGS_H = regs.h varray.h machmode.h machmode.def
+REGS_H = regs.h varray.h $(MACHMODE_H)
#
# Language makefile fragments.
@@ -1041,7 +1042,7 @@ libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
- machmode.h longlong.h frame.h gbl-ctors.h config.status
+ $(MACHMODE_H) longlong.h frame.h gbl-ctors.h config.status
# Actually build it in tmplibgcc2.a, then rename at end,
# so that libgcc2.a itself remains nonexistent if compilation is aborted.
-rm -f tmplibgcc2.a
@@ -1174,7 +1175,7 @@ s-mlib: $(srcdir)/genmultilib Makefile
# Build multiple copies of libgcc.a, one for each target switch.
stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
frame.h \
- $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
+ $(LIB2ADD) $(MACHMODE_H) longlong.h gbl-ctors.h config.status
for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
dir=`echo $$i | sed -e 's/;.*$$//'`; \
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
@@ -1605,7 +1606,7 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
-mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h machmode.h
+mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h
mips-tdump: mips-tdump.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 79ab7b046eb..eedcc5a0069 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -21,21 +21,6 @@ Boston, MA 02111-1307, USA. */
#ifndef HAVE_MACHINE_MODES
#define HAVE_MACHINE_MODES
-/* Strictly speaking, this isn't the proper place to include these definitions,
- but this file is included by every GCC file. */
-
-/* Provide a default way to print an address in hex via printf. */
-
-#ifndef HOST_PTR_PRINTF
-# ifdef HAVE_PRINTF_PTR
-# define HOST_PTR_PRINTF "%p"
-# else
-# define HOST_PTR_PRINTF \
- (sizeof (int) == sizeof (char *) ? "%x" \
- : sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
-# endif
-#endif /* ! HOST_PTR_PRINTF */
-
/* Make an enum class that gives all the machine modes. */
#define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER) SYM,
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 649d11fee9c..cbe7349088c 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -678,8 +678,6 @@ main ()
#include <stab.h> /* On BSD, use the system's stab.h. */
#endif /* not USG */
-#include "machmode.h"
-
#ifdef __GNU_STAB__
#define STAB_CODE_TYPE enum __stab_debug_code
#else
diff --git a/gcc/system.h b/gcc/system.h
index 9252098e8ec..fe8cae1071b 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -517,6 +517,17 @@ extern void abort ();
# define mkdir(a,b) mkdir(a)
#endif
+/* Provide a way to print an address via printf. */
+#ifndef HOST_PTR_PRINTF
+# ifdef HAVE_PRINTF_PTR
+# define HOST_PTR_PRINTF "%p"
+# else
+# define HOST_PTR_PRINTF \
+ (sizeof (int) == sizeof (char *) ? "%x" \
+ : sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
+# endif
+#endif /* ! HOST_PTR_PRINTF */
+
/* Get libiberty declarations. */
#include "libiberty.h"