This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Initialization of hpux_threads


Jimmy Guo wrote:
> 
> On Fri, 17 Mar 2000, Michael Snyder wrote:
> 
> >John David Anglin wrote:
> >>
> >> Thu Mar 16 16:49:27 EST 2000  John David Anglin  <dave@hiauly1.hia.nrc.ca>
> >>
> >>         * configure.in: Don't call _initialize_hpux_thread twice.
> >>         * configure: Regenerated.
> >>
> >> --- configure.in.orig   Mon Mar  6 18:30:12 2000
> >> +++ configure.in        Thu Mar 16 14:22:26 2000
> >> @@ -330,7 +330,6 @@
> >>              AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT)
> >>              CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
> >>              CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
> >> -           CONFIG_INITS="${CONFIG_INITS} hpux-thread.c"
> >>           else
> >>              AC_MSG_RESULT(no (suppressed because you are not using GCC))
> >>           fi
> >
> >If someone from HP will approve this, I will check it in...
> >
> >                               Michael Snyder
> 
> This looks fine.  Just an observation:
> CONFIG_OBS is part of DEPFILES, which is part of COMMON_OBS, which is
> part of OBS, which is part of INITFILES.  It looks like all three usages
> of CONFIG_INITS in configure.in can be removed.  Maybe you can just
> remove CONFIG_INITS altogether in configure.in and Makefile.in.  Since
> OBS file list is already looked at by init.c rule, it really makes no
> sense to maintain a CONFIG_INITS file list.

No. CONFIG_INITS was added because things get complicated when adding
sub-directory files (eg MI) that contain _initialize_*() functions.  The
mistake was to assume that it was needed in all (rather than special)
cases.

By doing this the MI avoided the need to add any nasty initialization
hooks to main() - unlike tui, MPW, and GDBTK.

	Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]