diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index d7f31be13e..02dda8ca66 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,18 @@ +Wed Jan 29 12:32:41 1997 Michael Meissner + + * configure.in (sim_callback): If the gdb is post 4.16, configure + callback support from the common directory. + * configure: Regenerate. + + * Makefile.in (BUILT_SRC_WO_CONFIG): Add targ-vals.{h,def} and + targ-map.c. + (GDB_OBJ): Add callback support configured in. + (gentmap,targ-vals.def): Build from common directory. + (targ-vals.h,targ-map.c): Build by running gentmap. + (callback.o): Build from source in common directory. + (targ-map.o): Add dependency. + (clean): Remove gentmap. + Thu Jan 23 09:07:26 1997 Andrew Cagney * hw_trace.c (hw_trace_init_data): Delete. The trace options need diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index b14084e189..2917624fce 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -222,7 +222,8 @@ BUILT_SRC_WO_CONFIG = \ support.h support.c \ pk.h \ hw.h hw.c \ - filter_host.c + filter_host.c \ + targ-vals.h targ-map.c targ-vals.def BUILT_SRC = \ $(BUILT_SRC_WO_CONFIG) \ @@ -298,7 +299,7 @@ LIB_OBJ = \ options.o -GDB_OBJ = sim_calls.o +GDB_OBJ = sim_calls.o @sim_callback@ HW_SRC = @sim_hw_src@ HW_OBJ = @sim_hw_obj@ @@ -383,6 +384,30 @@ itable.o: itable.c itable.h mon.o: mon.c $(CPU_H) +# GDB after 4.16 expects the default_callback structure to be setup. +# As a kludge, build the common stuff here for now. +gentmap: ../common/gentmap.c Makefile targ-vals.def + $(CC_FOR_BUILD) $(BUILD_FLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS) + +targ-vals.def: ../common/nltvals.def + rm -f targ-vals.def + ln -s $< targ-vals.def || cp $< targ-vals.def + +targ-vals.h: Makefile gentmap $(srcdir)/../../move-if-change + rm -f tmp-vals.h + ./gentmap -h > tmp-vals.h + $(srcdir)/../../move-if-change tmp-vals.h targ-vals.h + +targ-map.c: Makefile gentmap $(srcdir)/../../move-if-change + rm -f tmp-map.c + ./gentmap -c > tmp-map.c + $(srcdir)/../../move-if-change tmp-map.c targ-map.c + +callback.o: ../common/callback.c targ-vals.h + $(CC) -c $(STD_CFLAGS) $< + +targ-map.o: targ-map.c targ-vals.h + # Rebuild options whenever something changes so the date/time is up to date. options.o: options.c $(BASICS_H) $(CPU_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile defines.h $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' '-DDGEN_FLAGS="$(DGEN_FLAGS)"' $< @@ -573,7 +598,7 @@ TAGS: $(BUILT_SRC) etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC) clean mostlyclean: - rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG) + rm -f tmp-* *.[oasi] core psim run igen dgen $(BUILT_SRC_WO_CONFIG) gentmap distclean realclean: clean rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log diff --git a/sim/ppc/configure b/sim/ppc/configure index 5dd42c8900..3ca1f5e031 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -2830,6 +2830,16 @@ else sim_devzero="" fi +echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6 +echo "configure:2835: checking for common simulator directory" >&5 +if test -e "${srcdir}/../common/callback.c"; then + echo "$ac_t""yes" 1>&6 + sim_callback="callback.o targ-map.o" +else + echo "$ac_t""no" 1>&6 + sim_callback="" +fi + @@ -2838,7 +2848,7 @@ AR=${AR-ar} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2842: checking for $ac_word" >&5 +echo "configure:2852: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2902,6 +2912,7 @@ fi + trap '' 1 2 15 @@ -3098,6 +3109,7 @@ s%@sim_model_issue@%$sim_model_issue%g s%@sim_stdio@%$sim_stdio%g s%@sim_termio@%$sim_termio%g s%@sim_devzero@%$sim_devzero%g +s%@sim_callback@%$sim_callback%g CEOF EOF diff --git a/sim/ppc/configure.in b/sim/ppc/configure.in index 1d34ab4417..daef6e2432 100644 --- a/sim/ppc/configure.in +++ b/sim/ppc/configure.in @@ -656,6 +656,16 @@ else sim_devzero="" fi +dnl Figure out if we are in the new Cygnus tree with a common directory or not +AC_MSG_CHECKING(for common simulator directory) +if test -e "${srcdir}/../common/callback.c"; then + AC_MSG_RESULT(yes) + sim_callback="callback.o targ-map.o" +else + AC_MSG_RESULT(no) + sim_callback="" +fi + AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS) AC_SUBST(HDEFINES) @@ -701,6 +711,7 @@ AC_SUBST(sim_model_issue) AC_SUBST(sim_stdio) AC_SUBST(sim_termio) AC_SUBST(sim_devzero) +AC_SUBST(sim_callback) AC_OUTPUT(Makefile, [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])