newlib-cygwin/newlib/testsuite
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
..
config
include 2005-01-27 Hans-Peter Nilsson <hp@axis.com> 2005-01-27 20:25:54 +00:00
lib Fix multilib libgloss selection. 2015-11-12 13:48:06 +01:00
newlib.elix
newlib.iconv 2004-01-27 Artem B. Bityuckiy <abitytsky@softminecorp.com> 2004-01-27 23:26:26 +00:00
newlib.locale
newlib.search
newlib.stdio Fix a build problem running the newlib testsuite on targets that only have 32-bit doubles. 2015-03-11 11:14:38 +00:00
newlib.stdlib * libc/include/stdint.h (SIZE_MIN): Remove. 2008-05-02 14:52:56 +00:00
newlib.string * libc/machine/arm/strcmp.S (compute_return_value): Fix return value. 2012-11-30 09:31:38 +00:00
newlib.wctype * testsuite/newlib.wctype/tiswctype.c (main): Use wide character type 2015-01-12 10:50:26 +00:00