aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-06-05 11:26:37 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-06-14 11:41:45 +0200
commit4bcb46b3ade1796c5a57b294f5cca25f00671cac (patch)
treef2dc223b7d68c446d43ff13e89cae8584ec23128 /libgomp
parente76af2162c7b768ef0a913d485c51a80b08a1020 (diff)
downloadgcc-4bcb46b3ade1796c5a57b294f5cca25f00671cac.zip
gcc-4bcb46b3ade1796c5a57b294f5cca25f00671cac.tar.gz
gcc-4bcb46b3ade1796c5a57b294f5cca25f00671cac.tar.bz2
driver: Forward '-lgfortran', '-lm' to offloading compilation
..., so that users don't manually need to specify '-foffload-options=-lgfortran', '-foffload-options=-lm' in addition to '-lgfortran', '-lm' (specified manually, or implicitly by the driver). gcc/ * gcc.cc (driver_handle_option): Forward host '-lgfortran', '-lm' to offloading compilation. * config/gcn/mkoffload.cc (main): Adjust. * config/nvptx/mkoffload.cc (main): Likewise. * doc/invoke.texi (foffload-options): Update example. libgomp/ * testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Don't set. * testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Likewise. * testsuite/libgomp.c/simd-math-1.c: Remove '-foffload-options=-lm'. * testsuite/libgomp.fortran/fortran-torture_execute_math.f90: Likewise. * testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90: Likewise.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.c/simd-math-1.c1
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f901
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran.exp2
-rw-r--r--libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f901
-rw-r--r--libgomp/testsuite/libgomp.oacc-fortran/fortran.exp2
5 files changed, 0 insertions, 7 deletions
diff --git a/libgomp/testsuite/libgomp.c/simd-math-1.c b/libgomp/testsuite/libgomp.c/simd-math-1.c
index 947bf60..dd2077c 100644
--- a/libgomp/testsuite/libgomp.c/simd-math-1.c
+++ b/libgomp/testsuite/libgomp.c/simd-math-1.c
@@ -4,7 +4,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -ftree-vectorize -fno-math-errno" } */
/* { dg-additional-options -foffload-options=amdgcn-amdhsa=-mstack-size=3000000 { target offload_target_amdgcn } } */
-/* { dg-additional-options -foffload-options=-lm } */
#undef PRINT_RESULT
#define VERBOSE 0
diff --git a/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90 b/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90
index 3348a0b..2d0caa6 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90
+++ b/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90
@@ -1,4 +1,3 @@
! { dg-do run }
-! { dg-additional-options -foffload-options=-lm }
include '../../../gcc/testsuite/gfortran.fortran-torture/execute/math.f90'
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index e69656b..32e4bb2 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -28,7 +28,6 @@ if { $blddir != "" } {
set lang_source_re {^.*\.[fF](|90|95|03|08)$}
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
}
-set lang_link_flags "-foffload=-lgfortran"
lappend ALWAYS_CFLAGS "compiler=$GFORTRAN_UNDER_TEST"
# Initialize dg.
@@ -63,7 +62,6 @@ if { $blddir != "" } {
unset libquadmath_library_path
unset lang_library_paths
}
-unset lang_link_flags
# All done.
dg-finish
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90 b/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90
index 1b2ac44..edc940c 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90
@@ -1,5 +1,4 @@
! { dg-do run }
!TODO { dg-prune-output {using 'vector_length \(32\)', ignoring 1} }
-! { dg-additional-options -foffload-options=-lm }
include '../../../gcc/testsuite/gfortran.fortran-torture/execute/math.f90'
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index 2e8aa22..e5844ad 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -30,7 +30,6 @@ if { $blddir != "" } {
set lang_source_re {^.*\.[fF](|90|95|03|08)$}
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
}
-set lang_link_flags "-foffload=-lgfortran"
lappend ALWAYS_CFLAGS "compiler=$GFORTRAN_UNDER_TEST"
# Initialize dg.
@@ -113,7 +112,6 @@ if { $blddir != "" } {
unset libquadmath_library_path
unset lang_library_paths
}
-unset lang_link_flags
# All done.
dg-finish