diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/gfortran.exp | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a9c72f982fe..b0c6f9a8cef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-05-02 H.J. Lu <hongjiu.lu@intel.com> + + PR fortran/94788 + * lib/gfortran.exp (gfortran_target_compile): Get asan library + from TEST_ALWAYS_FLAGS. + 2020-05-02 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/94788 diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp index 016d77ca4f8..fe99111788f 100644 --- a/gcc/testsuite/lib/gfortran.exp +++ b/gcc/testsuite/lib/gfortran.exp @@ -234,6 +234,7 @@ proc gfortran_target_compile { source dest type options } { global gluefile wrap_flags global ALWAYS_GFORTRANFLAGS global GFORTRAN_UNDER_TEST + global TEST_ALWAYS_FLAGS global flags_to_postpone global board_info @@ -242,6 +243,13 @@ proc gfortran_target_compile { source dest type options } { lappend options "ldflags=${wrap_flags}" } + # TEST_ALWAYS_FLAGS are flags that should be passed to every + # compilation. They are passed first to allow individual + # tests to override them. + if [info exists TEST_ALWAYS_FLAGS] { + set options [concat "{additional_flags=$TEST_ALWAYS_FLAGS}" $options] + } + # bind_pic_locally adds -fpie/-fPIE flags to flags_to_postpone and it is # appended here to multilib_flags as it can be overridden by the latter # if it was added earlier. After the target_compile, multilib_flags is |