When I build the tests ld fails with error:

/usr/src/Incubator/stdcxx/trunk/build/rwtest/librwtest.a(printf.o)(.text+0x37dd): In function `_rw_fmttm(FmtSpec const&, Buffer&, tm const*)':
: undefined reference to `__rw::__rw_memattr(void const*, unsigned, int)'

I discovered that ld looks through libraries in that order in which they are specified in a command line. __rw_memattr is referenced in librwtest.a and defined in libstd.a. For successful linking libstd.a should be after librwtest.a.

  I propose to change the line 78 in etc\config\GNUmakefile.tst

  from:

  $(TARGET): $(LIBDIR)/$(LIBNAME) $(BUILDDIR)/rwtest/$(RWTLIBNAME)

  to:

  $(TARGET): $(BUILDDIR)/rwtest/$(RWTLIBNAME) $(LIBDIR)/$(LIBNAME)

  or to:

$(TARGET): $(BUILDDIR)/rwtest/$(RWTLIBNAME) $(LIBDIR)/$(LIBNAME) $(BUILDDIR)/rwtest/$(RWTLIBNAME)

Farid.

Reply via email to