This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Enable C++


On Fri, 2015-04-03 at 10:28 +0200, Petr Machata wrote:
> - Detect C++ compiler in configure, add supporting infrastructure to
>   eu.am.

Looks good. Two questions below, but not blockers. Just curious.

> index faf8add..f1d290b 100644
> --- a/config/eu.am
> +++ b/config/eu.am
> [...]
>  %.os: %.c %.o
>  if AMDEP
> +	test -d $(DEPDIR)/$(*D) || mkdir $(DEPDIR)/$(*D)
>  	if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
>  	  -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
>  	then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \

Why is that mkdir now necessary?

> +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=yes, ac_cv_cxx_works=no)
> + AC_LANG_POP()])
> +AM_CONDITIONAL(HAVE_CXX, test "$ac_cv_cxx_works" = yes)

We require gnu++98 above.
Is the explicit enough to make sure the compiler supports C++98?

Thanks,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]