Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jul 2017 22:30:13 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: It looks like USE_GCC=any is broken and leads to system-clang use
Message-ID:  <1BFFF3BD-7658-452F-9369-7C2AED479FB6@dsl-only.net>
In-Reply-To: <A4A02703-AA21-4006-AEFE-F1453B35FBCC@dsl-only.net>
References:  <6FD738D6-F163-4BC5-8E6E-A9B9F35595CD@dsl-only.net> <BD68F3F3-A81C-4830-9169-6188A05EF6B2@dsl-only.net> <82A991B0-FD8B-457F-8483-D61AE5E6D6F6@pfeifer.com> <F9DACFDB-AF70-461E-B6B2-D5E9385F6D9A@dsl-only.net> <C25E8566-89FC-4CCE-A7AF-F8B18EB758D7@pfeifer.com> <E8B2DB17-7397-4BB7-95D1-76F2BFDB5278@dsl-only.net> <B1FFF990-9DEA-48B8-B383-477837390C3B@pfeifer.com> <8F50FB7C-498C-453E-AE5A-EADC60758730@dsl-only.net> <A4A02703-AA21-4006-AEFE-F1453B35FBCC@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[More on the behavior: it is more complicated than
previously shown.]

On 2017-Jul-2, at 8:12 PM, Mark Millard <markmi at dsl-only.net> wrote:

