aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-01-07 19:19:10 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-01-07 19:19:10 +0000
commit433d16df137250a4b814268e692d6c114ee45e49 (patch)
tree79c842059b7d5daf9dc83d67a29a678e4d841ce2 /gcc/jit
parent23608da4dba98f09398d6a608c8f8a57c37f8280 (diff)
downloadgcc-433d16df137250a4b814268e692d6c114ee45e49.zip
gcc-433d16df137250a4b814268e692d6c114ee45e49.tar.gz
gcc-433d16df137250a4b814268e692d6c114ee45e49.tar.bz2
jit.exp: support C++ testcases
gcc/jit/ChangeLog: * TODO.rst (Test suite): Remove item about running C++ testcases. * docs/internals/index.rst (Working on the JIT library): Add "c++" to the enabled languages in the suggested "configure" invocation, and add a description of why this is necessary. * docs/_build/texinfo/libgccjit.texi: Regenerate. gcc/testsuite/ChangeLog: * jit.dg/jit.exp: Load wrapper.exp with %{tool} set to "g++" rather than "jit". Load g++.exp, and call g++_init. Run test-*.cc files within the testsuite and *.cc files within docs/examples. (jit-dg-test): Drop the addition of -fgnu89-inline to DEFAULT_CFLAGS in favor of adding it to additional_flags, only doing it when compiling C testcases (since g++ does not handle it). Reset "orig_environment_saved" so that LD_LIBRARY_PATH is restored to the value after g++_init ran, rather than the value before g++_init ran. Return a list of $comp_output $output_file, as dg-test assumes. From-SVN: r219318
Diffstat (limited to 'gcc/jit')
-rw-r--r--gcc/jit/ChangeLog8
-rw-r--r--gcc/jit/TODO.rst2
-rw-r--r--gcc/jit/docs/_build/texinfo/libgccjit.texi17
-rw-r--r--gcc/jit/docs/internals/index.rst13
4 files changed, 33 insertions, 7 deletions
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog
index 6126d02..89ded0b 100644
--- a/gcc/jit/ChangeLog
+++ b/gcc/jit/ChangeLog
@@ -1,5 +1,13 @@
2015-01-07 David Malcolm <dmalcolm@redhat.com>
+ * TODO.rst (Test suite): Remove item about running C++ testcases.
+ * docs/internals/index.rst (Working on the JIT library): Add
+ "c++" to the enabled languages in the suggested "configure"
+ invocation, and add a description of why this is necessary.
+ * docs/_build/texinfo/libgccjit.texi: Regenerate.
+
+2015-01-07 David Malcolm <dmalcolm@redhat.com>
+
* docs/internals/index.rst: Update to reflect that built
testcases are now test-foo.c.exe, rather than test-foo.exe.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
diff --git a/gcc/jit/TODO.rst b/gcc/jit/TODO.rst
index 09c4d9d..ca0ddbb 100644
--- a/gcc/jit/TODO.rst
+++ b/gcc/jit/TODO.rst
@@ -81,8 +81,6 @@ Bugs
Test suite
==========
-* get DejaGnu to build and run C++ testcases
-
* measure code coverage in testing of libgccjit.so
Future milestones
diff --git a/gcc/jit/docs/_build/texinfo/libgccjit.texi b/gcc/jit/docs/_build/texinfo/libgccjit.texi
index 64862dc..f142491 100644
--- a/gcc/jit/docs/_build/texinfo/libgccjit.texi
+++ b/gcc/jit/docs/_build/texinfo/libgccjit.texi
@@ -11937,7 +11937,7 @@ PREFIX=$(pwd)/install
cd build
../src/configure \
--enable-host-shared \
- --enable-languages=jit \
+ --enable-languages=jit,c++ \
--disable-bootstrap \
--enable-checking=release \
--prefix=$PREFIX
@@ -11968,12 +11968,23 @@ position-independent code, which incurs a slight performance hit,
but it necessary for a shared library.
@end deffn
-@geindex command line option; --enable-languages=jit
+@geindex command line option; --enable-languages=jit@comma{}c++
@anchor{internals/index cmdoption--enable-languages}@anchor{177}
-@deffn {Option} --enable-languages=jit
+@deffn {Option} --enable-languages=jit,c++
This specifies which frontends to build. The JIT library looks like
a frontend to the rest of the code.
+
+The C++ portion of the JIT test suite requires the C++ frontend to be
+enabled at configure-time, or you may see errors like this when
+running the test suite:
+
+@example
+xgcc: error: /home/david/jit/src/gcc/testsuite/jit.dg/test-quadratic.cc: C++ compiler not installed on this system
+c++: error trying to exec 'cc1plus': execvp: No such file or directory
+@end example
+
+@noindent
@end deffn
@geindex command line option; --disable-bootstrap
diff --git a/gcc/jit/docs/internals/index.rst b/gcc/jit/docs/internals/index.rst
index 424c73e..694f058 100644
--- a/gcc/jit/docs/internals/index.rst
+++ b/gcc/jit/docs/internals/index.rst
@@ -31,7 +31,7 @@ the JIT library like this:
cd build
../src/configure \
--enable-host-shared \
- --enable-languages=jit \
+ --enable-languages=jit,c++ \
--disable-bootstrap \
--enable-checking=release \
--prefix=$PREFIX
@@ -54,11 +54,20 @@ Here's what those configuration options mean:
position-independent code, which incurs a slight performance hit,
but it necessary for a shared library.
-.. option:: --enable-languages=jit
+.. option:: --enable-languages=jit,c++
This specifies which frontends to build. The JIT library looks like
a frontend to the rest of the code.
+ The C++ portion of the JIT test suite requires the C++ frontend to be
+ enabled at configure-time, or you may see errors like this when
+ running the test suite:
+
+ .. code-block:: console
+
+ xgcc: error: /home/david/jit/src/gcc/testsuite/jit.dg/test-quadratic.cc: C++ compiler not installed on this system
+ c++: error trying to exec 'cc1plus': execvp: No such file or directory
+
.. option:: --disable-bootstrap
For hacking on the "jit" subdirectory, performing a full