Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2012 10:27:55 -0500
From:      Brooks Davis <brooks@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        toolchain@freebsd.org, Gerald Pfeifer <gerald@freebsd.org>
Subject:   Re: gcc46 --version incompatible with bsd.compiler.mk
Message-ID:  <20121015152755.GC10224@lor.one-eyed-alien.net>
In-Reply-To: <5078102C.3070503@FreeBSD.org>
References:  <5078102C.3070503@FreeBSD.org>

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

[-- Attachment #1 --]
On Fri, Oct 12, 2012 at 03:42:20PM +0300, Andriy Gapon wrote:
> 
> Gerald,
> 
> $ gcc46 --version
> gcc46 (FreeBSD Ports Collection) 4.6.3
> 
> I think that the above should have just "gcc" instead of "gcc46".  The version is
> reported separately from the compiler name.
> The above output confuses bsd.compiler.mk.

Alternatively I could alter bsd.compiler.mk to accept gcc[1-9][0-9] as
gcc.  You could also set COMPILER_TYPE to override the check entirely.

The end state that got proposed at the Cambridge devsummit was that
external toolchains would provide a makefile that bsd.compiler.mk could
include that would handle this.  An example implementation would be to
add something like the following to the top of bsd.compiler.mk:

.if defined(TOOLCHAIN_MK) && exists(${TOOLCHAIN_MK})
.include ${TOOLCHAIN_MK}
.endif

You could then point TOOLCHAIN_MK to a file that might look something
like (I'm not sure the CC assignments would actually work here, but you
get the idea):

CC=gcc46
CXX=g++46
CPP=cpp46
COMPILER_TYPE=gcc
COMPILER_FEATURES=

-- Brooks

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iD8DBQFQfCt6XY6L6fI4GtQRAgreAKDnGQhD1Mx0CpYOAS7PzNCMdwI5BACgiWn1
kG5N6wlovb+I57nyW+1YtOo=
=KpdU
-----END PGP SIGNATURE-----

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