The attached patch removes the explicit setting of DEBUG_FLAGS in sfxge/Makefile, s.t. it doesn't affect developers such as myself who depend on DEBUG_FLAGS to be a user-defined value and thus react accordingly via make.conf. Fix: Patch attached with submission follows: How-To-Repeat: 1. Add the following to make.conf: .if defined(DEBUG_FLAGS) && !empty(DEBUG_FLAGS) .error "I didn't do it!" .endif 2. Run `make buildkernel'.
this is happen in mps driver also.
mps appears to be fixed now :). Because sfxge is a SUBDIR and DEBUG_FLAGS isn't exported, it doesn't do anything other than add debug symbols to itself.
Adding philip@ (who removed -g via r255936) to comment.
So, what do you want me to do? :) Does the -DDEBUG=1 to sfxge cause any problems?
(In reply to Philip Paeps from comment #4) > So, what do you want me to do? :) > Does the -DDEBUG=1 to sfxge cause any problems? Removing -DDEBUG=1 is also the proposed patch's intention. I am not sure if thats still needed. I'd let yaneurabeya@ (reporter of this bug) comment about it. PS: We have many bugs with patches not getting looked at. Just trying to triage some :-)
No longer an issue on head after r283679 or stable/10 after r284556. Giving to Andrew to decide if he wants to MFC the change(s) back to stable/9.
I think it is pretty straightforward to fix in stable/9. So, I'll do.
A commit references this bug: Author: arybchik Date: Mon Nov 30 13:20:49 UTC 2015 New revision: 291487 URL: https://svnweb.freebsd.org/changeset/base/291487 Log: MFC r283679 sfxge: do not use DEBUG_FLAGS to enable extra debug checks DEBUG_FLAGS are set to DEBUG option value when kernel is built. For example, it is -g in GENERIC config to have debug symbols. Also DEBUG_FLAGS are used to determine if ctfconvert should keep debug symbols. Since we redefined DEBUG_FLAGS, debug symbols were always missing. ctfconvert complains about it during kernel build. It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or similar), we'll have no debug symbols and ctfconvert will complain. If it incorrect to always have -g in our DEBUG_FLAGS, since debug symbols presence should be controllable by kernel config. So, just add disabled by default addition of -DDEBUG=1 to CFLAGS. PR: 163775 Sponsored by: Solarflare Communications, Inc. Changes: _U stable/9/sys/ _U stable/9/sys/dev/ _U stable/9/sys/modules/ stable/9/sys/modules/sfxge/Makefile
Fixed in head, stable/10 and stable/9.