From owner-freebsd-stable@FreeBSD.ORG Fri Jul 4 18:18:33 2014 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CA7684F; Fri, 4 Jul 2014 18:18:33 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C57592417; Fri, 4 Jul 2014 18:18:32 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.9/8.14.9) with ESMTP id s64IIV5r057032; Fri, 4 Jul 2014 11:18:31 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.9/8.14.9/Submit) id s64IIVXf057031; Fri, 4 Jul 2014 11:18:31 -0700 (PDT) (envelope-from david) Date: Fri, 4 Jul 2014 11:18:31 -0700 From: David Wolfskill To: Hans Petter Selasky Subject: Re: [HEADS-UP] Problem with clang in 9-stable [was: r268244 (stable/9) seems to break "sysctl hw.ncpu"] Message-ID: <20140704181831.GV6056@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Hans Petter Selasky , stable@freebsd.org, "current@freebsd.org" References: <20140704123901.GR6056@albert.catwhisker.org> <53B6E218.5070009@selasky.org> <20140704174705.GS6056@albert.catwhisker.org> <53B6EDD1.8030506@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AEkhIf3vy/ReXTu0" Content-Disposition: inline In-Reply-To: <53B6EDD1.8030506@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: stable@freebsd.org, "current@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 18:18:33 -0000 --AEkhIf3vy/ReXTu0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2014 at 08:09:21PM +0200, Hans Petter Selasky wrote: > Hi, >=20 > Can you try to reproduce this: >=20 > Checkout 9-stable's src/sbin/sysctl only. >=20 > cd /usr/9-stable/src/sbin/sysctl >=20 > env CC=3Dclang make clean all > ./sysctl -n hw.ncpu >=20 > Then: >=20 > env CC=3Dgcc make clean all > ./sysctl -n hw.ncpu >=20 >=20 > clang --version > FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221 > Target: x86_64-unknown-freebsd9.1 > Thread model: posix >=20 > gcc --version > gcc (GCC) 4.2.1 20070831 patched [FreeBSD] > Copyright (C) 2007 Free Software Foundation, Inc. > .... Hmm... I should have mentioned this part earlier (sorry!): I've been using clang as the system compiler since about ... autumn 2012 (long ago enough that I forgot that it might be "odd" for stable/9). > When compiling the code with clang, no output is happening. When=20 > compiling with gcc, the FreeBSD 9-stable sysctl operates correctly. How= =20 > do we proceed? >=20 > Can more people check this and reproduce? Well, here's what I see: g1-252(9.3-P)[22] svn co file:///svn/freebsd/src/base/stable/9/sbin/sysctl A sysctl/sysctl.c A sysctl/sysctl.8 A sysctl/Makefile U sysctl Checked out revision 268249. g1-252(9.3-P)[23] cd sysctl/ g1-252(9.3-P)[24] env CC=3Dclang make clean all rm -f sysctl sysctl.o sysctl.8.gz sysctl.8.cat.gz Warning: Object directory not changed from original /tmp/hps/sysctl clang -O2 -pipe -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsyste= m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-p= rototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-poin= ter-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -W= no-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-un= used-function -Wno-enum-conversion -c sysctl.c clang -O2 -pipe -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsyste= m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-p= rototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-poin= ter-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -W= no-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-un= used-function -Wno-enum-conversion -o sysctl sysctl.o=20 gzip -cn sysctl.8 > sysctl.8.gz g1-252(9.3-P)[25] ./sysctl -n hw.ncpu g1-252(9.3-P)[26] env CC=3Dgcc make clean all rm -f sysctl sysctl.o sysctl.8.gz sysctl.8.cat.gz Warning: Object directory not changed from original /tmp/hps/sysctl clang -O2 -pipe -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsyste= m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-p= rototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-poin= ter-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -W= no-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-un= used-function -Wno-enum-conversion -c sysctl.c clang -O2 -pipe -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsyste= m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-p= rototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-poin= ter-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -W= no-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-un= used-function -Wno-enum-conversion -o sysctl sysctl.o=20 gzip -cn sysctl.8 > sysctl.8.gz g1-252(9.3-P)[27] ./sysctl -n hw.ncpu g1-252(9.3-P)[28]=20 > When compiling the -10 and -11 version of sysctl with clang and gcc,=20 > everything is fine! That's moderately seriously kinky.... And not in a Good Way. :-/ > Thank you! At least I have some evidence that I might not be merely hallucinating.... Peace, david --=20 David H. Wolfskill david@catwhisker.org Taliban: Evil cowards with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --AEkhIf3vy/ReXTu0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJTtu/1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7seQP/0e5UCLxIMOv8ugkmuCU6yq/ uxvw/PI62hTyAnZS+97XwlQZcSqxoh33cruzyg6wfsOb8KKhjOE22n29C7Ewa+M7 cXlMDWOTgMdkoicojnf5N1jyZyoAGgtc0MOhh0kw4gcNZWYXwSGkuYlhZf1AkMq4 IZ+hqgSjm5zXpa+KacSmrE05uW06jYrRqq2DvN/oSm0+JhGjKs9CLfR2dl3QgYl9 8tUWHVRwdwpWB66fwSwn/i+saSoKSgqxI+EZzUxj6y8y4Zxfo+ESNemVE/VU7t+v L5REjVfzVdN+EaQcJsmrCjO2DI+vdJ/Ad9X0hdhqJanK1lsGWGeSYN+ZPNTfqPu9 EaJG2q8HCiT9qwU9j9jKk3odf/9ootOUbK/CS0EY3A3zDbuRI3Fh5gxKsGtQL9+8 1mv4VOdTp80XKUiVFj8rXv6doeS/Wt2eiKeSHL2AXFXPBm4PjbnHVrDYTzB8MuKS yC69q2YrTRJJaVZ1rZcRKN0EPZ/u+4Btj1HZZc6n2fEMlBzxWqS4iATrRp4zzcRL Uq+LLVv51FX2qeDkuhTYUFGvfNb/ZZe0gblLbWn/Y1Ujl7vaye6JIxiF4YN0AgOS DiCl6zA9MsQzutIjGisP326m5j0L1VZm146CYT7QyxqRn8s+Fbh2aeHmxj5f/2xp ZwNMBb1lnBF4x6mV5F8U =co+H -----END PGP SIGNATURE----- --AEkhIf3vy/ReXTu0--