summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStelios Koroneos <skoroneos@digital-opsis.com>2007-04-01 10:50:27 +0000
committerStelios Koroneos <skoroneos@digital-opsis.com>2007-04-01 10:50:27 +0000
commit3cb20b35af93a7b0df80cd0ae87704c73a8c57dc (patch)
treefbbc98c1b5827f23f7f490a6e891603818e95c1a
parent0c26aba1747c6ab2b52020baa8a82c6de095ecb0 (diff)
packages/perl/perl_5.8.7.bb: A set of patches to make perl usable on powerpc targets.
Thanks to Jamie Lenahan for the help
-rw-r--r--classes/cpan.bbclass6
-rw-r--r--packages/perl/perl-5.8.7/config.sh-powerpc-linux68
-rw-r--r--packages/perl/perl.inc8
-rw-r--r--packages/perl/perl_5.8.7.bb4
4 files changed, 51 insertions, 35 deletions
diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass
index 74bbebf882..a566f0fa42 100644
--- a/classes/cpan.bbclass
+++ b/classes/cpan.bbclass
@@ -26,6 +26,12 @@ cpan_do_compile () {
if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
fi
+
+ if test ${TARGET_ARCH} = "powerpc" ; then
+ OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
+ fi
+
+
oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
}
diff --git a/packages/perl/perl-5.8.7/config.sh-powerpc-linux b/packages/perl/perl-5.8.7/config.sh-powerpc-linux
index 6d41d29e9f..67f7aa3166 100644
--- a/packages/perl/perl-5.8.7/config.sh-powerpc-linux
+++ b/packages/perl/perl-5.8.7/config.sh-powerpc-linux
@@ -53,10 +53,10 @@ byteorder='4321'
c='\c'
castflags='0'
cat='cat'
-cc='cc'
+cc='gcc'
cccdlflags='-fpic'
-ccdlflags='-Wl,-E,-Wl,-rpath,/usr/lib/perl5/5.8.7/powerpc-linux/CORE'
-ccflags='-fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.7/powerpc-linux/CORE'
+ccflags=''-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix'
@@ -77,12 +77,12 @@ cpio=''
cpp='cpp'
cpp_stuff='42'
cppccsymbols='linux=1 unix=1'
-cppflags='-fno-strict-aliasing -pipe'
+cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe'
cpplast='-'
cppminus='-'
-cpprun='cc -E'
-cppstdin='cc -E'
-cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=4 __GNUC__=4 __GNUC_MINOR__=1 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200112 _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1'
+cpprun='gcc -E'
+cppstdin='gcc -E'
+cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=5 __GNUC__=4 __GNUC_MINOR__=1 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=200112 _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1'
crypt_r_proto='0'
cryptlib=''
csh='csh'
@@ -131,7 +131,7 @@ d_const='define'
d_copysignl='define'
d_crypt='define'
d_crypt_r='undef'
-d_csh='undef'
+d_csh='define'
d_ctermid_r='undef'
d_ctime_r='undef'
d_cuserid='define'
@@ -147,7 +147,7 @@ d_dosuid='undef'
d_drand48_r='undef'
d_drand48proto='define'
d_dup2='define'
-d_eaccess='define'
+d_eaccess='undef'
d_endgrent='define'
d_endgrent_r='undef'
d_endhent='define'
@@ -162,7 +162,7 @@ d_endsent='define'
d_endservent_r='undef'
d_eofnblk='define'
d_eunice='undef'
-d_faststdio='undef'
+d_faststdio='define'
d_fchdir='define'
d_fchmod='define'
d_fchown='define'
@@ -170,7 +170,7 @@ d_fcntl='define'
d_fcntl_can_lock='define'
d_fd_macros='define'
d_fd_set='define'
-d_fds_bits='undef'
+d_fds_bits='define'
d_fgetpos='define'
d_finite='define'
d_finitel='define'
@@ -293,7 +293,7 @@ d_mktime='define'
d_mmap='define'
d_modfl='define'
d_modfl_pow32_bug='undef'
-d_modflproto='define'
+d_modflproto='undef'
d_mprotect='define'
d_msg='define'
d_msg_ctrunc='define'
@@ -312,7 +312,7 @@ d_mymalloc='undef'
d_nice='define'
d_nl_langinfo='define'
d_nv_preserves_uv='define'
-d_off64_t='undef'
+d_off64_t='define'
d_old_pthread_create_joinable='undef'
d_oldpthreads='undef'
d_oldsock='undef'
@@ -325,9 +325,9 @@ d_pipe='define'
d_poll='define'
d_portable='define'
d_procselfexe='define'
-d_pthread_atfork='undef'
+d_pthread_atfork='define'
d_pthread_attr_setscope='define'
-d_pthread_yield='undef'
+d_pthread_yield='define'
d_pwage='undef'
d_pwchange='undef'
d_pwclass='undef'
@@ -359,7 +359,7 @@ d_seekdir='define'
d_select='define'
d_sem='define'
d_semctl='define'
-d_semctl_semid_ds='undef'
+d_semctl_semid_ds='define'
d_semctl_semun='define'
d_semget='define'
d_semop='define'
@@ -422,12 +422,12 @@ d_statfs_f_flags='undef'
d_statfs_s='define'
d_statvfs='define'
d_stdio_cnt_lval='undef'
-d_stdio_ptr_lval='undef'
+d_stdio_ptr_lval='define'
d_stdio_ptr_lval_nochange_cnt='undef'
-d_stdio_ptr_lval_sets_cnt='undef'
+d_stdio_ptr_lval_sets_cnt='define'
d_stdio_stream_array='undef'
-d_stdiobase='undef'
-d_stdstdio='undef'
+d_stdiobase='define'
+d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
@@ -521,7 +521,7 @@ exe_ext=''
expr='expr'
extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared Errno'
extras=''
-fflushNULL='undef'
+fflushNULL='define'
fflushall='undef'
find=''
firstmakefile='makefile'
@@ -667,7 +667,7 @@ i_varargs='undef'
i_varhdr='stdarg.h'
i_vfork='undef'
ignore_versioned_solibs='y'
-inc_version_list=' '
+inc_version_list=''
inc_version_list_init='0'
incpath=''
inews=''
@@ -706,7 +706,7 @@ ivsize='4'
ivtype='long'
known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Thread Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attrs re threads threads/shared'
ksh=''
-ld='cc'
+ld='gcc'
lddlflags='-shared'
ldflags=''
ldflags_uselargefiles=''
@@ -716,9 +716,9 @@ lib_ext='.a'
libc='/lib/libc-2.5.so'
libperl='libperl.so'
libpth='/lib /usr/lib'
-libs='-lnsl -ldl -lm -lcrypt -lutil -lc'
+libs='-lresolv -lnsl -ldl -lm -lpthread -lcrypt -lutil -lc'
libsdirs=''
-libsfiles=''
+libsfiles=' libresolv.so libnsl.so libdl.so libm.so libpthread.so libcrypt.so libutil.so libc.so'
libsfound=''
libspath=' /lib /usr/lib'
libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD'
@@ -764,15 +764,15 @@ myarchname='powerpc-linux'
mydomain='.nonet'
myhostname='brokenslug'
myuname='linux brokenslug 2.6.12.6 #1 tue oct 24 01:06:22 pdt 2006 ppc unknown unknown gnulinux '
-n=''
-need_va_copy='define'
+n='-n'
+need_va_copy='undef'
netdb_hlen_type='size_t'
netdb_host_type='const void *'
netdb_name_type='const char *'
netdb_net_type='in_addr_t'
nm='nm'
nm_opt=''
-nm_so_opt=''
+nm_so_opt='--dynamic'
nonxs_ext='Errno'
nroff='nroff'
nvEUformat='"E"'
@@ -787,8 +787,8 @@ nvtype='double'
o_nonblock='O_NONBLOCK'
obj_ext='.o'
old_pthread_create_joinable=''
-optimize='-Os'
-orderlib='true'
+optimize='-O2'
+orderlib='false'
osname='linux'
osvers='2.6.12.6'
otherlibdirs=' '
@@ -801,7 +801,7 @@ perl5='hostperl'
perl=''
perl_patchlevel=''
perladmin='root@brokenslug.nonet'
-perllibs='-lnsl -ldl -lm -lcrypt -lutil -lc'
+perllibs='-lresolv -lnsl -ldl -lm -lpthread -lcrypt -lutil -lc'
perlpath='/usr/bin/perl'
pg='pg'
phostname='hostname'
@@ -958,7 +958,7 @@ use64bitint='undef'
usecrosscompile='undef'
usedl='define'
usefaststdio='define'
-useithreads='undef'
+useithreads='define'
uselargefiles='define'
uselongdouble='undef'
usemallocwrap='define'
@@ -971,10 +971,10 @@ useperlio='define'
useposix='true'
usereentrant='undef'
usesfio='false'
-useshrplib='false'
+useshrplib='true'
usesitecustomize='undef'
usesocks='undef'
-usethreads='undef'
+usethreads='define'
usevendorprefix='undef'
usevfork='false'
usrinc='/usr/include'
diff --git a/packages/perl/perl.inc b/packages/perl/perl.inc
index 4f42d78ded..f063d0e403 100644
--- a/packages/perl/perl.inc
+++ b/packages/perl/perl.inc
@@ -46,6 +46,14 @@ do_compile() {
if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then
OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
fi
+
+ # You must use gcc to link on powerpc also
+ OPTIONS=""
+ if test ${TARGET_ARCH} = "powerpc" ; then
+ OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc"
+ fi
+
+
oe_runmake perl $OPTIONS
}
diff --git a/packages/perl/perl_5.8.7.bb b/packages/perl/perl_5.8.7.bb
index b9a62e79c9..12aec88a02 100644
--- a/packages/perl/perl_5.8.7.bb
+++ b/packages/perl/perl_5.8.7.bb
@@ -21,10 +21,12 @@ SRC_URI_append_sh4 += "file://override-generate-sh.patch;patch=1"
SRC_URI_append_sh4 += "file://makefile-usegcc-to-link.patch;patch=1"
SRC_URI_append_sh3 += "file://override-generate-sh.patch;patch=1"
SRC_URI_append_sh3 += "file://makefile-usegcc-to-link.patch;patch=1"
+SRC_URI_append_powerpc += "file://override-generate-sh.patch;patch=1"
+SRC_URI_append_powerpc += "file://makefile-usegcc-to-link.patch;patch=1"
PARALLEL_MAKE = ""
-PR = "r21"
+PR = "r22"
do_configure() {
ln -sf ${HOSTPERL} ${STAGING_BINDIR_NATIVE}/hostperl