[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-10-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #14 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:d8ff4b96b4be3bb4346c045bd0a7337079eabf90

commit r14-4949-gd8ff4b96b4be3bb4346c045bd0a7337079eabf90
Author: Thomas Schwinge 
Date:   Mon Sep 11 11:36:31 2023 +0200

libatomic: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR109951]

Similar to commit fb5d27be272b71fb9026224535fc73f125ce3be7
"libgomp: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]",
this is commit 5ff06d762a88077aff0fb637c931c64e6f47f93d
"libatomic/test: Fix compilation for build sysroot" done differently,
avoiding build-tree testing use of any random gunk that may appear in
build-time 'CC'.

PR testsuite/109951
libatomic/
* configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'.
* Makefile.in: Regenerate.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/lib/libatomic.exp (libatomic_init): If
'--with-build-sysroot=[...]' was specified, use it for build-tree
testing.
* testsuite/libatomic-site-extra.exp.in (GCC_UNDER_TEST): Don't
set.
(SYSROOT_CFLAGS_FOR_TARGET): Set.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-10-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #13 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:967d4171b2eb0557e86ba28996423353f0f1b141

commit r14-4948-g967d4171b2eb0557e86ba28996423353f0f1b141
Author: Thomas Schwinge 
Date:   Mon Sep 11 10:50:00 2023 +0200

libffi: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR109951]

Similar to commit fb5d27be272b71fb9026224535fc73f125ce3be7
"libgomp: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]",
this is commit a0b48358cb1e70e161a87ec5deb7a4b25defba6b
"libffi/test: Fix compilation for build sysroot" done differently,
avoiding build-tree testing use of any random gunk that may appear in
build-time 'CC', 'CXX'.

PR testsuite/109951
libffi/
* configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'.
: Don't set 'CC_FOR_TARGET', 'CXX_FOR_TARGET', instead
set 'SYSROOT_CFLAGS_FOR_TARGET'.
* Makefile.in: Regenerate.
* configure: Likewise.
* include/Makefile.in: Likewise.
* man/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/lib/libffi.exp (libffi_target_compile): If
'--with-build-sysroot=[...]' was specified, use it for build-tree
testing.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-09-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #12 from CVS Commits  ---
The master branch has been updated by Ian Lance Taylor :

https://gcc.gnu.org/g:08dfde5a30ca818715e6d2bc2f2b592f8a98af77

commit r14-3909-g08dfde5a30ca818715e6d2bc2f2b592f8a98af77
Author: Ian Lance Taylor 
Date:   Tue Sep 12 09:11:48 2023 -0700

libgo: fix DejaGNU testsuite compiler when using build sysroot

Patch from Thomas Schwinge.

PR testsuite/109951
* configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'.
* Makefile.in: Regenerate.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/lib/libgo.exp (libgo_init): If
'--with-build-sysroot=[...]' was specified, use it for build-tree
testing.
* testsuite/libgo-test-support.exp.in (GOC_UNDER_TEST): Don't set.
(SYSROOT_CFLAGS_FOR_TARGET): Set.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/527755

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-09-12 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Thomas Schwinge  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
   See Also|https://gcc.gnu.org/bugzill |
   |a/show_bug.cgi?id=66005 |

--- Comment #11 from Thomas Schwinge  ---
This one (libgomp) is finally resolved, and three similar-in-spirit patches
submitted:

  - 
"libffi: Consider '--with-build-sysroot=[...]' for target libraries' build-tree
testing (instead of build-time 'CC' etc.) [PR109951]"
  - 
"libatomic: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR109951]"
  - 
"libgo: Consider '--with-build-sysroot=[...]' for target libraries' build-tree
testing (instead of build-time 'CC' etc.) [PR109951]"

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-09-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:fb5d27be272b71fb9026224535fc73f125ce3be7

