diff mbox series

[OpenACC,og8] Use -lquadmath when compiling fortran with gcc driver

Message ID 1bc7ed0b-30fa-5dc2-23c9-4686438babc6@codesourcery.com
State New
Headers show
Series [OpenACC,og8] Use -lquadmath when compiling fortran with gcc driver | expand

Commit Message

Andrew Jenner Jan. 30, 2019, 5:44 p.m. UTC
I have committed this patch to openacc-gcc-8-branch. When invoking gcc 
to compile fortran code, fortran.exp is currently adding the options 
-lgfortran -foffload=-lgfortran to the gcc command line. libgfortran 
statically links to libquadmath and the gfortran driver invokes the 
linker with -lquadmath as well as -lgfortran so fortran.exp should do so 
too.

Ideally, fortran testsuites should invoke the compiler as gfortran 
instead of gcc, but this is a stopgap measure to unblock testing until 
this work is done.

Note that we do not add -foffload=-lquadmath as doing so causes 
powerpc64le-none-linux-gnu-accel-nvptx-none-gcc to report "error opening 
libquadmath.a".


	libgomp/
	* testsuite/libgomp.fortan/fortran.exp (lang_link_flags): Add
	-lquadmath.
	* testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags):
	Add -lquadmath.
diff mbox series

Patch

diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp 
b/libgomp/testsuite/libgomp.fortran/fortran.exp
index d848ed4..621000a 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -7,7 +7,7 @@  global ALWAYS_CFLAGS

  set shlib_ext [get_shlib_extension]
  set lang_library_path  "../libgfortran/.libs"
-set lang_link_flags    "-lgfortran -foffload=-lgfortran"
+set lang_link_flags    "-lgfortran -foffload=-lgfortran -lquadmath"
  if [info exists lang_include_flags] then {
      unset lang_include_flags
  }
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp 
b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index b746ab6..32da263 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -9,7 +9,7 @@  global ALWAYS_CFLAGS

  set shlib_ext [get_shlib_extension]
  set lang_library_path  "../libgfortran/.libs"
-set lang_link_flags    "-lgfortran -foffload=-lgfortran"
+set lang_link_flags    "-lgfortran -foffload=-lgfortran -lquadmath"
  if [info exists lang_include_flags] then {
      unset lang_include_flags
  }