pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Explicitly using pkgsrc gcc/clang on NetBSD



Hello,

   I built netbsd-7 with NOGCC, so in my pkg_comp1 chroot generated from
that base set I have no gcc.

   I tried building the packages I need with the base clang but I'm
getting a clang crash when building thunderbird and firefox, so I
thought I'd try gcc (and also clang) from pkgsrc.

   Two questions, which are mostly the same:
   1) How do I tell pkgsrc to use gcc from pkgsrc?
   2) How do I tell pkgsrc to use clang from pkgsrc?

   Actually, the second one I know the answer to -- I simply change
CLANGBASE to /usr/pkg.  But there's another factor:  I create a fresh
new pkg_comp1 chroot each time I build packages.  When I launch pkg_comp
I tell it run run a build script which creates all my packages and then
exits.  I would prefer not to have to first build the pkgsrc compiler
using base and then manually switch to the pkgsrc compiler in mk.conf.

   Is there a safe way to handle this automatically?

   If I put clang at the top of the packages to build in the chroot and
put this in mk.conf:

CLANGBASE=/usr/pkg
.if ${PKGPATH} == "lang/clang"
CLANGBASE=/usr
.endif

   .. is this asking for trouble?

   The same question applies to the gcc case; is there a way to get
pkgsrc to automatically build gcc as needed (using the base clang)?  I
assume there's a bootstrapping problem where pkgsrc can't know *which*
of the gcc compilers to use.

-- 
Kind regards,
Jan Danielsson



Home | Main Index | Thread Index | Old Index