[OE-core] [PATCH 2/2] libx11: fix nativesdk build on older distros

Chris Larson clarson at kergoth.com
Mon Sep 24 21:08:27 UTC 2012


On Mon, Sep 24, 2012 at 1:13 PM, McClintock Matthew-B29882
<B29882 at freescale.com> wrote:
> On Mon, Sep 24, 2012 at 2:55 PM, Matthew McClintock <msm at freescale.com> wrote:
>> makekeys-makekeys.o: In function `main':
>> makekeys.c:(.text+0x85): undefined reference to `__isoc99_sscanf'
>> makekeys.c:(.text+0xa7): undefined reference to `__isoc99_sscanf'
>> collect2: ld returned 1 exit status
>> make: *** [makekeys] Error 1
>>
>> Older libc do not have this defined, we can use the -D_GNU_SOURCE
>> to the compiler to prevent generating calls to this function and
>> make linking work
>>
>> Signed-off-by: Matthew McClintock <msm at freescale.com>
>> ---
>>  .../xorg-lib/libx11/use_host_cc_for_utils.patch    |   12 ++++++++++++
>>  meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb     |    3 ++-
>>  2 files changed, 14 insertions(+), 1 deletion(-)
>>  create mode 100644 meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
>>
>> diff --git a/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch b/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
>> new file mode 100644
>> index 0000000..08ba39a
>> --- /dev/null
>> +++ b/meta/recipes-graphics/xorg-lib/libx11/use_host_cc_for_utils.patch
>> @@ -0,0 +1,12 @@
>> +Index: libX11-1.5.0/src/Makefile.am
>> +===================================================================
>> +--- libX11-1.5.0.orig/src/Makefile.am
>> ++++ libX11-1.5.0/src/Makefile.am
>> +@@ -420,6 +420,6 @@ ks_tables.h: $(KEYSYMDEFS) $(top_builddi
>> +       mv ks_tables_h $@
>> +
>> + $(top_builddir)/src/util/makekeys$(EXEEXT): force
>> +-      cd util && $(MAKE)
>> ++      cd util && $(MAKE) CC=gcc CCLD=gcc LDFLAGS= CFLAGS=-D_GNU_SOURCE

Isn't the makekeys build already using CC_FOR_BUILD? That's what is
implied by the libx11.inc export of those variables. So it seems a bit
unnecessary to pass in gcc expliciltly.
-- 
Christopher Larson




More information about the Openembedded-core mailing list