clang 没有看到 gcc 安装

clang 没有看到 gcc 安装

我有这样一个系统:

uname -a
FreeBSD gpskomsa 10.2-RELEASE FreeBSD 10.2-RELEASE #0: Thu Aug 20 18:25:34 VLAT 2015     root@gpskomsa:/usr/obj/usr/src/sys/GENERIC  amd64

使用默认的 clang:

clang -v
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix
Selected GCC installation:

我还安装了 gcc:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/lto-wrapper
Target: x86_64-portbld-freebsd10.1
Configured with: ./../gcc-4.8.4/configure --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=x86_64-portbld-freebsd10.1
Thread model: posix
gcc version 4.8.4 (FreeBSD Ports Collection)

如您所见,clang 没有看到 gcc(空白选定的 GCC 安装:)。

我尝试从端口构建和安装 allternative clang 3.4.2,并对 makefile 进行了修改:

CONFIGURE_ARGS+=    --enable-optimized --enable-shared --with-gcc-toolchain=/usr/local/lib/gcc48

但是clang3.4.2再次看不到gcc:

/usr/local/llvm34/bin/clang -v
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-portbld-freebsd10.2
Thread model: posix
Selected GCC installation:

我如何配置 clang 来查看 gcc 安装?

相关内容