Subject: Re: c++ targets
To: None <>
From: Patrick Welche <>
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=
>    NOMAN=  an island
>    .include <>

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


#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.