From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5147980174787528647==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH 1/2] Enable C++ Date: Tue, 07 Apr 2015 17:27:13 +0200 Message-ID: <1428420433.5539.60.camel@bordewijk.wildebeest.org> In-Reply-To: 87wq1sevpx.fsf@redhat.com --===============5147980174787528647== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, 2015-04-03 at 23:40 +0200, Petr Machata wrote: > Mark Wielaard writes: > > Why is that mkdir now necessary? > = > It's not, but I thought it's a good idea for symmetry. The reason the > c++ bits need this mkdir is that we keep that code in a sub-directory, > and this creates the corresponding sub-directory for the dependency > tracking helper files. Aha, ok thanks. > >> +AC_CACHE_CHECK([for working C++ compiler], ac_cv_cxx_works, > >> +[AC_LANG_PUSH([C++]) > >> + AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl > >> +struct foo { > >> + int i; > >> + explicit foo () : i (0) {} > >> + virtual ~foo () {} > >> +};])], ac_cv_cxx_works=3Dyes, ac_cv_cxx_works=3Dno) > >> + AC_LANG_POP()]) > >> +AM_CONDITIONAL(HAVE_CXX, test "$ac_cv_cxx_works" =3D yes) > > > > We require gnu++98 above. > > Is the explicit enough to make sure the compiler supports C++98? > = > Well, this is a C++98 code. It's of course not enough to test the whole > C++98--the language is vast. The reason for that test is that I want to > make sure we really do have a C++ compiler. AC_PROG_CXX happily exports > CXX even if none is available, so we can't use that in conditionals. I was mostly wondering whether we needed to add an command line argument like -std=3Dgnu++98 to be sure. But maybe that is all implicit and standard for all gcc versions anyway. Cheers, Mark --===============5147980174787528647==--