[uClibc] Re: Again some buildroot patches
Manuel Novoa III
mjn3 at codepoet.org
Wed Jan 7 18:03:26 MST 2004
On Wed, Jan 07, 2004 at 06:17:05PM +0100, Matthias Kilian wrote:
> On Wed, Jan 07, 2004 at 05:04:47PM +0800, Selwyn Tang wrote:
>
> At least, for me the makefile generation with Configure works. However,
> after
>
> $ shell Configure -de
> $ make
>
> I get:
> perlio.c: In function `PerlIOStdio_invalidate_fileno':
> perlio.c:2831: error: structure has no member named `_fileno'
> make: *** [perlio.o] Error 1
Perl 5.8.2 has some code in one file that wants to access a FILE's
file descriptor as an lvalue. This requires a minor patch.
Also, you'll probably want to apply the -lpthread related patch as
well... at least until the shared loader gets fixed.
Patches attached.
Manuel
-------------- next part --------------
--- perl-5.8.2/perlio.c-dist 2003-12-03 14:30:24.000000000 -0700
+++ perl-5.8.2/perlio.c 2003-12-03 14:32:10.000000000 -0700
@@ -2824,7 +2824,11 @@
/* XXX this could use PerlIO_canset_fileno() and
* PerlIO_set_fileno() support from Configure
*/
-# if defined(__GLIBC__)
+# if defined(__UCLIBC__)
+ /* uClibc must come before glibc because it defines __GLIBC__ as well. */
+ f->filedes = -1;
+ return 1;
+# elif defined(__GLIBC__)
/* There may be a better way for GLIBC:
- libio.h defines a flag to not close() on cleanup
*/
-------------- next part --------------
diff -ur perl-5.8.0/ext/threads/Makefile.PL perl-5.8.0.uclibc/ext/threads/Makefile.PL
--- perl-5.8.0/ext/threads/Makefile.PL 2002-06-01 19:03:11.000000000 +0200
+++ perl-5.8.0.uclibc/ext/threads/Makefile.PL 2003-03-12 09:38:13.000000000 +0100
@@ -10,7 +10,7 @@
(ABSTRACT_FROM => 'threads.pm', # retrieve abstract from module
AUTHOR => 'Artur Bergman <artur at contiller.se>') : ()),
'MAN3PODS' => {}, # Pods will be built by installman
- 'LIBS' => [''], # e.g., '-lm'
+ 'LIBS' => ['-lpthread'], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
# Insert -I. if you add *.h files later:
# 'INC' => '', # e.g., '-I/usr/include/other'
diff -ur perl-5.8.0/ext/threads/shared/Makefile.PL perl-5.8.0.uclibc/ext/threads/shared/Makefile.PL
--- perl-5.8.0/ext/threads/shared/Makefile.PL 2002-07-13 00:17:07.000000000 +0200
+++ perl-5.8.0.uclibc/ext/threads/shared/Makefile.PL 2003-03-12 09:38:35.000000000 +0100
@@ -13,7 +13,7 @@
(ABSTRACT_FROM => 'shared.pm', # retrieve abstract from module
AUTHOR => 'Arthur Bergman <arthur at contiller.se>') : ()),
'MAN3PODS' => {}, # Pods will be built by installman
- 'LIBS' => [''], # e.g., '-lm'
+ 'LIBS' => ['-lpthread'], # e.g., '-lm'
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
# Insert -I. if you add *.h files later:
'INC' => '', # e.g., '-I/usr/include/other'
More information about the uClibc
mailing list