commit r14-3870-gfb5d27be272b71fb9026224535fc73f125ce3be7
Author: Thomas Schwinge 
Date:   Thu Jun 1 23:07:37 2023 +0200

libgomp: Consider '--with-build-sysroot=[...]' for target libraries'
build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]

This is commit c8e759b4215ba4b376c9d468aeffe163b3d520f0 (Subversion
r279708)
"libgomp/test: Fix compilation for build sysroot" and follow-up
commit 749bd22ddc50b5112e5ed506ffef7249bf8e6fb3
"libgomp/test: Remove a build sysroot fix regression" done differently,
avoiding build-tree testing use of any random gunk that may appear in
build-time 'CC', 'CXX', 'FC'.

PR testsuite/91884
PR testsuite/109951
libgomp/
* configure.ac: Revert earlier changes, instead
'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'.
* Makefile.in: Regenerate.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/lib/libgomp.exp (libgomp_init): Remove
"Fix up '-funconfigured-libstdc++-v3' in 'GXX_UNDER_TEST'" code.
If '--with-build-sysroot=[...]' was specified, use it for
build-tree testing.
* testsuite/libgomp-site-extra.exp.in (GCC_UNDER_TEST)
(GXX_UNDER_TEST, GFORTRAN_UNDER_TEST): Don't set.
(SYSROOT_CFLAGS_FOR_TARGET): Set.
* testsuite/libgomp.c++/c++.exp (lang_source_re)
(lang_include_flags): Set for build-tree testing.
* testsuite/libgomp.oacc-c++/c++.exp (lang_source_re)
(lang_include_flags): Likewise.

Co-authored-by: Chung-Lin Tang 

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-09-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:d1bff1ba4d470f6723be83c0e3c4d5083e51877a

commit r14-3869-gd1bff1ba4d470f6723be83c0e3c4d5083e51877a
Author: Thomas Schwinge 
Date:   Thu Jun 1 23:07:37 2023 +0200

Pass 'SYSROOT_CFLAGS_FOR_TARGET' down to target libraries [PR109951]

..., where we need to use it (separate commits) for build-tree testing,
similar
to 'gcc/Makefile.in:site.exp':

# TEST_ALWAYS_FLAGS are flags that should be passed to every
compilation.
# They are passed first to allow individual tests to override them.
@echo "set TEST_ALWAYS_FLAGS \"$(SYSROOT_CFLAGS_FOR_TARGET)\"" >>
./site.tmp

PR testsuite/109951
* Makefile.tpl (BASE_TARGET_EXPORTS): Add
'SYSROOT_CFLAGS_FOR_TARGET'.
* Makefile.in: Regenerate.