> [Looks like output from "make test-gcc" is appropriate,
> so I'm adding such.]
>=20
> On 2017-Jul-2, at 7:53 PM, Mark Millard <markmi at dsl-only.net> =
wrote:
>=20
>> [It looks like USE_GCC=3Dany is broken and leads to system-clang =
use.]
>>=20
>> On 2017-Jun-29, at 5:58 PM, Gerald Pfeifer <gerald at pfeifer.com> =
wrote:
>>=20
>>> Am 29. Juni 2017 18:55:59 GMT+08:00 schrieb Mark Millard =
<markmi@dsl-only.net>:
>>>> I'm not currently set up to run more than head on
>>>> any of amd64, powerpc64, powerpc, aarch64, or armv6/7
>>>> (which are all I target). And I'm in the middle of
>>>> attempting a fairly large jump to head -r320458 on
>>>> those.
>>>=20
>>> Oh, then I had misunderstood your previous mail. No worries, I'll =
gently proceed then.
>>>=20
>>> I expect to update gcc5 in the next 24 hours.
>>>=20
>>>> [In my normal/head environment I'm switching to lang/gcc7-devel
>>>> for gcc (from lang/gcc6 ) but I'm odd that way.]
>>>=20
>>> The compiler should be fine, it's a number of ports that are not =
(even blocking the move from GCC 5 to 6 as default).
>>=20
>> As part of testing that an environment seemed stable,
>> an environment based on head -r320570 and ports -r444872
>> with gcc being lang/gcc7-devel that is installed on
>> amd64, I tried:
>>=20
>> script ~/ports_typescripts/phoronix-try-00-typescript portmaster -DK =
benchmarks/phoronix-test-suite
>>=20
>> in part because it has:
>>=20
>> USE_GCC=3D        any
>>=20
>> and I'm using:
>>=20
>> DEFAULT_VERSIONS+=3Dperl5=3D5.24 gcc=3D7
>>=20
>> in /etc/make.conf and the gcc that I have installed
>> is lang/gcc7-devel. This should also have been a test
>> of the adjusted-header removal that has been applied
>> to lang/gcc7-devel (but not a old environment's build
>> used under a modern system environment).
>>=20
>> But the result was a surprise: the log file
>> shows all the build as using cc and in my context
>> cc is:
>>=20
>> # cc --version
>> FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on =
LLVM 4.0.0)
>> Target: x86_64-unknown-freebsd12.0
>> Thread model: posix
>> InstalledDir: /usr/bin
>>=20
>> Configure repeatedly shows:
>>=20
>> checking for gcc... cc
>> . . .
>> checking whether we are using the GNU C compiler... yes
>>=20
>>=20
>> In fact "phoronix-test-suite diagnostics" reports:
>>=20
>> COMPILER =3D Clang 4.0.0 (SVN 297347) + LLVM 4.0.0
>>=20
>> So clang is being treated as an example of gcc as far
>> as I can tell.
>=20
> # cd /usr/ports/benchmarks/phoronix-test-suite/
> FreeBSDx64OPC# make test-gcc
> USE_GCC=3Dany
> Port can use later versions.
> GCC version: 4.2 - OSVERSION up to 9999999
> GCC version: 4.8 - OSVERSION up to 0
> GCC version: 4.9 - OSVERSION up to 0
> GCC version: 5 - OSVERSION up to 0
> GCC version: 6 - OSVERSION up to 0
> Using GCC version 7
> CC=3Dcc - CXX=3Dc++ - CPP=3Dcpp - CFLAGS=3D"-O2 -pipe -g =
-fstack-protector -fno-strict-aliasing"
> LDFLAGS=3D" -fstack-protector"
> BUILD_DEPENDS=3D/usr/local/include/php/main/php.h:lang/php56 =
/usr/local/bin/python2.7:lang/python27 =
update-desktop-database:devel/desktop-file-utils =
update-mime-database:misc/shared-mime-info =
/usr/local/lib/php/20131226/ctype.so:textproc/php56-ctype =
/usr/local/lib/php/20131226/curl.so:ftp/php56-curl =
/usr/local/lib/php/20131226/dom.so:textproc/php56-dom =
/usr/local/lib/php/20131226/filter.so:security/php56-filter =
/usr/local/lib/php/20131226/gd.so:graphics/php56-gd =
/usr/local/lib/php/20131226/hash.so:security/php56-hash =
/usr/local/lib/php/20131226/json.so:devel/php56-json =
/usr/local/lib/php/20131226/openssl.so:security/php56-openssl =
/usr/local/lib/php/20131226/pcntl.so:devel/php56-pcntl =
/usr/local/lib/php/20131226/posix.so:sysutils/php56-posix =
/usr/local/lib/php/20131226/session.so:www/php56-session =
/usr/local/lib/php/20131226/simplexml.so:textproc/php56-simplexml =
/usr/local/lib/php/20131226/sockets.so:net/php56-sockets =
/usr/local/lib/php/20131226/sqlite3.so:databases/php56-sqlite3 /usr/l
> ocal/lib/php/20131226/zip.so:archivers/php56-zip =
/usr/local/lib/php/20131226/zlib.so:archivers/php56-zlib
> RUN_DEPENDS=3Dfpdf>0:print/fpdf cmake:devel/cmake =
/usr/local/include/php/main/php.h:lang/php56 =
/usr/local/bin/python2.7:lang/python27 =
update-desktop-database:devel/desktop-file-utils =
update-mime-database:misc/shared-mime-info =
/usr/local/lib/php/20131226/ctype.so:textproc/php56-ctype =
/usr/local/lib/php/20131226/curl.so:ftp/php56-curl =
/usr/local/lib/php/20131226/dom.so:textproc/php56-dom =
/usr/local/lib/php/20131226/filter.so:security/php56-filter =
/usr/local/lib/php/20131226/gd.so:graphics/php56-gd =
/usr/local/lib/php/20131226/hash.so:security/php56-hash =
/usr/local/lib/php/20131226/json.so:devel/php56-json =
/usr/local/lib/php/20131226/openssl.so:security/php56-openssl =
/usr/local/lib/php/20131226/pcntl.so:devel/php56-pcntl =
/usr/local/lib/php/20131226/posix.so:sysutils/php56-posix =
/usr/local/lib/php/20131226/session.so:www/php56-session =
/usr/local/lib/php/20131226/simplexml.so:textproc/php56-simplexml =
/usr/local/lib/php/20131226/sockets.so:net/php56-sockets =
/usr/local/lib/php/20131226/sqlite3
> .so:databases/php56-sqlite3 =
/usr/local/lib/php/20131226/zip.so:archivers/php56-zip =
/usr/local/lib/php/20131226/zlib.so:archivers/php56-zlib

I used:

Index: /usr/ports/Mk/bsd.gcc.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- /usr/ports/Mk/bsd.gcc.mk    (revision 444872)
+++ /usr/ports/Mk/bsd.gcc.mk    (working copy)
@@ -35,7 +35,7 @@
 # ascending order and in sync with the table below.=20
 # When adding a version, please keep the comment in
 # Mk/bsd.default-versions.mk in sync.
-GCCVERSIONS=3D   040200 040800 040900 050000 060000
+GCCVERSIONS=3D   040200 040800 040900 050000 060000 070000
=20
 # The first field is the OSVERSION in which it disappeared from the =
base.
 # The second field is the version as USE_GCC would use.
@@ -44,6 +44,7 @@
 GCCVERSION_040900=3D           0 4.9
 GCCVERSION_050000=3D           0 5
 GCCVERSION_060000=3D           0 6
+GCCVERSION_070000=3D           0 7
=20
 # No configurable parts below this. =
####################################
 #


to get "make test-gcc" to report:

# pwd
/usr/ports/benchmarks/phoronix-test-suite
FreeBSDx64OPC# make test-gcc
USE_GCC=3Dany
Port can use later versions.
GCC version: 4.2 - OSVERSION up to 9999999
GCC version: 4.8 - OSVERSION up to 0
GCC version: 4.9 - OSVERSION up to 0
GCC version: 5 - OSVERSION up to 0
GCC version: 6 - OSVERSION up to 0
GCC version: 7 (port) - OSVERSION up to 0
Using GCC version 7
CC=3Dgcc7 - CXX=3Dg++7 - CPP=3Dcpp7 - CFLAGS=3D"-O2 -pipe -g =
-fstack-protector -Wl,-rpath=3D/usr/local/lib/gcc7 -fno-strict-aliasing"
LDFLAGS=3D" -fstack-protector -Wl,-rpath=3D/usr/local/lib/gcc7 =
-L/usr/local/lib/gcc7"
. . .

But uninstalling and reinstalling still ended
up with configure using "cc" (system clang)
as a gcc compiler, despite what the ports
infrastructure reported (shown above). So
phoronix-test-suite ends up using clang to
compile benchmarks unless one adjusts
install.sh scripts manually and then uses
the adjusted script to rebuild code.


[I only tried: "phoronix-test-suite benchmark pts/hint" .]

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1BFFF3BD-7658-452F-9369-7C2AED479FB6>