Subject: Re: c++ targets
To: None <atatat@atatdot.net>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-toolchain
Date: 09/21/1999 11:15:11
Andrew Brown wrote:
>
> forgive me if this is mentioned somewhere that i didn't find, but is
> there a "general solution" to the problem of c++ targets other than
> simply setting CC to c++ so that c++ gets called at the link instead
> of cc?
>
> for example:
>
> % cat Makefile
> PROG= prog1
> SRCS= main.cc
> NOMAN= an island
> .include <bsd.prog.mk>
I tend to simply add:
LDADD+= -lstdc++ -lm
However, yes I think there is room for change - maybe a new mk file - for
things like the above, and eg for flex/yacc files to output c++ lexers (had
a go a while back as bin/7293). I also find I need to change
#define __IDSTRING(name,string) \
static const char name[] __attribute__((__unused__)) = string
to
#define __IDSTRING(name,string) \
static char name[] __attribute__((__unused__)) = string
which may well not be the right thing! so that ident strings remain in
c++ programs.
Cheers,
Patrick