This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: ARM Simulator build broken
On Wed, 2004-11-17 at 15:03, Richard Earnshaw wrote:
> On Tue, 2004-11-16 at 15:35, Hans-Peter Nilsson wrote:
> > > From: Richard Earnshaw <rearnsha@gcc.gnu.org>
> > > Cc: gdb-patches@sources.redhat.com
> >
> > > Here's my proposed patch:
> > >
> > > <date> Richard Earnshaw <rearnsha@arm.com>
> > >
> > > * Make-common.in (sim_basics_headers): New.
> > > (sim_main_headers): Move basics headers and sub-dependencies
> > > to sim_basics_headers). Add the dependencies through that.
> > > (sim-load.c): Depend on sim_basics_headers not
> > > sim_main_headers.
> > >
> > > OK?
> >
> > I was preparing almost the same patch, just naming the macro
> > sim_basics_h_headers!
> >
> > BTW, you shouldn't have edited out sim-arange.c, a gcc -MM says
> > it's actually included from sim-basics.h (and from looking at
> > the code). For the same reason sim-assert.h should be in
> > sim_basics_headers. Maybe all files should use the
> > $(sim-assert_h) et al macros.
>
> The list of headers I used was the list directly in sim-basics.h. I
> only moved existing includes from sim_main_headers and then added
> further ones at the first level that were obviously missing. So if it's
> wrong now it was wrong before.
>
> The best way to do all this is to define a series of macros
> sim-basics_h, sim-assert-h etc, and for each of these to list the macros
> that form the direct dependencies.
>
> But that's a fair bit of work... :-( ... and it needs active
> maintenance to keep it up to date.
>
> R.
Attached is a revised version of the patch that implements this for
sim-*.h. Really further work should be done so that the C files depend
on the correct headers rather than all depending on sim_main_headers.
R.
Index: Make-common.in
===================================================================
RCS file: /cvs/src/src/sim/common/Make-common.in,v
retrieving revision 1.14
diff -p -r1.14 Make-common.in
*** Make-common.in 16 Nov 2004 07:02:26 -0000 1.14
--- Make-common.in 17 Nov 2004 16:02:17 -0000
*************** stamp-tvals: gentmap
*** 298,341 ****
sim_main_headers = \
sim-main.h \
! $(srccom)/sim-assert.h \
! $(srccom)/sim-base.h \
! $(srccom)/sim-basics.h \
! $(srccom)/sim-config.h \
! $(srccom)/sim-cpu.h \
! $(srccom)/sim-engine.h \
! $(srccom)/sim-events.h \
! $(srccom)/sim-inline.h \
! $(srccom)/sim-memopt.h \
! $(srccom)/sim-model.h \
! $(srccom)/sim-module.h \
! $(srccom)/sim-profile.h \
! $(srccom)/sim-signal.h \
! $(srccom)/sim-trace.h \
! $(srccom)/sim-utils.h \
! $(srccom)/sim-watch.h \
! tconfig.h \
$(SIM_EXTRA_DEPS)
# Exported version of sim_main_headers.
SIM_MAIN_DEPS = \
$(sim_main_headers)
sim-assert_h = $(srccom)/sim-assert.h
! sim-endian_h = $(srccom)/sim-endian.h
! sim-n-endian_h = $(srccom)/sim-n-endian.h
! sim-arange_h = $(srccom)/sim-arange.h
! sim-bits_h = $(srccom)/sim-bits.h
sim-config_h = $(srccom)/sim-config.h
- sim-n-bits_h = $(srccom)/sim-n-bits.h
sim-core_h = $(srccom)/sim-core.h
! sim-n-core_h = $(srccom)/sim-n-core.h
sim-engine_h = $(srccom)/sim-engine.h
sim-events_h = $(srccom)/sim-events.h
sim-fpu_h = $(srccom)/sim-fpu.h
sim-io_h = $(srccom)/sim-io.h
sim-options_h = $(srccom)/sim-options.h
sim-signal_h = $(srccom)/sim-signal.h
hw-alloc_h = $(srccom)/hw-alloc.h
hw-base_h = $(srccom)/hw-base.h
--- 298,374 ----
sim_main_headers = \
sim-main.h \
! $(sim-assert_h) \
! $(sim-base_h) \
! $(sim-cpu_h) \
! $(sim-engine_h) \
! $(sim-events_h) \
! $(sim-memopt_h) \
! $(sim-model_h) \
! $(sim-module_h) \
! $(sim-profile_h) \
! $(sim-trace_h) \
! $(sim-watch_h) \
! $(sim-basics_h) \
$(SIM_EXTRA_DEPS)
# Exported version of sim_main_headers.
SIM_MAIN_DEPS = \
$(sim_main_headers)
+ sim-alu_h = $(srccom)/sim-alu.h
+ sim-arange_h = $(srccom)/sim-arange.h \
+ $(srccom)/sim-arange.c
sim-assert_h = $(srccom)/sim-assert.h
! sim-base_h = $(srccom)/sim-base.h \
! $(sim-module_h) \
! $(sim-trace_h) \
! $(sim-core_h) \
! $(sim-events_h) \
! $(sim-profile_h) \
! $(sim-model_h) \
! $(sim-io_h) \
! $(sim-engine_h) \
! $(sim-watch_h) \
! $(sim-memopt_h) \
! $(sim-cpu_h)
! sim-basics_h = $(srccom)/sim-basics.h \
! cconfig_h \
! tconfig_h \
! $(sim-config_h) \
! $(sim-inline_h) \
! $(sim-types_h) \
! $(sim-bits_h) \
! $(sim-endian_h) \
! $(sim-signal_h) \
! $(sim-arange_h) \
! $(sim-utils_h)
! sim-bits_h = $(srccom)/sim-bits.h \
! $(srccom)/sim-bits.c
sim-config_h = $(srccom)/sim-config.h
sim-core_h = $(srccom)/sim-core.h
! sim-cpu_h = $(srccom)/sim-cpu.h
! sim-endian_h = $(srccom)/sim-endian.h \
! $(srccom)/sim-endian.c
sim-engine_h = $(srccom)/sim-engine.h
sim-events_h = $(srccom)/sim-events.h
sim-fpu_h = $(srccom)/sim-fpu.h
+ sim-hw_h = $(srccom)/sim-hw.h
+ sim-inline_h = $(srccom)/sim-inline.h
sim-io_h = $(srccom)/sim-io.h
+ sim-memopt_h = $(srccom)/sim-memopt.h
+ sim-model_h = $(srccom)/sim-model.h
+ sim-module_h = $(srccom)/sim-module.h
+ sim-n-bits_h = $(srccom)/sim-n-bits.h
+ sim-n-core_h = $(srccom)/sim-n-core.h
+ sim-n-endian_h = $(srccom)/sim-n-endian.h
sim-options_h = $(srccom)/sim-options.h
+ sim-profile_h = $(srccom)/sim-profile.h
sim-signal_h = $(srccom)/sim-signal.h
+ sim-trace_h = $(srccom)/sim-trace.h
+ sim-types_h = $(srccom)/sim-types.h
+ sim-utils_h = $(srccom)/sim-utils.h
+ sim-watch_h = $(srccom)/sim-watch.h
hw-alloc_h = $(srccom)/hw-alloc.h
hw-base_h = $(srccom)/hw-base.h
*************** sim-utils.o: $(srccom)/sim-utils.c $(sim
*** 473,479 ****
sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
! sim-load.o: $(srccom)/sim-load.c $(callback_h) $(sim_main_headers) $(remote_sim_h)
$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
--- 506,512 ----
sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
! sim-load.o: $(srccom)/sim-load.c $(callback_h) $(sim_basics_h) $(remote_sim_h)
$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)