From: John Marino Date: Mon, 9 Jul 2012 15:27:54 +0000 (+0200) Subject: CCVER: Add /usr/pkgsrc/lang/gcc-aux as 'gcc47' X-Git-Tag: v3.2.0~624 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b0eef83f16f365805db2412080be172e586f0a55 CCVER: Add /usr/pkgsrc/lang/gcc-aux as 'gcc47' There are two gcc-4.7.x packages in pkgsrc that will build gcc 4.7-based compilers on Dragonfly. One is located at lang/gcc47 and the other is located at lang/gcc-aux. Both have been patched by myself, but gcc-aux seems to work better, especially with regards to link-time optimization. Consequently, a new valid value for CCVER has been created, "gcc47", which references lang/gcc-aux while building world and kernel. Both will compile, and the produced kernel will boot, but there are some network issues. Consequently, CCVER=gcc47 should only be used by developers who have the express intent to fix any issues the arise from compiling DragonFly sources with the latest GCC compiler. Normal users looking for non-base GCC compilers should stick with CCVER=gcc46 for now. --- diff --git a/etc/defaults/compilers.conf b/etc/defaults/compilers.conf index 3630d04..63f6f46 100644 --- a/etc/defaults/compilers.conf +++ b/etc/defaults/compilers.conf @@ -18,6 +18,12 @@ gcc46_CC=/usr/pkg/bin/gnatgcc gcc46_CPP=/usr/pkg/bin/gnatcpp gcc46_CXX=/usr/pkg/bin/gnatc++ +# gcc-aux (i.e. gcc 4.7) from pkgsrc +# +gcc47_CC=/usr/pkg/gcc-aux/bin/gcc +gcc47_CPP=/usr/pkg/gcc-aux/bin/cpp +gcc47_CXX=/usr/pkg/gcc-aux/bin/c++ + # pcc from pkgsrc # pcc_CC=/usr/pkg/bin/pcc diff --git a/libexec/customcc/cc.sh b/libexec/customcc/cc.sh index 55c601a..341598e 100644 --- a/libexec/customcc/cc.sh +++ b/libexec/customcc/cc.sh @@ -42,6 +42,14 @@ elif [ "${CCVER}" = "gcc46" ]; then -isystem /usr/include \ -isystem /usr/pkg/include/c++/${GCC46VER} \ -isystem /usr/pkg/include/c++/${GCC46VER}/${GCC46MAC}" +elif [ "${CCVER}" = "gcc47" ]; then + GCC47VER=`/usr/pkg/gcc-aux/bin/c++ -dumpversion` + GCC47MAC=`/usr/pkg/gcc-aux/bin/c++ -dumpmachine` + INCOPT="-nostdinc \ + -isysroot @@INCPREFIX@@ \ + -isystem /usr/include \ + -isystem /usr/pkg/gcc-aux/include/c++/${GCC47VER} \ + -isystem /usr/pkg/gcc-aux/include/c++/${GCC47VER}/${GCC47MAC}" fi . /etc/defaults/compilers.conf diff --git a/share/man/man5/compilers.conf.5 b/share/man/man5/compilers.conf.5 index b709762..c234ec1 100644 --- a/share/man/man5/compilers.conf.5 +++ b/share/man/man5/compilers.conf.5 @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 28, 2011 +.Dd July 9, 2012 .Dt COMPILERS.CONF 5 .Os .Sh NAME @@ -111,7 +111,11 @@ Currently, defaults are provided for .Nm gcc46 (installed from .Xr pkgsrc 7 Ap s -.Pa lang/gnat-aux ) +.Pa lang/gnat-aux ) , +.Nm gcc47 +(installed from +.Xr pkgsrc 7 Ap s +.Pa lang/gcc-aux ) and .Nm pcc (installed from