Hi Maurizio,

Am Dienstag, den 05.08.2008, 14:48 +0200 schrieb Maurizio Rottin:
> hi all,
> i'm trying to croos compile for arm a base system.
> 
> i'm using T2 7.0 and when compiling perl i get the following lines:
> 
> == 11:40:59 =[1]=> Building perl/perl [5.10.0 7.0.0].
> -> Reading package config: package/perl/perl/perl.conf
> -> Preparing build in src.perl.default.20080805.114058.25127.gentoo-devel
> -> Building. Writing output to $root/var/adm/logs/1-perl.out
> !>        CCCMD =  arm-t2-linux-gnueabi-gcc -DPERL_CORE -c
> -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/include/gdbm   ..
> !> `sh  cflags "optimize='-O2'" generate_uudmap.o`  generate_uudmap.c
> !>        CCCMD =  arm-t2-linux-gnueabi-gcc -DPERL_CORE -c
> -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/include/gdbm   ..
> !> arm-t2-linux-gnueabi-gcc -o generate_uudmap -L/usr/local/lib
> generate_uudmap.o -lnsl -ldl -lm -lcrypt -lutil -lc  -lm
> !> ./generate_uudmap >uudmap.h
> !> /bin/sh: ./generate_uudmap: cannot execute binary file
> !> Due to previous errors, no 1-perl.log file!
> !> (Try enabling xtrace in the config to track an error inside the
> build system.)
> -> $root/var/adm/logs/1-perl.out -> 1-perl.err
> == 08/05/08 11:44:44 =[1]=> Aborted building package perl.
> 
> the problem is that "generate_uudmap" is a binary compiled for arm,
> then it can't be executed on non-arm system.

please put the attached patch in package/perl/perl, it replaces $(CC)
with $(HOSTCC) to build generate_uudmap.

Regards,
Michael

# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../perl/install.patch.cross
# Copyright (C) 2004 - 2006 The T2 SDE Project
# 
# More information can be found in the files COPYING and README.
# 
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

Some cross compile hacks.
  - Rene Rebe <[EMAIL PROTECTED]>

Skip man page installation, requires Fcntl extension in miniperl module
  - Michael Tross <[EMAIL PROTECTED]>

--- perl-5.10.0/Makefile.SH.orig        2008-02-08 13:20:57.000000000 +0100
+++ perl-5.10.0/Makefile.SH     2008-02-08 14:51:16.000000000 +0100
@@ -481,8 +481,8 @@
 uudmap.h: generate_uudmap\$(EXE_EXT)
        \$(RUN) ./generate_uudmap\$(EXE_EXT) >uudmap.h
 
-generate_uudmap\$(EXE_EXT): generate_uudmap\$(OBJ_EXT)
-       \$(CC) -o generate_uudmap \$(LDFLAGS) generate_uudmap\$(OBJ_EXT) 
\$(libs)
+generate_uudmap\$(EXE_EXT):
+       \$(HOSTCC) -o generate_uudmap \$(LDFLAGS) generate_uudmap.c \$(libs)
 
 !GROK!THIS!
 $spitshell >>Makefile <<'!NO!SUBS!'
@@ -919,11 +919,11 @@
 INSTALL_DEPENDENCE = all
 
 install.perl:  $(INSTALL_DEPENDENCE) installperl
-       $(LDLIBPTH) $(RUN) ./perl installperl --destdir=$(DESTDIR) 
$(INSTALLFLAGS) $(STRIPFLAGS)
+       $(LDLIBPTH) $(RUN) ./miniperl installperl --destdir=$(DESTDIR) 
$(INSTALLFLAGS) $(STRIPFLAGS)
        [EMAIL PROTECTED] ! -s extras.lst || $(MAKE) extras.install
 
 install.man:   all installman
-       $(LDLIBPTH) $(RUN) ./perl installman --destdir=$(DESTDIR) 
$(INSTALLFLAGS)
+       $(LDLIBPTH) $(RUN) echo installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
 
 # XXX Experimental. Hardwired values, but useful for testing.
 # Eventually Configure could ask for some of these values.
----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of: unsubscribe t2

Reply via email to