This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: V3 PATCH: Use -rpath, not --rpath, when testing
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: V3 PATCH: Use -rpath, not --rpath, when testing
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- Date: 29 Oct 2000 22:20:17 -0600
- Cc: Alexandre Oliva <aoliva at redhat dot com>, libstdc++ at sources dot redhat dot com
- References: <Pine.SOL.3.91.1001029172153.23871A@taarna.cygnus.com>
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