This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Re: V3 PATCH: Use -rpath, not --rpath, when testing


Benjamin Kosnik <bkoz@redhat.com> writes:
> Great news about the irix port, Mark! Thanks for pitching in.
> > Since V3 is all libtoolized, why not use libtool here?  The current
> > scheme isn't going to work well on systems (like Solaris) that don't
> > use -rpath; Solaris uses -R instead, IIRC.
> 
> I'm unsure of what you're getting at here. Can you explain what you mean 
> by "use libtool here?" If there's a less kludgey way to do this, using 
> libtool, then let's do it.
> 
> The whole mkcheck thing is a bit of a gross hack, unfortunately. (You've 
> probably noticed this by now :] ). Some of the performace info was 
> necessary for tuning and making sure the library wasn't completely 
> insane, size and compile-time wise. I couldn't figure out a way to do 
> this with more conventional tools. I'm open to suggestions, however.

Preferably, the whole testsuite infrastructure should've used the
automake 'make check' support.  'mkcheck' or a similar script would
just have had to deal with one binary, and that too only running and
timing the binary, and the rest could've used the libtool, dependency,
and the (very small) test harness setup of automake.

Here's a possible outline for a testsuite/Makefile.am if you are
willing to use CVS automake:

  #--------------------------------------------------------
  AUTOMAKE_OPTIONS = subdir-objects

  TEST_ENV = time_binary

  check_PROGRAMS = $(test_names)
  TESTS = $(test_names)

  include $(srcdir)/tests.am

  INCLUDES = -nostdinc++ -I../include -I$(srcdir)/include

  LDADD = ../src/libstdc++.la

  if MAINT
  # assume GNU make for maintainer only
  $(srcdir)/tests.am: $(wildcard $(srcdir)/*/*.cc) $(test_names)
            cd $(srcdir); \
            echo 'test_names=' > $(@F); \
            for i in */*.cc; do \
                d=`dirname $$i`; f=`basename $$i .cc`; \
                echo "test_names += test_sh_$$d_$$f test_st_$$d_$$f">>$(@F); \
                echo "test_sh_$$d_$$f_SOURCES = $$i">>$(@F); \
                echo "test_st_$$d_$$f_SOURCES = $$i">>$(@F); \
                echo "test_st_$$d_$$f_LDFLAGS = -static">>$(@F); \
            done

  # handle deleted files
  $(test_names):
  endif
  #--------------------------------------------------------

where 'time_binary' has the timing parts from 'mkcheck'.  I haven't
tested this particular fragment, but I had tried something like this
before. 

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

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