From owner-freebsd-toolchain@FreeBSD.ORG Wed Jan 23 10:06:06 2013 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AEADC46D for ; Wed, 23 Jan 2013 10:06:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2019975B for ; Wed, 23 Jan 2013 10:06:05 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0NA5wTR050594; Wed, 23 Jan 2013 12:05:58 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0NA5wTR050594 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0NA5w7i050593; Wed, 23 Jan 2013 12:05:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 23 Jan 2013 12:05:58 +0200 From: Konstantin Belousov To: Erik Cederstrand Subject: Re: [patch] DEBUG_FLAGS cleanup Message-ID: <20130123100558.GV2522@kib.kiev.ua> References: <0CBACA33-7420-4045-AD0C-852983CD64CF@cederstrand.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sQTf9N6XI0Qk9QIT" Content-Disposition: inline In-Reply-To: <0CBACA33-7420-4045-AD0C-852983CD64CF@cederstrand.dk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: "toolchain@freebsd.org" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 10:06:06 -0000 --sQTf9N6XI0Qk9QIT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 23, 2013 at 09:23:41AM +0100, Erik Cederstrand wrote: > Hello folks, >=20 > Attached is a patch to clean up unconditional use of "-g" in Makefiles, i= nstead respecting the global DEBUG_FLAGS setting. >=20 > I need this as part of my quest to support deterministic builds. Currentl= y, debug information contains stuff like timestamps, absolute paths etc. th= at make binaries non-deterministic, and Clang lacks the necessary flags to = rectify this. So I'd like DEBUG_FLAGS=3D"" to actually work everywhere. >=20 > I'd be thankful for feedback and help committing the changes if it's OK. >=20 > Thanks, > Erik >=20 > Index: head/usr.bin/tar/Makefile > =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 > --- head/usr.bin/tar/Makefile (revision 242791) > +++ head/usr.bin/tar/Makefile (working copy) > @@ -38,7 +38,6 @@ > CFLAGS+=3D -I${LIBARCHIVEDIR}/libarchive_fe > SYMLINKS=3D bsdtar ${BINDIR}/tar > MLINKS=3D bsdtar.1 tar.1 > -DEBUG_FLAGS=3D-g > =20 > .PHONY: check test clean-test > check test: $(PROG) bsdtar.1.gz > Index: head/gnu/usr.bin/cc/cc_tools/Makefile > =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 > --- head/gnu/usr.bin/cc/cc_tools/Makefile (revision 242791) > +++ head/gnu/usr.bin/cc/cc_tools/Makefile (working copy) > @@ -6,7 +6,7 @@ > =20 > .include "../Makefile.inc" > =20 > -CFLAGS+=3D -g > +CFLAGS+=3D $(DEBUG_FLAGS) > CFLAGS+=3D -DGENERATOR_FILE -DHAVE_CONFIG_H > =20 > # Override LIBIBERTY set by Makefile.inc, We use our own for This fragment catched my eye, and it is typical for the patch. Why do you need to add DEBUG_FLAGS to the CFLAGS manually ? Wouldn't share/mk magic do this automatically ? If not, I think that it should be considered to fix the remaining cases where DEBUG_FLAGS are not added in the common mk code, instead of sprinkling the additions all over the place ? I think that the cleanup you performed is needed. --sQTf9N6XI0Qk9QIT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ/7YGAAoJEJDCuSvBvK1BaX0P/RWdHVCqLQU6k3m+2X7gxzI4 qDEd2cEURrU6/YbIs9QpKmg/QoJ/mJVDnVmez6q8g40R7JCnF24YIdcbk2uHZxY1 EgTummWyTNIsTUkR2WMXlSdTIbFcz1XeT+c/KVQDPuTo44ZrmiVUC+cXdkSPJ+KI 5IAdg7r9/Lr/tf/Oxcnz+YewhbYBPiTn/H6sWuTdhcIhjGJH69S5d83dH7lJeQ+S xw5QOHKzCyJ9JSXnuMoUG+zjytHvOuYg5NONzdRZwBZLEdhQ94bcVZwNJ1Kx1g7o YfHGmGOA8oJOMuESCvrBjjDfxtQpv+/mhr9eRwX0Y2E7kgecKQGtEdAQQ61RiGPQ 4cBdr2O46lrEtiWQu5W1tq/LAmK5Zj1dRC3xTyiQMYcvAH4lNHuUHwHS98RkpCJW tv32Pwix+dswubMECpR0GUV2mEDE597S8S4LOrFuoiuSzGo5JegWifB0IXXGUUey rOxiaQXFM8ebJYaAe7zdEacPaHq3+Fc+bIE5aNRZqgo+iw2g5X15AscBixWe4B/q qKGKFEgdm/74tpyfcrjpP5E81XFOqtOlbH+EhUhOJtw1CBifbmx+Its5lEU373HG bXUq5ueMcM1EmBbIwDMw7cqGfMMJ5QNbETH19d99pr4KMDUkuEPIdzQkJ1G+6wJ3 Bbz+DJKNm32WiFIW/tq0 =9kAn -----END PGP SIGNATURE----- --sQTf9N6XI0Qk9QIT--