1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Fix build with clang: in contrast to lang/clang, the one from base adds

"FreeBSD" in front of it which broke the detection of the compiler name.
If the operating system name is added, use the second word as the compiler
name.

PR:		ports/159250
Submitted by:	Test Rat (ttsestt gmail.com)
Approved by:	maintainer (in private mail)
This commit is contained in:
Rene Ladan 2011-08-09 06:39:25 +00:00
parent 91850bdf98
commit 6fc4d28358
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=279298

View File

@ -28,6 +28,15 @@
fi
if netbsd || dragonfly ; then
@@ -1661,7 +1660,7 @@ else
echores "$cc_version"
break
fi
- cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1)
+ cc_name_tmp=$($_cc -v 2>&1 | awk "NR == 1 { if(\$1 == \"$system_name\") print \$2; else print \$1 }")
if test "$cc_name_tmp" = "clang"; then
echocheck "$_cc version"
cc_vendor=clang
@@ -3577,22 +3576,10 @@
if linux ; then
THREAD_CFLAGS=-D_REENTRANT