Commit Graph

15 Commits

Author SHA1 Message Date
Marcus Shawcroft 332a6236a2 Fix multilib libgloss selection.
Regression testing newlib in conjunction with libgloss and
--enable-multilib can result in incompatible multilib versions of
newlib and libgloss being used during link.

This manifests on ARM target when newlib regression is run using a
GCC configured using --with-multilib-list=aprofile

With this configuration many of the multilib variants built are
mutually incompatible.

The issue is that the newlib dejagnu foo iterates each multilib
variant and correctly chooses the appropriate newlib variant but
always chooses the root/base libgloss variant.

The implementation of newlib/testsuite/lib/flags.exp contains the
following fragment:

set target_build_path "$objdir/$multibuildtop.."

The effect of this fragment is to explicitly select the root version
of libgloss, irrespective of the current multilib.

Digging around in VC it appears that the original implementation of
multlib magic came into the tree back in 2002 with:

6e9d950a (Thomas Fitzsimmons 2002-05-01 17:06:25 +0000 39)

In this initial version of multilib support, newlib was multilib
capable, but libgloss was not multilib capable, hence the necessity to
explicitly select the root libgloss version.

Subsequently flags.exp was modified to support out of tree testing:

cec1d3b4 (Jeff Johnston      2005-07-05 00:11:50 +0000 25)

This change is orthogonal to this issue, its effect is to exit early
in none multilib configurations.

Subsequently libgloss gained --enable-multilib support, the relevant
change is:

https://sourceware.org/ml/newlib/2006/msg00440.html
commit 00a4b31ad0
Author: Jeff Johnston <jjohnstn@redhat.com>
Date: Wed May 10 20:51:41 2006 +0000

This change enabled multilib support throughout libgloss, but ommitted
to adjust the flag.exp behaviour which anchors the libgloss multilib
selection to the base version.

The attached patch adjusts flags.exp to select the current multilib
variant of libgloss.

2015-11-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>

        * testsuite/lib/flags.exp (libgloss_link_flags): Drop multilibtop
        from target_build_path.
2015-11-12 13:48:06 +01:00
Jeff Johnston c9925bf497 2011-09-08 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/lib/flags.exp: Add logic to add the
        srcdir include directory to compile flags.
2011-09-08 16:18:23 +00:00
Kazu Hirata 07278e6cc7 * testsuite/lib/flags.exp (newlib_include_flags): Drop
-I${newlib_dir}.
2007-04-05 16:53:17 +00:00
Jeff Johnston b776efc599 2005-07-18 Joseph S. Myers <joseph@codesourcery.com>
* testsuite/lib/checkoutput.exp (newlib_check_output): Use test
        names after PASS and FAIL which do not depend on source directory
        name or on whether test passed or failed.
        * testsuite/lib/passfail.exp (newlib_pass_fail): Likewise.
2005-07-18 19:07:49 +00:00
Jeff Johnston cec1d3b414 2005-07-04 Mark Mitchell <mark@codesourcery.com>
* Makefile.am (site.exp): Set tmpdir.
        * Makefile.in: Regenerated.
        * testsuite/lib/checkoutput.exp (newlib_check_output): Put
        executables in $tmpdir.
        * testsuite/lib/flags.exp (libgloss_link_flags): Use the original
        libgloss version if not running in the build directory.
        * testsuite/lib/newlib.exp (newlib_init): Put testglue.o in
        $tmpdir.
        * testsuite/lib/passfail.exp (newlib_pass_fail): Put executables
        in $tmpdir.
2005-07-05 00:11:50 +00:00
Jeff Johnston 665b994e3a 2002-11-14 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/lib/passfail.exp (newlib_pass_fail): Changed to
        only issue one pass/fail message for a compile/link/execute.
        * testsuite/newlib.elix/elix.exp: New file.
        * testsuite/newlib.elix/tmmap.c: Ditto.
2002-11-14 23:04:05 +00:00
Jeff Johnston 94c5b430a1 2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/include/check.h: New header file to use with
        test cases.
        * testsuite/lib/newlib.exp: Add testsuite/include directory
        to list of header files to use.
        * testsuite/newlib.wctype/twctype.c: New test case for iswctype fns.
        * testsuite/newlib.wctype/wctype.exp: New file.
2002-10-18 18:18:49 +00:00
Thomas Fitzsimmons c9ca68d7b5 * testsuite/lib/passfail.exp (newlib_pass_fail_all): New
procedure.
	(newlib_pass_fail): Change to compile and run only one file.
	* testsuite/newlib.locale/locale.exp: Use new
	newlib_pass_fail_all procedure.
	* testsuite/newlib.string/string.exp: Likewise.
2002-06-18 22:39:17 +00:00
Thomas Fitzsimmons a68fa57101 * testsuite/lib/newlib.exp: Add newlib_include_flags to compile
options when testing natively on i[3456]86-*-linux.
2002-05-16 00:17:50 +00:00
Thomas Fitzsimmons 3495f076f3 * testsuite/lib/checkoutput.exp (newlib_check_output): Output
only one pass or fail per test file.  Trim \r's from output
	values received from test programs.  Remove support for named
	tests.
	* testsuite/newlib.locale/UTF-8.exp: Update to support new
	newlib_check_output behaviour.
	* testsuite/newlib.locale/UTF-8.c: Likewise.
2002-05-15 23:48:47 +00:00
Thomas Fitzsimmons 6e9d950a91 * Add flags.exp. 2002-05-01 17:06:25 +00:00
Thomas Fitzsimmons 1e997c5625 * Makefile.am (site.exp): Remove newlib_cflags. Add
multibuildtop.
	* testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's.
	* testsuite/lib/flags.exp: New file.
	* testsuite/lib/newlib.exp: Load flags.exp.
	(newlib_target_compile): Remove libgloss directory references.
	(newlib_init): Remove newlib_cflags references.
2002-05-01 17:05:44 +00:00
Thomas Fitzsimmons f6bdb6f976 * testsuite/lib/newlib.exp (newlib_target_compile): Change
method of finding libgloss_target_dir.
2002-04-30 23:10:21 +00:00
Thomas Fitzsimmons 4cf4f010fb * Makefile.am (site.exp): Change host_alias, host_triplet,
target_alias, target_triplet to refer to gcc's host and target
	variables (newlib's build and host variables).
	* testsuite/lib/newlib.exp (newlib_init): Change build
	references to host references, host references to target
	references to reflect Makefile.am changes.
	(newlib_target_compile): Likewise.
	(newlib_finish): Likewise.
2002-04-30 22:38:07 +00:00
Thomas Fitzsimmons eaa75b70e3 * Makefile.am (check-DEJAGNU): New target.
(site.exp): Likewise.
	* acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
	with AC_CANONICAL_SYSTEM.  Remove AC_CANONICAL_BUILD.
	* libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
	* libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
	* libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
	* testsuite: New directory.
	* testsuite/config: Likewise.
	* testsuite/lib: Likewise.
	* testsuite/newlib.locale: Likewise.
	* testsuite/newlib.string: Likewise.
	* testsuite/config/default.exp: New file.
	* testsuite/lib/checkoutput.exp: New file.
	* testsuite/lib/newlib.exp: New file.
	* testsuite/lib/passfail.exp: New file.
	* testsuite/newlib.locale/UTF-8.c: New file.
	* testsuite/newlib.locale/UTF-8.exp: New file.
	* testsuite/newlib.locale/locale.exp: New file.
	* testsuite/newlib.string/string.exp: New file.
	* testsuite/newlib.string/tstring.c: New file.
2002-04-24 20:53:30 +00:00