Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2003 23:02:33 -0400
From:      "Matthew Emmerton" <matt@compar.com>
To:        "Alexander Kabaev" <kabaev@mail.ru>, "John Giacomoni" <John.Giacomoni@colorado.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: C++ code in a kernel module?
Message-ID:  <006101c3767e$d0f48af0$1200a8c0@gsicomp.on.ca>
References:  <DBE1CF41-E222-11D7-80D8-0003930719D8@colorado.edu> <20030908224611.06027082.kabaev@mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, 8 Sep 2003 11:35:37 -0600
> John Giacomoni <John.Giacomoni@colorado.edu> wrote:
>
> >  I was planning on using the macro __cplusplus to toggle using
> >  extern "C" { }, however the bsd.kmod.mk style Makefiles seem to
> >  force the language to -std=c99 even when compiling with c++ .
> >
> >  my initial steps have been as follows:
> >  take a functioning C based kernel module and rename to .cc
> >  added extern "C" around the includes.
> >  #defined key words such as new to xxx_new
> >  recompiled the new .cc file by hand without -std=c99, but
> >  keeping all the flags as the Makefile set them.
> >  then linked using the Makefile and finally loaded the module.
>
> -fno-rtti -fno-exceptions is probably a must unless you want to bring a
> whole libsupc++ library into the kernel.

I've been silently following this thread, and unless I missed something, has
anyone asked John why he wants/needs to use C++ in the kernel?

--
Matt Emmerton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006101c3767e$d0f48af0$1200a8c0>