Co-authored-by: Chung-Lin Tang 

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-06-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #8 from Iain Sandoe  ---
(In reply to Thomas Schwinge from comment #6)
> 
> "Consider '--with-build-sysroot=[...]' for target libraries' build-tree
> testing (instead of build-time 'CC' etc.) [PR109951]".

this fixes the problem for me;  I tried both a 64b host with a 32b multilib and
vice versa. (smoke tested a couple more test suites, including Ada, with no
apparent issues)

However, my configuration does not have --with-build-sysroot= so that aspect is
untested by me.  (it is not an option used often on Darwin because of problems
elsewhere in the configuration).

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-06-02 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #7 from Thomas Schwinge  ---
(In reply to Iain Sandoe from comment #4)
> I am also somewhat puzzled by what conditions I need to take advantage of
> the parallel running?
> Darwin has /usr/bin/getconf and AFAICT the number of cpus is reported OK
> both at runtime and during config, but it seems to be determined to run a
> single process.

Answered in  -- sorry,
forgot to put you in CC.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-06-02 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Thomas Schwinge  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #6 from Thomas Schwinge  ---

"Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing
(instead of build-time 'CC' etc.) [PR109951]".

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-06-01 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Thomas Schwinge  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=91884
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |tschwinge at gcc dot 
gnu.org

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #5 from Iain Sandoe  ---
Since AFAICT, there is only one piece of Darwin-specific code in the libgomp
TCL (which adds -shared-libgcc), I would expect the base phenomenon to be the
same on Linux.  What is not obvious there is why it seems to work in that case
(unless it's just Darwin's linker being 'picky').

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #4 from Iain Sandoe  ---
(In reply to Thomas Schwinge from comment #3)

> Looking at your "test x86_64 multilib on i686" case.

The situation is simply mirrored for an x86_64 host with an i686 non-native
lib.

> First, is my understanding correct, that 'GXX_UNDER_TEST'
> 'i686-apple-darwin9/libgomp/testsuite/site.exp' does contain the correct
> flags/paths for the default ("native", "i686") multilib, but incorrect for
> the other ("non-native", "x86_64") multilib?

Yes, this information is in a section included from "libgomp-site-extra.exp" 


## Begin content included from file libgomp-site-extra.exp.  Do not modify. ##

set GXX_UNDER_TEST {/scratch/10-5-leo/gcc-master/./gcc/xg++
-B/scratch/10-5-leo/gcc-master/./gcc/ -nostdinc++ -funconfigured-libstdc++-v3
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/src
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/src/.libs
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/libsupc++/.libs
-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/bin/
-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/lib/ -isystem
/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/include -isystem
/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/sys-include  
-fchecking=1}

^^^ yes this is correct for the native mlib, and wrong arch for the non-native.

## End content included from file libgomp-site-extra.exp. ##

>  Conversely, would
> 'i686-apple-darwin9/x86_64/libgomp/testsuite/site.exp' contain the correct
> flags/paths for the other ("non-native", "x86_64") multilib?  (..., but that
> latter file is never used, always the former 'site.exp'; similar to my
> "Indeed there is some confusion there" comment in
>  --
> but that one's benign, in contrast to your case).

Actually, there is no site.exp in that dir.  There is a
"libgomp-site-extra.exp" which does contain the correct paths.

set GXX_UNDER_TEST {/scratch/10-5-leo/gcc-master/./gcc/xg++
-B/scratch/10-5-leo/gcc-master/./gcc/ -nostdinc++ -funconfigured-libstdc++-v3
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libstdc++-v3/src
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libstdc++-v3/src/.libs
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libstdc++-v3/libsupc++/.libs
-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/bin/
-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/lib/ -isystem
/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/include -isystem
/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/sys-include
-fchecking=1  -m64}

^^^ Yes, this looks correct for testing the non-native x86_64 lib.


> Second, do you not have similar confusion in 'GCC_UNDER_TEST' and
> 'GFORTRAN_UNDER_TEST' flags/paths?

No. the confusion does not arise in either of those cases, since they do not
hardwire "-L" paths for the runtime libraries (I guess that they expect those
to be added by the consumer - which [I *think*] libgomp would do correctly).

Of course, there might be some other subtlety - that has just not yet surfaced.

> (May help me to attach all the relevant 'site.exp' files.)

I will sort that out tomorrow (if needed) - I've pasted in the relevant pieces
for the GXX_UNDER_TEST above.

> Third, see Maciej's Subversion r279708 (Git commit
> c8e759b4215ba4b376c9d468aeffe163b3d520f0) "libgomp/test: Fix compilation for
> build sysroot", followed by Git commit
> 749bd22ddc50b5112e5ed506ffef7249bf8e6fb3 "libgomp/test: Remove a build
> sysroot fix regression" (for libgomp, and similarly other commits for a
> number of (but not all?) other GCC target libraries).  This is what started
> capturing 'CC' for test-time use as 'GCC_UNDER_TEST', and this is what in
> recent commit 11f4d483600b5788a3d1cf1527e838e4a7ed1455 "libgomp testsuite:

I do not yet understand any of this ^^ ( hopefully, I will not need to :) )

> As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884]" I've then
> extended for 'CXX': 'GXX_UNDER_TEST', 'FC': 'GFORTRAN_UNDER_TEST'.  I
> however don't understand yet the original intent of his change; in my
> understanding, and as has been the case before, we'd just get
> 'GCC_UNDER_TEST' etc. populated by 'find_gcc' etc.

