9/29/2014

Using gcc48 to build ports on FreeBSD

cd /usr/ports/devel/binutils && make install
cd /usr/ports/lang/gcc48 && make install
Add this to /etc/make.conf:

.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc48)
.if empty(.CURDIR:M/usr/ports/net/openldap*) && empty(.CURDIR:M/usr/ports/xxx/yyy)
CC=gcc48
CXX=g++48
CPP=cpp48
CFLAGS+=-Ofast -fno-strict-aliasing -pipe  
CPUTYPE=corei7
.endif
.endif

Edit /etc/libmap.conf:
libgcc_s.so.1   gcc48/libgcc_s.so.1
libgomp.so.1    gcc48/libgomp.so.1
libobjc.so.3    gcc48/libobjc.so.2
libssp.so.0     gcc48/libssp.so.0
libstdc++.so.6  gcc48/libstdc++.so.6

References:
https://www.freebsd.org/doc/en/articles/custom-gcc/article.html

No comments:

Post a Comment