]> git.ipfire.org Git - thirdparty/gcc.git/commit
driver: Forward '-lgfortran', '-lm' to offloading compilation
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 5 Jun 2023 09:26:37 +0000 (11:26 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 14 Jun 2023 09:41:45 +0000 (11:41 +0200)
commit4bcb46b3ade1796c5a57b294f5cca25f00671cac
treef2dc223b7d68c446d43ff13e89cae8584ec23128
parente76af2162c7b768ef0a913d485c51a80b08a1020
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.
gcc/config/gcn/mkoffload.cc
gcc/config/nvptx/mkoffload.cc
gcc/doc/invoke.texi
gcc/gcc.cc
libgomp/testsuite/libgomp.c/simd-math-1.c
libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90
libgomp/testsuite/libgomp.fortran/fortran.exp
libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp