Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2013 13:28:52 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-ports@freebsd.org
Subject:   Re: How can I switch compiler from clang to gcc46?
Message-ID:  <51447394.30907@infracaninophile.co.uk>
In-Reply-To: <1363438889978-5796040.post@n5.nabble.com>
References:  <1363438889978-5796040.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2XQMGHIGCIJLXODQCEACE
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 16/03/2013 13:01, Beeblebrox wrote:
> I need to compile a source not in the ports tree. The source needs to u=
se the
> gcc compiler (I have lang gcc (46) installed). Sourec make file complai=
ns it
> cannot find gcc46.

gcc46 will be /usr/local/bin/gcc46 -- it could be that /usr/local/bin
isn't on the path that Makefile searches.

> To test, I placed in my environment:
> setenv CC gcc46
> setenv CXX g++46
> setenv CPP cpp46

Try using the fully qualified path in those settings:

setenv CC /usr/local/bin/gcc46
setenv CXX /usr/local/bin/g++46
setenv CPP /usr/local/bin/cpp46

(Sanity check that -- I don't have gcc46 installed, so cannot confirm
those are the correct paths.)

> When I do "cc -v" I still get clang output and not gcc46. What am I doi=
ng
> wrong here?

Well, yes.  What did you expect?  Typing 'cc' at the shell prompt will
almost certainly run /usr/bin/cc and that's going to be Clang on recent
versions of FreeBSD.  What you need to do is persuade your Makefile to
run a different compiler, somewhere else in the filesystem.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


------enig2XQMGHIGCIJLXODQCEACE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlFEc5QACgkQ8Mjk52CukIyvhQCgiAezgD79WcNFiduAlOfnBHOv
r8YAnRlO5VdzBnuzXsQIjATWAdWErR0a
=Io9R
-----END PGP SIGNATURE-----

------enig2XQMGHIGCIJLXODQCEACE--



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