[Bug 237714] [PATCH] sysutils/xfce4-power-manager: fix craches, improve freebsd support, add DEBUG option

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu May 9 07:06:10 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237714

--- Comment #3 from Guido Falsi <madpilot at FreeBSD.org> ---
(In reply to rozhuk.im from comment #2)
> --enable-debug does not affect to INSTALL_TARGET=	install-strip, and as
> result binary without debug symbols, gdb bt show nothink usable.
> I see no other good ways to set INSTALL_TARGET=install, remove -O* and add
> -g to CFLAGS.

Maybe my question was not clear. The standard way to build ports with debugging
symbols in FreeBSD is to use the WITH_DEBUG flag, which you use correctly.

WITH_DEBUG causes the ports framework to unset the STRIP variable and set
STRIP_CMD to true (the noop command), also automatically removes optimization
flags from cflags and replaces INSTALL_TARGET. You can find the code doing all
this in bsd.port.mk [1]


What I was criticizing is adding a "DEBUG" option using the options framework.
It's better to only check for the WITH_DEBUG flag and act based on that, no
need for an option in the option framework. Should every single port have a
DEBUG option then?

I'd rather avoid polluting port options by adding DEBUG to OPTIONS_DEFINE. Some
ports are doing this but this is not a good idea.

> 
> I will submit changes to upstream a bit later.

In general I think that, for changes which are not just porting changes, but
actual development, submitting them upstream should happen before including in
the ports tree. This to avoid diverging.

Anyway most of these changes look quite reasonable so I will be testing them
for inclusion.

> 
> "return g_strdup (_("Unknown"));" - makes compiller happy and silence
> warning.
> I will try to submit all changes to upstream.

I see.

> 
> 8 - my magic number.
> I assume that this is max reasonable index count for lcd0...lcd7.
> 
> I will change 64 to something like 16 in future.

This could be difficult to upstream. Better put it in a define anyway.


I'll followup with a modified patch.


[1]
https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=500731&view=markup#l1758

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-xfce mailing list