Message ID | alpine.LFD.2.21.1911200139010.13542@redsun52.ssa.fujisawa.hgst.com |
---|---|
State | Accepted |
Headers | show |
Series | [v3] libgomp/test: Add flags to find libatomic in build-tree testing | expand |
On Wed, Nov 20, 2019 at 02:13:52AM +0000, Maciej W. Rozycki wrote: Ok with appropriate ChangeLog entry. > --- gcc.orig/libgomp/testsuite/lib/libgomp.exp > +++ gcc/libgomp/testsuite/lib/libgomp.exp > @@ -174,6 +174,20 @@ proc libgomp_init { args } { > # For build-tree testing, also consider the library paths used for builing. > # For installed testing, we assume all that to be provided in the sysroot. > if { $blddir != "" } { > + # The `-fopenacc' and `-fopenmp' options imply `-pthread', and > + # that implies `-latomic' on some hosts, so wire in libatomic > + # build directories. > + if [ishost "riscv*-*-linux*"] { > + set shlib_ext [get_shlib_extension] > + set atomic_library_path "${blddir}/../libatomic/.libs" > + if { [file exists "${atomic_library_path}/libatomic.a"] > + || [file exists \ > + "${atomic_library_path}/libatomic.${shlib_ext}"] } { > + lappend ALWAYS_CFLAGS \ > + "additional_flags=-L${atomic_library_path}" > + append always_ld_library_path ":${atomic_library_path}" > + } > + } > global cuda_driver_include > global cuda_driver_lib > if { $cuda_driver_include != "" } { Jakub
On Wed, 20 Nov 2019, Jakub Jelinek wrote:
> Ok with appropriate ChangeLog entry.
I've used one included with the submission. Change applied now, thanks
for your review.
Maciej
Index: gcc/libgomp/testsuite/lib/libgomp.exp =================================================================== --- gcc.orig/libgomp/testsuite/lib/libgomp.exp +++ gcc/libgomp/testsuite/lib/libgomp.exp @@ -174,6 +174,20 @@ proc libgomp_init { args } { # For build-tree testing, also consider the library paths used for builing. # For installed testing, we assume all that to be provided in the sysroot. if { $blddir != "" } { + # The `-fopenacc' and `-fopenmp' options imply `-pthread', and + # that implies `-latomic' on some hosts, so wire in libatomic + # build directories. + if [ishost "riscv*-*-linux*"] { + set shlib_ext [get_shlib_extension] + set atomic_library_path "${blddir}/../libatomic/.libs" + if { [file exists "${atomic_library_path}/libatomic.a"] + || [file exists \ + "${atomic_library_path}/libatomic.${shlib_ext}"] } { + lappend ALWAYS_CFLAGS \ + "additional_flags=-L${atomic_library_path}" + append always_ld_library_path ":${atomic_library_path}" + } + } global cuda_driver_include global cuda_driver_lib if { $cuda_driver_include != "" } {