Date: Mon, 25 Jul 2011 03:45:22 +0000 From: "b. f." <bf1783@googlemail.com> To: freebsd-gnome@FreeBSD.org, "Sameer R. Manek" <manek@ghur.net> Subject: Re: compiling glib20 in ports with gcc v4.6.2 Message-ID: <CAGFTUwP6hvy=zVQRTq10EZ=CETOu-d-_Q4LfV%2B=9HM-sCGw9GQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
> .if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46) > CC=gcc46 > CXX=g++46 > CPP=cpp46 > CFLAGS+=-mssse3 > CPUTYPE?=core2 > LD=/usr/local/bin/ld > .endif Just use USE_GCC=4.6 with your cpu-specific additions to CFLAGS, and the latest patch from PR ports/155201, it will be easier. As it is, you are missing all of the other devel/binutils utilities that are set by USE_BINUTILS (which is implied by USE_GCC=4.6); the important additions to the CFLAGS and LDFLAGS in bsd.gcc.mk that will point the resulting binaries to the libraries in /usr/local/lib/gcc46, rather than the older incompatible ones with identical names and major version numbers in the base system; and the registering of lang/gcc46 as a runtime dependency in the package database. Also, as you have seen, it is a known, long-standing problem with ports that use devel/libtool, that they will often break if devel/libtool is not built with the same compiler and toolchain as the port. A simple, although not very convenient, way to fix this is to rebuild devel/libtool with appropriate compiler before building such ports (although, in your case, you will have to ensure that devel/libtool is not always built with USE_GCC=4.6, or you will break your package accounting system with circular dependencies). A proper solution is more complicated, involving either a substantially-modified libtool, or separate per-compiler libtool ports, or rebuilding a temporary libtool during the build of each port that uses it. Such a solution may be introduced into Ports as we prepare for wider use of multiple compilers and toolchains, but for now you will have to work around the problem. b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGFTUwP6hvy=zVQRTq10EZ=CETOu-d-_Q4LfV%2B=9HM-sCGw9GQ>