+2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR jit/94778
+ * doc/sourcebuild.texi: Document effective target lgccjit.
+
2020-05-14 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn-valu.md (add<mode>3_zext_dup): Change to a
@item indirect_calls
Target supports indirect calls, i.e. calls where the target is not
constant.
+
+@item lgccjit
+Target supports -lgccjit, i.e. libgccjit.so can be linked into jit tests.
@end table
@subsubsection Local to tests in @code{gcc.target/i386}
+2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR jit/94778
+ * jit.dg/jit.exp: Skip jit tests for targets that don't support
+ -lgccjit.
+ * lib/target-supports.exp (check_effective_target_lgccjit): New.
+
2020-05-14 Andrew Stubbs <ams@codesourcery.com>
* testsuite/gcc.target/gcn/gcn.exp: New file.
load_lib g++.exp
load_lib dejagnu.exp
+# Skip these tests for targets that don't support -lgccjit
+if { ![check_effective_target_lgccjit] } {
+ return
+}
+
# Look for lines of the form:
# definitely lost: 11,316 bytes in 235 blocks
# indirectly lost: 352 bytes in 4 blocks
}
return 1
}
+
+# Return 1 if we can use the -lgccjit option, 0 otherwise.
+
+proc check_effective_target_lgccjit { } {
+ if { [info procs jit_target_compile] == "" } then {
+ global GCC_UNDER_TEST
+ if ![info exists GCC_UNDER_TEST] {
+ set GCC_UNDER_TEST "[find_gcc]"
+ }
+ proc jit_target_compile { source dest type options } [info body gcc_target_compile]
+ }
+ return [check_no_compiler_messages lgccjit executable {
+ int main() { return 0; }
+ } "-lgccjit"]
+}