Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Aug 2010 15:26:49 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        jesse@cs.uni-magdeburg.de
Subject:   Fwd: Re: devel/doxygen and non-default gcc
Message-ID:  <4C73BA89.6040804@icyb.net.ua>
Resent-Message-ID: <4C73BC73.4080200@icyb.net.ua>

next in thread | raw e-mail | index | archive | help

Please see message below for a problem with non-default gcc (e.g. gcc44) and
port(s) that use tmake.

Looking in lib/unix/generic.t we see:
...
####### Compiler, tools and options

CC      ?=      #$ Expand("TMAKE_CC");
CXX     ?=      #$ Expand("TMAKE_CXX");
CFLAGS  +=      #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
CXXFLAGS+=      #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
INCPATH =       #$ ExpandPath("INCPATH","-I"," -I","");
#$ Config("staticlib") && DisableOutput();
LINK    =       #$ Expand("TMAKE_LINK");
...

So, CC and CXX are set in such a way that they can be overridden, but LINK can
not be influenced from outside.

We also see that lib/freebsd-g++/tmake.conf sets TMAKE_LINK to g++, TMAKE_CXX
has the same value.

So it seems that changing lib/unix/generic.t so that LINK is defined as follows
should both preserve default behavior and allow LINK to stay in sync with CXX:
LINK    =       $(CXX)


P.S. and a cosmetic issue - it seems that the port needlessly installs
freebsd-g++/tmake.conf.orig file that's created during patching.

-------- Original Message --------
Subject: Re: devel/doxygen and non-default gcc
Date: Thu, 05 Aug 2010 07:44:29 -0400
From: Naram Qashat <cyberbotx@cyberbotx.com>
To: Andriy Gapon <avg@icyb.net.ua>

On 08/05/10 04:56, Andriy Gapon wrote:
>
> I am trying to build devel/doxygen with gcc44 and in general it works good except
> for one tiny issue.
> Both src/Makefile.doxygen and src/Makefile.doxytag have this block of definitions
> at the beginning:
> CC      ?=      gcc
> CXX     ?=      g++
> CFLAGS  +=      -pipe -Wall -W
> CXXFLAGS+=      -pipe -Wall -W
> INCPATH =       -I../qtools -I/usr/local/include
> LINK    =       g++
>
> As you can see, CC and CXX can be overridden and they get set to gcc44 and g++44,
> but LINK value is 'hardcoded'.
> I would like to propose to change LINK definition to:
> LINK    =       ${CXX}
>
> Thanks!

Here's the thing, those files are generated by tmake.  I'm not familiar with
tmake enough to know what needs to be done in order to get it to generate a
proper Makefile that has LINK set to the proper value.  If you or someone else
is more familiar with it and would know how to fix this, I'll gladly submit a PR
for it, but without knowing how, I am unable to do so.

Thanks,
Naram Qashat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C73BA89.6040804>