Date: Wed, 23 Jan 2013 12:05:58 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Erik Cederstrand <erik@cederstrand.dk> Cc: "toolchain@freebsd.org" <toolchain@freebsd.org> Subject: Re: [patch] DEBUG_FLAGS cleanup Message-ID: <20130123100558.GV2522@kib.kiev.ua> In-Reply-To: <0CBACA33-7420-4045-AD0C-852983CD64CF@cederstrand.dk> References: <0CBACA33-7420-4045-AD0C-852983CD64CF@cederstrand.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130123100558.GV2522>