[oe] [PATCH] uclibc++: moved to 0.2.2

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Wed Nov 17 19:56:13 UTC 2010


2010/11/17 Khem Raj <raj.khem at gmail.com>:
> On Wed, Nov 17, 2010 at 2:08 AM, Frans Meulenbroeks
> <fransmeulenbroeks at gmail.com> wrote:
>> Removed the 0.1.9 version as it is quite old and does not compile
>> renamed files dir to uclibc++
>> added patches to get 0.2.2 compiling.
>> Patches are gracefully picked from openwrt
>> (https://dev.openwrt.org/browser/packages/libs/uclibc%2B%2B/patches?rev=24017)
>>
>> Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
>>
>> ---
>>
>> For the review:
>> note that I also added a patch for include/cstring (cstring.patch).
>>
>> With that patch the stuff compiles, without it I get these errors
>> (distro minimal, target calamari, eglibc)
>> If there is a better solution, please advise.
>>
>> | WRAPPER_INCLUDEDIR=-I../include ../bin/g++-uc    -ansi  -fPIC -o eh_alloc.o -c eh_alloc.cpp
>> | In file included from eh_alloc.cpp:21:0:
>> | ../include/cstring: In function 'void* std::memchr(void*, int, size_t)':
>> | ../include/cstring:55:46: error: 'void* std::memchr(void*, int, size_t)' conflicts with previous using declaration 'void* memchr(void*, int, size_t)'
>> | ../include/cstring:56:50: error: invalid conversion from 'const void*' to 'void*'
>> | ../include/cstring: In function 'char* std::strchr(char*, int)':
>> | ../include/cstring:59:36: error: 'char* std::strchr(char*, int)' conflicts with previous using declaration 'char* strchr(char*, int)'
>> | ../include/cstring:60:47: error: invalid conversion from 'const char*' to 'char*'
>> | ../include/cstring: In function 'char* std::strpbrk(char*, const char*)':
>> | ../include/cstring:63:47: error: 'char* std::strpbrk(char*, const char*)' conflicts with previous using declaration 'char* strpbrk(char*, const char*)'
>> | ../include/cstring:64:50: error: invalid conversion from 'const char*' to 'char*'
>> | ../include/cstring: In function 'char* std::strrchr(char*, int)':
>> | ../include/cstring:67:37: error: 'char* std::strrchr(char*, int)' conflicts with previous using declaration 'char* strrchr(char*, int)'
>> | ../include/cstring:68:48: error: invalid conversion from 'const char*' to 'char*'
>> | ../include/cstring: In function 'char* std::strstr(char*, const char*)':
>> | ../include/cstring:71:46: error: 'char* std::strstr(char*, const char*)' conflicts with previous using declaration 'char* strstr(char*, const char*)'
>> | ../include/cstring:72:49: error: invalid conversion from 'const char*' to 'char*'
>> | make[1]: *** [eh_alloc.o] Error 1
>> | make[1]: Leaving directory `/home/frans/workspace/tmp/work/ppce500v2-oe-linux-gnuspe/uclibc++-0.2.2-r1/uClibc++-0.2.2/src'
>> | make: *** [all] Error 2
>> | FATAL: oe_runmake failed
>> | ERROR: Function do_compile failed
>> ---

[...]

>> diff --git a/recipes/uclibc++/uclibc++/cstring.patch b/recipes/uclibc++/uclibc++/cstring.patch
>> new file mode 100644
>> index 0000000..57c2317
>> --- /dev/null
>> +++ b/recipes/uclibc++/uclibc++/cstring.patch
>> @@ -0,0 +1,21 @@
>> +Index: uClibc++-0.2.2/include/cstring
>> +===================================================================
>> +--- uClibc++-0.2.2.orig/include/cstring        2010-11-17 10:35:02.525119882 +0100
>> ++++ uClibc++-0.2.2/include/cstring     2010-11-17 10:35:19.274494437 +0100
>> +@@ -49,6 +49,7 @@
>> +       using ::strxfrm;
>> +
>> +
>> ++#if 0
>> +       //Extra definitions required in c++ spec
>> +
>> +
>> +@@ -71,7 +72,7 @@
>> +       inline char* strstr(char* s1, const char* s2){
>> +               return strstr(const_cast<const char *>(s1), s2);
>> +       }
>> +-
>> ++#endif
>> + }
>> +
>
> why is this needed. do u get compilation errors ? if yes post the error

Yes, I get compile errors, They are already in my first post (and also
on this one).
Immediately after the commit message and before the list of files.

>
[...]

>> -SRC_URI[md5sum] = "ebf58e04d72eab5c131c2c9118737024"
>> -SRC_URI[sha256sum] = "82342a5d6088421e79699dd7af614ebecf6dd335eabce07690902a379f5ea8de"
>> diff --git a/recipes/uclibc++/uclibc++_0.2.2.bb b/recipes/uclibc++/uclibc++_0.2.2.bb
>> new file mode 100644
>> index 0000000..c42772b
>> --- /dev/null
>> +++ b/recipes/uclibc++/uclibc++_0.2.2.bb
>> @@ -0,0 +1,57 @@
>> +DESCRIPTION = "A C++ standard library targeted towards the embedded \
>> +systems/software market."
>> +HOMEPAGE = "http://cxx.uclibc.org/"
>> +LICENSE = "LGPL"
>
> LGPL also have versions find out which one it is licensed under

Will do

>
>> +PRIORITY = "optional"
>> +SECTION = "libs"
>> +
>> +PR = "r0"
>> +
>> +SRC_URI = "http://cxx.uclibc.org/src/uClibc++-${PV}.tar.bz2 \
>> +          file://nobash.patch \
>> +          file://006-eabi_fix.patch \
>> +          file://009-compile_fixes.patch \
>> +          file://900-dependent_exception.patch \
>> +          file://cstring.patch \
>> +          file://defconfig"
>> +SRC_URI[md5sum] = "1ceef3209cca88be8f1bd9de99735954"
>> +SRC_URI[sha256sum] = "f140596469e0ab0523c0774d14fe82ba2831d48ad130415748250dbab149318e"
>> +S = "${WORKDIR}/uClibc++-${PV}"
>> +
>> +# uClibc++ runtime prefix directory (UCLIBCXX_RUNTIME_PREFIX) [/usr/$(TARGET_ARCH)-linux-uclibc] (NEW)
>> +# uClibc++ header file subdirectory (UCLIBCXX_RUNTIME_INCLUDE_SUBDIR) [/include] (NEW)
>> +# uClibc++ library subdirectory (UCLIBCXX_RUNTIME_LIB_SUBDIR) [/lib] (NEW)
>> +# uClibc++ application file subdirectory (UCLIBCXX_RUNTIME_BIN_SUBDIR) [/bin] (NEW)
>> +
>> +EXTRA_OEMAKE = "'OPTIMIZATION=' 'XWARNINGS=' 'XARCH_CFLAGS=${CFLAGS}' \
>> +               'CPU_FLAGS=' 'STRIPTOOL=true' 'LD=${LD}'"
>> +configmangle = 's,^UCLIBCXX_RUNTIME_PREFIX=.*,UCLIBCXX_RUNTIME_PREFIX="${exec_prefix}",; \
>> +               s,^UCLIBCXX_RUNTIME_INCLUDE_SUBDIR=.*,UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include/c++-uc",; \
>> +               s,^UCLIBCXX_RUNTIME_LIB_SUBDIR=.*,UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib",; \
>> +               s,^UCLIBCXX_RUNTIME_BIN_SUBDIR=.*,UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin",;'
>> +PARALLEL_MAKE = ""
>> +
>> +do_configure () {
>> +       cp ${WORKDIR}/defconfig ${S}/.config
>> +
>> +       perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak
>> +       perl -i -p -e '${configmangle}' ${S}/.config
>> +
>> +       oe_runmake oldconfig
>> +}
>> +
>> +do_stage () {
>> +       oe_runmake 'UCLIBCXX_RUNTIME_PREFIX=${STAGING_LIBDIR}/../' \
>> +                  install
>> +       chmod +x ${STAGING_LIBDIR}/libuClibc++.so.*
>> +}
>> +
>
> try to get rid of do_stage

Will check.
Actually this was needed by one of our customers, and not sure if he
is using a version that already removed legacy staging.
>

[..]

Frans




More information about the Openembedded-devel mailing list