The principle seems reasonable, the issue is that it's currently not telling
the truth (i.e. it is _not_ the G**_UNDER_TEST) when the testing is in the
non-native multilib,

=

I am also somewhat puzzled by what conditions I need to take advantage of the
parallel running?
Darwin has /usr/bin/getconf and AFAICT the number of cpus is reported OK both
at runtime and during config, but it seems to be determined to run a single
process.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-25 Thread tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Thomas Schwinge  changed:

   What|Removed |Added

 CC||macro at orcam dot me.uk
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-05-25
 Ever confirmed|0   |1

--- Comment #3 from Thomas Schwinge  ---
Iain, sorry for this; let's track this down.

Looking at your "test x86_64 multilib on i686" case.

First, is my understanding correct, that 'GXX_UNDER_TEST'
'i686-apple-darwin9/libgomp/testsuite/site.exp' does contain the correct
flags/paths for the default ("native", "i686") multilib, but incorrect for the
other ("non-native", "x86_64") multilib?  Conversely, would
'i686-apple-darwin9/x86_64/libgomp/testsuite/site.exp' contain the correct
flags/paths for the other ("non-native", "x86_64") multilib?  (..., but that
latter file is never used, always the former 'site.exp'; similar to my "Indeed
there is some confusion there" comment in
 -- but
that one's benign, in contrast to your case).

Second, do you not have similar confusion in 'GCC_UNDER_TEST' and
'GFORTRAN_UNDER_TEST' flags/paths?

(May help me to attach all the relevant 'site.exp' files.)

Third, see Maciej's Subversion r279708 (Git commit
c8e759b4215ba4b376c9d468aeffe163b3d520f0) "libgomp/test: Fix compilation for
build sysroot", followed by Git commit 749bd22ddc50b5112e5ed506ffef7249bf8e6fb3
"libgomp/test: Remove a build sysroot fix regression" (for libgomp, and
similarly other commits for a number of (but not all?) other GCC target
libraries).  This is what started capturing 'CC' for test-time use as
'GCC_UNDER_TEST', and this is what in recent commit
11f4d483600b5788a3d1cf1527e838e4a7ed1455 "libgomp testsuite: As appropriate,
use the 'gcc', 'g++', 'gfortran' driver [PR91884]" I've then extended for
'CXX': 'GXX_UNDER_TEST', 'FC': 'GFORTRAN_UNDER_TEST'.  I however don't
understand yet the original intent of his change; in my understanding, and as
has been the case before, we'd just get 'GCC_UNDER_TEST' etc. populated by
'find_gcc' etc.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Richard Biener  changed:

   What|Removed |Added

Version|unknown |14.0
   Target Milestone|--- |14.0

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

--- Comment #2 from Iain Sandoe  ---
OK so the best bracket I've been able to get without doing surgery to make a
branch with a back port for the bootstrap break;

r14-803-g20ca33db817cec OK
r14-857-g30adfb85ff994c NOT OK,

My analysis could well also be flawed:
 * perhaps the bug is actually that GXX_UNDER_TEST should not contain
multi-lib-specific paths.
 * also maybe the include paths are not problematical - the issue might be
limited to the -L ones.

[Bug testsuite/109951] [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.

2023-05-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

Iain Sandoe  changed:

   What|Removed |Added

  Build||*-*-darwin*
   Keywords||testsuite-fail
   Host||*-*-darwin*
 Target||*-*-darwin*
 CC||tschwinge at gcc dot gnu.org

--- Comment #1 from Iain Sandoe  ---
s/GCC_UNDER_TEST/GXX_UNDER_TEST/ in the initial post.