tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: clang support (was: [HEADS-UP] Freeze in Preparation for pkgsrc-2010Q4 Branch)
> 1. Bootstrap
>
> Bootstrapping unconditionaly sets CC to gcc. I think this should be possible
> to override:
>
> Index: bootstrap/bootstrap
> ===================================================================
> RCS file: /cvsroot/pkgsrc/bootstrap/bootstrap,v
> retrieving revision 1.159
> diff -u -r1.159 bootstrap
> --- bootstrap/bootstrap 30 Aug 2010 06:21:49 -0000 1.159
> +++ bootstrap/bootstrap 25 Dec 2010 16:35:35 -0000
> @@ -472,7 +472,7 @@
> set_opsys=no
> [ -z "$fetch_cmd" ] && fetch_cmd="/usr/bin/ftp"
> machine_arch=`uname -p`
> - CC="gcc -isystem /usr/include"; export CC
> + CC=${CC:-"gcc -isystem /usr/include"}; export CC
> osrev=`uname -r`
> macosx_version=`echo $osrev | awk -F . '{ print "10."$1-4; }'`
> case "$macosx_version" in
Committed.
For bootstraping, providing --compiler=clang is not enough. CC=<path_to>/clang
must be provided as well.
> 2. ABI
>
> In bsd.prefs.mk, there is commented-out logic for Snow Leopard to autodetect
> 32/64Bit API. Could this be enables?
>
> The value of ABI dosn't actually reflect the ABI clang generates. The
> following patch to mk/compiler/clang.mk (by adam@) fixes this:
>
> --- mk/compiler/clang.mk 3 Nov 2010 18:05:05 -0000 1.3
> +++ mk/compiler/clang.mk 24 Dec 2010 19:14:32 -0000
> @@ -49,6 +49,8 @@
> CC_VERSION?= clang
> .endif
>
> +_COMPILER_ABI_FLAG.32= -m32
> +_COMPILER_ABI_FLAG.64= -m64
> _COMPILER_LD_FLAG= -Wl,
> _LINKER_RPATH_FLAG= -rpath
> _COMPILER_RPATH_FLAG= ${_COMPILER_LD_FLAG}${_LINKER_RPATH_FLAG},
Committed. Also fortran enabled via f2c, as other compilers do.
> 5. Libtool tag
>
> Several package's makefiles fail to pass a --tag value to libtool
As long as CC and CXX variables don't change in mk.conf between building
libtool-base and a package, libtool can use a correct tag. So, in mk.conf,
either do not set CC and CXX, or set CC and CXX to a path to clang, then build
and install devel/libtool-base, then build a package, and libtool should not
complain.
Cheers,
Adam
Home |
Main Index |
Thread Index |
Old Index