Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-02-07 Thread Michael Olbrich
On Sun, Jan 22, 2012 at 12:29:48AM +0100, Bernhard Walle wrote:
 This patch is by far the most ugly part of all of the Darwin patches.
 At least the md5sum of a locale-archive when generating a de_DE.UTF-8
 locale is identical...
 
 A first review, please.

We're creating the localedef package anyway, so I'd like to create a new
tarball with all the paches included.
I've pushed my current WIP to git://git.pengutronix.de/git/mol/localedef.git
please test. This contains most of your patches (or modified versions). For
the gettext stuff: we already have getttext-dummy package[1]. We can create
a host-getttext-dummy package from that.

Michael

[1] 
http://www.pengutronix.de/software/gettext-dummy/download/gettext-dummy-1.0.1.tar.bz2

 Signed-off-by: Bernhard Walle bernh...@bwalle.de
 ---
  ...n-Fix-problem-with-__block-parameter-name.patch |   33 
  ...ide-dummy-implementation-of-gettext-funct.patch |   45 +
  ...-some-locale-related-definitions-from-Lin.patch |  182 
 
  ...004-Darwin-Compile-with-fnested-functions.patch |   37 
  ...005-Use-own-implementation-of-__rawmemchr.patch |   40 +
  patches/localedef-eglibc-2.11.90-ptx1/autogen.sh   |1 +
  patches/localedef-eglibc-2.11.90-ptx1/series   |8 +
  7 files changed, 346 insertions(+), 0 deletions(-)
  create mode 100644 
 patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
  create mode 100644 
 patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
  create mode 100644 
 patches/localedef-eglibc-2.11.90-ptx1/0003-Darwin-Copy-some-locale-related-definitions-from-Lin.patch
  create mode 100644 
 patches/localedef-eglibc-2.11.90-ptx1/0004-Darwin-Compile-with-fnested-functions.patch
  create mode 100644 
 patches/localedef-eglibc-2.11.90-ptx1/0005-Use-own-implementation-of-__rawmemchr.patch
  create mode 12 patches/localedef-eglibc-2.11.90-ptx1/autogen.sh
  create mode 100644 patches/localedef-eglibc-2.11.90-ptx1/series
 
 diff --git 
 a/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
  
 b/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
 new file mode 100644
 index 000..a80321e
 --- /dev/null
 +++ 
 b/patches/localedef-eglibc-2.11.90-ptx1/0001-Darwin-Fix-problem-with-__block-parameter-name.patch
 @@ -0,0 +1,33 @@
 +From: Bernhard Walle bernh...@bwalle.de
 +Date: Sat, 21 Jan 2012 22:00:14 +0100
 +Subject: [PATCH] Darwin: Fix problem with __block parameter name
 +
 +This fixes the following compile error:
 +
 + 8 ---
 +./glibc/malloc/obstack.h:190: error: __block attribute can be specified
 +on variables only
 +In file included from glibc/locale/programs/charmap.c:32:
 + 8 ---
 +
 +Compiler war gcc-4.2 [i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple
 +Inc. build 5666) (dot 3)].
 +
 +Signed-off-by: Bernhard Walle bernh...@bwalle.de
 +---
 + eglibc/malloc/obstack.h |2 +-
 + 1 files changed, 1 insertions(+), 1 deletions(-)
 +
 +diff --git a/eglibc/malloc/obstack.h b/eglibc/malloc/obstack.h
 +index 449070e..0c4f2e4 100644
 +--- a/eglibc/malloc/obstack.h
  b/eglibc/malloc/obstack.h
 +@@ -187,7 +187,7 @@ extern int _obstack_begin_1 (struct obstack *, int, int,
 +  void (*) (void *, void *), void *);
 + extern int _obstack_memory_used (struct obstack *);
 + 
 +-void obstack_free (struct obstack *__obstack, void *__block);
 ++void obstack_free (struct obstack *__obstack, void *);
 + 
 + 
 + /* Error handler called when `obstack_chunk_alloc' failed to allocate
 diff --git 
 a/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
  
 b/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
 new file mode 100644
 index 000..9c3f005
 --- /dev/null
 +++ 
 b/patches/localedef-eglibc-2.11.90-ptx1/0002-Darwin-Provide-dummy-implementation-of-gettext-funct.patch
 @@ -0,0 +1,45 @@
 +From: Bernhard Walle bernh...@bwalle.de
 +Date: Sat, 21 Jan 2012 23:00:43 +0100
 +Subject: [PATCH] Darwin: Provide dummy implementation of gettext functions
 +
 +It's just not worth the effort requiring gettext for building locales in
 +a cross build system. English error messages are sufficient.
 +
 +Signed-off-by: Bernhard Walle bernh...@bwalle.de
 +---
 + include/libintl.h |   23 ++-
 + 1 files changed, 22 insertions(+), 1 deletions(-)
 +
 +diff --git a/include/libintl.h b/include/libintl.h
 +index 096aa8c..edf34eb 100644
 +--- a/include/libintl.h
  b/include/libintl.h
 +@@ -1,6 +1,27 @@
 + #ifdef HAVE_LIBINTL_H
 + #include_next libintl.h
 +-#endif
 ++#else
 ++
 ++#ifndef LIBINTL_H_
 ++#define LIBINTL_H_  1
 ++
 ++// dummy implementations of gettext() and textdomain()
 ++//
 ++static inline char *gettext(const char 

Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-02-07 Thread Bernhard Walle
* Michael Olbrich m.olbr...@pengutronix.de [2012-02-07 15:46]:
 On Sun, Jan 22, 2012 at 12:29:48AM +0100, Bernhard Walle wrote:
  This patch is by far the most ugly part of all of the Darwin patches.
  At least the md5sum of a locale-archive when generating a de_DE.UTF-8
  locale is identical...
  
  A first review, please.
 
 We're creating the localedef package anyway, so I'd like to create a new
 tarball with all the paches included.
 I've pushed my current WIP to git://git.pengutronix.de/git/mol/localedef.git
 please test. This contains most of your patches (or modified versions). For
 the gettext stuff: we already have getttext-dummy package[1]. We can create
 a host-getttext-dummy package from that.

Ah, ok, thanks. Currently I'm reworking my patches but I didn't have
time to finish it and post it... Expect something at the end of the
week.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-01-23 Thread Andreas Bießmann
Hi Bernhard,

On 22.01.12 00:29, Bernhard Walle wrote:
 This patch is by far the most ugly part of all of the Darwin patches.
 At least the md5sum of a locale-archive when generating a de_DE.UTF-8
 locale is identical...
 
 A first review, please.

I get some warnings and a linker error:

---8---
glibc/locale -I./include -I. -I. -include ./include/always.h -Wall
-Wno-format -c -o getopt.o glibc/posix/getopt.c
glibc/posix/getopt.c:74:1: warning: _ redefined
In file included from ./include/gettext.h:1,
 from glibc/posix/getopt.c:73:
./include/libintl.h:27:1: warning: this is the location of the previous
definition

...

gcc
-I/Users/andreas/Documents/source/ptxdist-arm-boards/platform-beagle/sysroot-host/include
-g -O2 -fnested-functions -DNO_SYSCONF
-DLOCALE_PATH='/usr/lib/locale:/usr/share/i18n'
-DLOCALEDIR='/usr/lib/locale'
-DLOCALE_ALIAS_PATH='/usr/share/locale'
-DCHARMAP_PATH='/usr/share/i18n/charmaps'
-DREPERTOIREMAP_PATH='/usr/share/i18n/repertoiremaps'
-DLOCSRCDIR='/usr/share/i18n/locales' -Iglibc/locale/programs
-Iglibc/locale -I./include -I. -I. -include ./include/always.h -Wall
-Wno-format -c -o vasprintf.o vasprintf.c
gcc -o localedef charmap.o charmap-dir.o ld-address.o ld-collate.o
ld-ctype.o ld-identification.o ld-measurement.o ld-messages.o
ld-monetary.o ld-name.o ld-numeric.o ld-paper.o ld-telephone.o ld-time.o
linereader.o localedef.o locarchive.o locfile.o repertoire.o
simple-hash.o xmalloc.o xstrdup.o argp-ba.o argp-eexst.o
argp-fmtstream.o argp-help.o argp-parse.o argp-pv.o argp-xinl.o error.o
getopt.o getopt1.o md5.o obstack.o asprintf.o getdelim.o
localedef_extra.o obstack_printf.o vasprintf.o
Undefined symbols for architecture x86_64:
  _argp_fmtstream_putc, referenced from:
  _usage_argful_short_opt in argp-help.o
  _argp_args_usage in argp-help.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [localedef] Error 1
make: ***
[/Users/andreas/Documents/source/ptxdist-arm-boards/platform-beagle/state/host-localedef.compile]
Error 2
---8---

regards

Andreas

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] host-localedef: Fix on Darwin

2012-01-23 Thread Bernhard Walle
* Andreas Bießmann andr...@biessmann.de [2012-01-23 22:29]:
 On 22.01.12 00:29, Bernhard Walle wrote:
  This patch is by far the most ugly part of all of the Darwin patches.
  At least the md5sum of a locale-archive when generating a de_DE.UTF-8
  locale is identical...
  
  A first review, please.
 
 I get some warnings and a linker error:

Is 'gcc' llvm-gcc (gcc --version)?

I'm using gcc-4.2 (FSF gcc) as host compiler, but of course it should be
fixed to work with llvm-gcc too as it's the default on Lion (and I think
even Snow Leopard).


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de