[OE-core] [PATCH] gstreamer1.0: Shorten __FILE__ in gst_debug_log output on all platforms.

Andreas Oberritter obi at opendreambox.org
Thu Feb 26 22:27:13 UTC 2015


On 26.02.2015 23:11, Otavio Salvador wrote:
> On Thu, Feb 26, 2015 at 6:56 PM, Andreas Oberritter
> <obi at opendreambox.org> wrote:
>> On 26.02.2015 22:47, Richard Purdie wrote:
>>> On Fri, 2015-02-27 at 04:31 +1100, Peter Urbanec wrote:
>>>> On WIN32 the file argument to gst_debug_log_valist is shortened to just
>>>> the filename. This is useful not only for MSVC, but also with gcc/Linux
>>>> when doing cross-compilation builds and out-of-tree builds.
>>>
>>> Ultimately I think we need to address this issue in gcc itself, probably
>>> setting some kind of base path in the environment which it removes from
>>> __FILE__ (set to ${S}). There were more complex discussions about using
>>> the same mapping code as can be used with the debug symbols code too.
>>
>> FWIW, here's a patch I'm using with gcc 4.8, which just cuts off the
>> whole directory part.
>>
>> http://git.openembedded.org/openembedded-core-contrib/commit/?h=obi/master&id=a1e8d6cfb71367d745f2478c13a7250e41ca4f1b
> 
> Ideally it could drop the S from the string. So the internal path
> would be respected.
> 
> What do you think?

I thought about that before, but preferred not to do it for the sake of
simplicity. Usually __FILE__ is used for debug output, so it's printed
together with a more or less unique debug message. I guess it should be
easy to find the right location inside the source tree in almost every
case, even if some filenames might appear more than once in a project.

Note that generated source files may live in ${B}, which is not below
${S}. You could cut off ${WORKDIR} instead, though.

Regards,
Andreas



More information about the Openembedded-core mailing list