[oe] [PATCH] prboom_2.5.0.bb: fix compilation failure due to undefined references.

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Mon Oct 11 11:30:33 UTC 2010


2010/10/11 Graham Gower <graham.gower at gmail.com>:
> On 11 October 2010 17:04, Frans Meulenbroeks
> <fransmeulenbroeks at gmail.com> wrote:
>> Do you feel this is the preferred way?
>> I would probably not have made the patch but add -D_GNU_SOURCE to
>> CFLAGS. (I like to compile all the sources with the same flags to
>> avoid inconsistencies)
>>
>> Frans
>
> To be honest, I didn't really think about it and don't care either
> way. But the glibc manual says the following:
> "You should define these macros by using ‘#define’ preprocessor
> directives at the top of your source code files. These directives must
> come before any #include of a system header file. It is best to make
> them the very first thing in the file, preceded only by comments. You
> could also use the ‘-D’ option to GCC, but it's better if you make the
> source files indicate their own meaning in a self-contained way." [1]
>
> The last sentence is not found in the feature_test_macros(7) man page.
>
> -Graham
>
> [1] http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html


Ah ok, didn't know that text.
My personal perception is to keep changes as small and unintrusive as
possible. That is why I generally prefer -D. With a new version the -D
will keep working whereas a patch might not (due to a change in the
src file).

But looking at that text, I'm fine with this change.

Acked-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>




More information about the Openembedded-devel mailing list