From: Jarkko Hietaniemi Date: Mon, 21 Apr 2003 16:24:36 +0000 (+0000) Subject: Add OpenZaurus cross-compilation patches. X-Git-Tag: accepted/trunk/20130322.191538~24358 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a809565f92f58eb2e23772b87ab5c4f45ee1dd0;p=platform%2Fupstream%2Fperl.git Add OpenZaurus cross-compilation patches. p4raw-id: //depot/perl@19297 --- diff --git a/Cross/Makefile b/Cross/Makefile new file mode 100644 index 0000000..f0db84e --- /dev/null +++ b/Cross/Makefile @@ -0,0 +1,63 @@ +## Toplevel Makefile for cross-compilation of perl +# +## $Id: Makefile,v 1.1 2003/04/15 00:38:39 red Exp red $ + +export TOPDIR?=${shell pwd} +include $(TOPDIR)/config +export CFLAGS +export SYS=$(ARCH)-$(OS) +export CROSS=$(ARCH)-$(OS)- +export FULL_OPTIMIZATION = -fexpensive-optimizations -fomit-frame-pointer -O2 +export OPTIMIZATION = -O2 + +export CC = $(CROSS)gcc +export CXX = $(CROSS)g++ +export LD = $(CROSS)ld +export STRIP = $(CROSS)strip +export AR = $(CROSS)ar +export RANLIB = $(CROSS)ranlib + + +## Optimisation work +ifeq ($(ARCH),arm) + ifdef CONFIG_TARGET_ARM_SA11X0 + ifndef Architecture + Architecture = armv4l-strongarm + endif + FULL_OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32 + OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32 + endif +endif + +CFLAGS+=$(FULL_OPTIMIZATION) + +all: + @echo Please read the README file before doing anything else. + +gen_patch: + diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch + diff -Bbur ../installperl installperl > installperl.patch + +patch: + cd .. ; patch -p1 < Cross/Makefile.SH.patch + cd .. ; patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched + cd .. ; sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl + +perl: + @echo Perl cross-build directory is $(TOPDIR) + @echo Target arch is $(SYS) + @echo toolchain: $(CC), $(CXX), $(LD), $(STRIP), $(AR), $(RANLIB) + @echo Optimizations: $(FULL_OPTIMIZATION) + + $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh + $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh-arse + cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more + cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm fake_config_library + cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig" + cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig" + cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig" + cd $(TOPDIR)/.. ; rm -rf install_me_here + cd $(TOPDIR)/.. ; make install-strip + cd $(TOPDIR)/.. ; sh -x Cross/warp + + diff --git a/Cross/Makefile.SH.patch b/Cross/Makefile.SH.patch new file mode 100644 index 0000000..beaf7a3 --- /dev/null +++ b/Cross/Makefile.SH.patch @@ -0,0 +1,164 @@ +--- ../Makefile.SH 2002-06-09 17:04:06.000000000 +0000 ++++ Makefile.SH 2003-04-15 00:30:58.000000000 +0000 +@@ -329,9 +329,20 @@ + .c.s: + $(CCCMDSRC) -S $*.c + +-all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext) extras.make +- @echo " "; +- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." ++#all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(public) $(dynamic_ext) $(nonxs_ext) extras.make ++# @echo " "; ++# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite." ++all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) ++ mv miniperl miniperl-arm ++ ln -s /usr/bin/perl miniperl ++ ++more: extra.pods $(private) $(public) ++ ++more2: $(dynamic_ext) ++ ++more3: $(nonxs_ext) ++ ++more4: extras.make + + .PHONY: all compile translators utilities + +@@ -341,10 +352,10 @@ + cd x2p; $(MAKE) compile; + cd pod; $(MAKE) compile; + +-translators: miniperl$(EXE_EXT) lib/Config.pm FORCE ++translators: lib/Config.pm FORCE + @echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all + +-utilities: miniperl$(EXE_EXT) lib/Config.pm $(plextract) lib/lib.pm FORCE ++utilities: lib/Config.pm $(plextract) lib/lib.pm FORCE + @echo " "; echo " Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all + + +@@ -521,7 +532,7 @@ + $(CC) -o miniperl $(CLDFLAGS) \ + `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \ + miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs) +- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest ++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest + !NO!SUBS! + ;; + beos*|next4*) +@@ -538,7 +549,7 @@ + -@rm -f miniperl.xok + $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \ + miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs) +- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest ++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest + !NO!SUBS! + ;; + esac +@@ -664,7 +675,7 @@ + # We need to autosplit in two steps because VOS can't handle so many args + # + .PHONY: preplibrary +-preplibrary: miniperl$(EXE_EXT) lib/Config.pm lib/lib.pm $(PREPLIBRARY_LIBPERL) ++preplibrary: lib/Config.pm lib/lib.pm $(PREPLIBRARY_LIBPERL) + @sh ./makedir lib/auto + @echo " AutoSplitting perl library" + $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \ +@@ -676,11 +687,11 @@ + # Take care to avoid modifying lib/Config.pm without reason + # (If trying to create a new port and having problems with the configpm script, + # try 'make minitest' and/or commenting out the tests at the end of configpm.) +-lib/Config.pm: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary ++lib/Config.pm: config.sh configpm Porting/Glossary + $(LDLIBPTH) ./miniperl -Ilib configpm configpm.tmp + sh mv-if-diff configpm.tmp $@ + +-lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl lib/Config.pm ++lib/ExtUtils/Miniperl.pm: miniperlmain.c minimod.pl lib/Config.pm + $(LDLIBPTH) ./miniperl minimod.pl > minimod.tmp + sh mv-if-diff minimod.tmp $@ + -touch lib/ExtUtils/Miniperl.pm +@@ -688,18 +699,18 @@ + lib/re.pm: ext/re/re.pm + cp ext/re/re.pm ext/re/re.tmp && sh mv-if-diff ext/re/re.tmp lib/re.pm + +-$(plextract): miniperl$(EXE_EXT) lib/Config.pm x2p/s2p ++$(plextract): lib/Config.pm x2p/s2p + @-rm -f $@ + $(LDLIBPTH) ./miniperl -Ilib $@.PL + +-x2p/s2p: miniperl$(EXE_EXT) lib/Config.pm x2p/s2p.PL ++x2p/s2p: lib/Config.pm x2p/s2p.PL + cd x2p; $(LDLIBPTH) $(MAKE) s2p + +-lib/lib.pm: miniperl$(EXE_EXT) lib/Config.pm ++lib/lib.pm: lib/Config.pm + @-rm -f $@ + $(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL + +-extra.pods: miniperl$(EXE_EXT) ++extra.pods: + -@test -f extra.pods && rm -f `cat extra.pods` + -@rm -f extra.pods + -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \ +@@ -738,18 +749,10 @@ + $(MAKE) install.perl install.man STRIPFLAGS=$(STRIPFLAGS) INSTALLFLAGS=-n + + install.perl: all installperl +- if [ -n "$(COMPILE)" ]; \ +- then \ +- cd utils; $(MAKE) compile; \ +- cd ../x2p; $(MAKE) compile; \ +- cd ../pod; $(MAKE) compile; \ +- else :; \ +- fi +- $(LDLIBPTH) ./perl installperl $(INSTALLFLAGS) $(STRIPFLAGS) +- $(MAKE) extras.install ++ /usr/bin/perl -Ifake_config_library -MConfig installperl $(INSTALLFLAGS) $(STRIPFLAGS) + +-install.man: all installman +- $(LDLIBPTH) ./perl installman $(INSTALLFLAGS) ++install.man: installman ++ /usr/bin/perl -Ifake_config_library -MConfig installman $(INSTALLFLAGS) + + # XXX Experimental. Hardwired values, but useful for testing. + # Eventually Configure could ask for some of these values. +@@ -861,16 +864,16 @@ + # + # DynaLoader may be needed for extensions that use Makefile.PL. + +-$(DYNALOADER): miniperl$(EXE_EXT) preplibrary FORCE ++$(DYNALOADER): preplibrary FORCE + @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + +-d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE ++d_dummy $(dynamic_ext): preplibrary $(DYNALOADER) FORCE + @$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + +-s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE ++s_dummy $(static_ext): preplibrary $(DYNALOADER) FORCE + @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + +-n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE ++n_dummy $(nonxs_ext): preplibrary $(DYNALOADER) FORCE + @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + + .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \ +@@ -1009,7 +1012,7 @@ + + test_prep_pre: preplibrary utilities $(nonxs_ext) + +-test_prep: test_prep_pre miniperl$(EXE_EXT) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL) ++test_prep: test_prep_pre perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL) + PERL=./perl $(MAKE) _test_prep + + _test_tty: +@@ -1078,7 +1081,7 @@ + + # Can't depend on lib/Config.pm because that might be where miniperl + # is crashing. +-minitest: miniperl$(EXE_EXT) lib/re.pm ++minitest: lib/re.pm + -@test -f lib/lib.pm && test -f lib/Config.pm || \ + $(MAKE) lib/Config.pm lib/lib.pm + @echo " " diff --git a/Cross/README b/Cross/README index 31b39f8..6244483 100644 --- a/Cross/README +++ b/Cross/README @@ -1,4 +1,53 @@ -If Perl is built using a cross-compilation environment the Cross -directory will contain temporary helper scripts for the duration -of the build, see INSTALL/Cross-compilation for more information. +Summary +------- +This is a patch set which adds cross-compilation to the perl +buildsystem. It was built as a part of the Open Zaurus +(http://www.openzaurus.com/) distribution. Most / All of the +optimisations are "borrowed" from this excellent project. + +The main target is arm-linux but I have also managed to +successfully cross-compile perl for solaris x86 using the same +buildsystem. + +We are currently dependent on an existing working local copy of +perl which is available as /usr/bin/perl. This could be migrated +to using native miniperl with some additional effort. + +Obviously you need a working and tested cross-compiler for your +build and target combination. The binary directory must be in +your path. + +1) You should be reading me (README) in perl-5.x.x/Cross + +2) Make sure you are in the Cross directory. + +3) Edit the file 'config' to contain your target platform information. + +4) make patch ## This will patch the existing source-tree. +5) make perl ## Will make perl + +The Obvious Ommissions +---------------------- + +This does NOT perform any installation as site installation method will +be dependant on the target arch and OS. + +make test will NOT work as the binaries and libraries will not execute. + +Due to space limitations on the Zaurus (it's a PDA) we do not provide +documentation in the core - Therefore man pages are not even generated. + + Note that the Cross/ directory is also used by a different + cross-compilation setup described in the INSTALL file, and + executed by Configure. There should be no conflicts since + it is unlikely both that cross-compilation setups are used + simultaneously. + +Enjoy! + +References +------- +Redvers Davies +Open Zaurus http://www.openzaurus.org/ +Perl OZ Packages http://www.openzaurus.org/official/testing/feed/ diff --git a/Cross/TODO b/Cross/TODO new file mode 100644 index 0000000..c7280d0 --- /dev/null +++ b/Cross/TODO @@ -0,0 +1,2 @@ +Install man pages. +Provide a better sandbox for building additional XS libraries. diff --git a/Cross/config b/Cross/config new file mode 100644 index 0000000..7f40e35 --- /dev/null +++ b/Cross/config @@ -0,0 +1,23 @@ +############################################################################## +# +# This is the configuration file used to specify the target platform and +# required level of debug or optimisation. +# +############################################################################## + +### Target Arch +ARCH = arm +#ARCH = i386-pc +#ARCH = sh4 +#ARCH = mips +#ARCH = mipsel +#ARCH = ppc + +## Specific arm +CONFIG_TARGET_ARM_SA11X0 = 1 +#CONFIG_TARGET_ARM_XSCALE = 1 + +### Target OS +OS = linux +#OS = solaris2.8 + diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux new file mode 100644 index 0000000..617be5b --- /dev/null +++ b/Cross/config.sh-arm-linux @@ -0,0 +1,983 @@ +#!/bin/sh +# +# This file was produced by running the Configure script. It holds all the +# definitions figured out by Configure. Should you modify one of these values, +# do not forget to propagate your changes by running "Configure -der". You may +# instead choose to run each of the .SH files by yourself, or "Configure -S". +# +# $Id$ +# + +# Package name : perl5 +# Source directory : . +# Configuration time: Sat Mar 8 00:20:33 UTC 2003 +# Configured by : root +# Target system : linux zaurus 2.4.6-rmk1-np2-embedix #5 wed dec 11 22:20:32 cst 2002 armv4l unknown + +Author='Redvers Davies ' +Date='$Date' +Header='' +Id='$Id' +Locker='' +Log='$Log' +Mcc='Mcc' +RCSfile='$RCSfile' +Revision='$Revision' +Source='' +State='' +_a='.a' +_exe='' +_o='.o' +afs='false' +afsroot='/afs' +alignbytes='4' +ansi2knr='' +aphostname='/bin/hostname' +api_revision='5' +api_subversion='0' +api_version='8' +api_versionstring='5.8.0' +ar='arm-linux-ar' +archlib='/usr/lib/perl5/5.8.0/armv4l-linux' +archlibexp='/usr/lib/perl5/5.8.0/armv4l-linux' +archname64='' +archname='armv4l-linux' +archobjs='' +asctime_r_proto='0' +awk='awk' +baserev='5.0' +bash='' +bin='/usr/bin' +binexp='/usr/bin' +bison='bison' +byacc='byacc' +byteorder='1234' +c='' +castflags='0' +cat='cat' +cc='arm-linux-gcc' +cccdlflags='' +ccdlflags='' +ccflags='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' +ccname='arm-linux-gcc' +ccsymbols='__APCS_32__=1 __ARM_ARCH_4__=1 __CHAR_UNSIGNED__=1 __GNUC_MINOR__=95 __arm=1 __arm__=1 __arm_elf=1 __arm_elf__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 arm=1 arm_elf=1 cpu=arm machine=arm system=posix system=unix' +ccversion='' +cf_by='root' +cf_email='red@criticalintegration.com' +cf_time='Sat Mar 8 00:20:33 UTC 2003' +charsize='1' +chgrp='' +chmod='chmod' +chown='' +clocktype='clock_t' +comm='comm' +compress='' +contains='grep' +cp='cp' +cpio='' +cpp='arm-linux-cpp' +cpp_stuff='42' +cppccsymbols='__ELF__=1 __GNUC__=2 linux=1 unix=1' +cppflags='-fno-strict-aliasing' +cpplast='-' +cppminus='-' +cpprun='arm-linux-gcc -E' +cppstdin='arm-linux-gcc -E' +cppsymbols='_FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC_MINOR__=95 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506 _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' +ctermid_r_proto='0' +ctime_r_proto='0' +d_Gconvert='gcvt((x),(n),(b))' +d_PRIEUldbl='define' +d_PRIFUldbl='define' +d_PRIGUldbl='define' +d_PRIXU64='define' +d_PRId64='define' +d_PRIeldbl='define' +d_PRIfldbl='define' +d_PRIgldbl='define' +d_PRIi64='define' +d_PRIo64='define' +d_PRIu64='define' +d_PRIx64='define' +d_SCNfldbl='define' +d__fwalk='undef' +d_access='define' +d_accessx='undef' +d_alarm='define' +d_archlib='define' +d_asctime_r='undef' +d_atolf='undef' +d_atoll='define' +d_attribut='define' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_bzero='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='define' +d_chsize='undef' +d_class='undef' +d_closedir='define' +d_cmsghdr_s='define' +d_const='define' +d_crypt='undef' +d_crypt_r='undef' +d_csh='undef' +d_ctermid_r='undef' +d_ctime_r='undef' +d_cuserid='define' +d_dbl_dig='define' +d_dbminitproto='undef' +d_difftime='define' +d_dirfd='define' +d_dirnamlen='undef' +d_dlerror='undef' +d_dlopen='undef' +d_dlsymun='undef' +d_dosuid='undef' +d_drand48_r='undef' +d_drand48proto='define' +d_dup2='define' +d_eaccess='undef' +d_endgrent='define' +d_endgrent_r='undef' +d_endhent='define' +d_endhostent_r='undef' +d_endnent='define' +d_endnetent_r='undef' +d_endpent='define' +d_endprotoent_r='undef' +d_endpwent='define' +d_endpwent_r='undef' +d_endsent='define' +d_endservent_r='undef' +d_eofnblk='define' +d_eunice='undef' +d_fchdir='define' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fcntl_can_lock='undef' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='undef' +d_fgetpos='define' +d_finite='define' +d_finitel='define' +d_flexfnam='define' +d_flock='define' +d_flockproto='define' +d_fork='define' +d_fp_class='undef' +d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' +d_fpos64_t='undef' +d_frexpl='define' +d_fs_data_s='undef' +d_fseeko='define' +d_fsetpos='define' +d_fstatfs='define' +d_fstatvfs='define' +d_fsync='define' +d_ftello='define' +d_ftime='undef' +d_getcwd='define' +d_getespwnam='undef' +d_getfsstat='undef' +d_getgrent='define' +d_getgrent_r='undef' +d_getgrgid_r='undef' +d_getgrnam_r='undef' +d_getgrps='define' +d_gethbyaddr='define' +d_gethbyname='define' +d_gethent='define' +d_gethname='define' +d_gethostbyaddr_r='undef' +d_gethostbyname_r='undef' +d_gethostent_r='undef' +d_gethostprotos='define' +d_getitimer='define' +d_getlogin='define' +d_getlogin_r='undef' +d_getmnt='undef' +d_getmntent='define' +d_getnbyaddr='define' +d_getnbyname='define' +d_getnent='define' +d_getnetbyaddr_r='undef' +d_getnetbyname_r='undef' +d_getnetent_r='undef' +d_getnetprotos='define' +d_getpagsz='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getpent='define' +d_getpgid='define' +d_getpgrp2='undef' +d_getpgrp='define' +d_getppid='define' +d_getprior='define' +d_getprotobyname_r='undef' +d_getprotobynumber_r='undef' +d_getprotoent_r='undef' +d_getprotoprotos='define' +d_getprpwnam='undef' +d_getpwent='define' +d_getpwent_r='undef' +d_getpwnam_r='undef' +d_getpwuid_r='undef' +d_getsbyname='define' +d_getsbyport='define' +d_getsent='define' +d_getservbyname_r='undef' +d_getservbyport_r='undef' +d_getservent_r='undef' +d_getservprotos='define' +d_getspnam='define' +d_getspnam_r='undef' +d_gettimeod='define' +d_gmtime_r='undef' +d_gnulibc='define' +d_grpasswd='define' +d_hasmntopt='define' +d_htonl='define' +d_index='undef' +d_inetaton='define' +d_int64_t='define' +d_isascii='define' +d_isfinite='undef' +d_isinf='define' +d_isnan='define' +d_isnanl='define' +d_killpg='define' +d_lchown='define' +d_ldbl_dig='define' +d_link='define' +d_localtime_r='undef' +d_locconv='define' +d_lockf='define' +d_longdbl='define' +d_longlong='define' +d_lseekproto='define' +d_lstat='define' +d_madvise='define' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkdtemp='define' +d_mkfifo='define' +d_mkstemp='define' +d_mkstemps='undef' +d_mktime='define' +d_mmap='define' +d_modfl='undef' +d_modfl_pow32_bug='undef' +d_mprotect='define' +d_msg='define' +d_msg_ctrunc='define' +d_msg_dontroute='define' +d_msg_oob='define' +d_msg_peek='define' +d_msg_proxy='define' +d_msgctl='define' +d_msgget='define' +d_msghdr_s='define' +d_msgrcv='define' +d_msgsnd='define' +d_msync='define' +d_munmap='define' +d_mymalloc='undef' +d_nice='define' +d_nl_langinfo='define' +d_nv_preserves_uv='define' +d_off64_t='undef' +d_old_pthread_create_joinable='undef' +d_oldpthreads='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_perl_otherlibdirs='undef' +d_phostname='undef' +d_pipe='define' +d_poll='define' +d_portable='define' +d_procselfexe='undef' +d_pthread_atfork='undef' +d_pthread_yield='undef' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwgecos='define' +d_pwpasswd='define' +d_pwquota='undef' +d_qgcvt='define' +d_quad='define' +d_random_r='undef' +d_readdir64_r='undef' +d_readdir='define' +d_readdir_r='undef' +d_readlink='define' +d_readv='define' +d_recvmsg='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='undef' +d_safemcpy='undef' +d_sanemcmp='define' +d_sbrkproto='define' +d_sched_yield='define' +d_scm_rights='define' +d_seekdir='define' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semctl_semun='define' +d_semget='define' +d_semop='define' +d_sendmsg='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='define' +d_setgrent_r='undef' +d_setgrps='define' +d_sethent='define' +d_sethostent_r='undef' +d_setitimer='define' +d_setlinebuf='define' +d_setlocale='define' +d_setlocale_r='undef' +d_setnent='define' +d_setnetent_r='undef' +d_setpent='define' +d_setpgid='define' +d_setpgrp2='undef' +d_setpgrp='define' +d_setprior='define' +d_setproctitle='undef' +d_setprotoent_r='undef' +d_setpwent='define' +d_setpwent_r='undef' +d_setregid='define' +d_setresgid='define' +d_setresuid='define' +d_setreuid='define' +d_setrgid='undef' +d_setruid='undef' +d_setsent='define' +d_setservent_r='undef' +d_setsid='define' +d_setvbuf='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_sigprocmask='define' +d_sigsetjmp='define' +d_sockatmark='undef' +d_sockatmarkproto='undef' +d_socket='define' +d_socklen_t='define' +d_sockpair='define' +d_socks5_init='undef' +d_sqrtl='undef' +d_srand48_r='undef' +d_srandom_r='undef' +d_sresgproto='undef' +d_sresuproto='undef' +d_statblks='define' +d_statfs_f_flags='undef' +d_statfs_s='define' +d_statvfs='define' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='define' +d_stdio_ptr_lval_nochange_cnt='undef' +d_stdio_ptr_lval_sets_cnt='define' +d_stdio_stream_array='undef' +d_stdiobase='define' +d_stdstdio='define' +d_strchr='define' +d_strcoll='define' +d_strctcpy='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strerror_r='undef' +d_strftime='define' +d_strtod='define' +d_strtol='define' +d_strtold='define' +d_strtoll='define' +d_strtoq='define' +d_strtoul='define' +d_strtoull='define' +d_strtouq='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='define' +d_syscallproto='define' +d_sysconf='define' +d_sysernlst='' +d_syserrlst='define' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='define' +d_telldirproto='define' +d_time='define' +d_times='define' +d_tm_tm_gmtoff='define' +d_tm_tm_zone='define' +d_tmpnam_r='undef' +d_truncate='define' +d_ttyname_r='undef' +d_tzname='define' +d_u32align='define' +d_ualarm='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_unordered='undef' +d_usleep='define' +d_usleepproto='define' +d_ustat='define' +d_vendorarch='undef' +d_vendorbin='undef' +d_vendorlib='undef' +d_vfork='undef' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty='' +d_volatile='define' +d_vprintf='define' +d_wait4='define' +d_waitpid='define' +d_wcstombs='define' +d_wctomb='define' +d_writev='define' +d_xenix='undef' +date='date' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +db_version_major='' +db_version_minor='' +db_version_patch='' +defvoidused='15' +direntrytype='struct dirent' +dlext='so' +dlsrc='dl_dlopen.xs' +doublesize='8' +drand01='drand48()' +drand48_r_proto='0' +dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob 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 attrs re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode Errno Filter/Util/Call' +eagain='EAGAIN' +ebcdic='undef' +echo='echo' +egrep='egrep' +emacs='' +endgrent_r_proto='0' +endhostent_r_proto='0' +endnetent_r_proto='0' +endprotoent_r_proto='0' +endpwent_r_proto='0' +endservent_r_proto='0' +eunicefix=':' +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 attrs re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode Errno' +extras='' +fflushNULL='define' +fflushall='undef' +find='' +firstmakefile='makefile' +flex='' +fpossize='16' +fpostype='fpos_t' +freetype='void' +from=':' +full_ar='/usr/local/arm/2.95.3/bin/arm-linux-ar' +full_csh='csh' +full_sed='/bin/sed' +gccosandvers='' +gccversion='2.95.1 19990816 (release)' +getgrent_r_proto='0' +getgrgid_r_proto='0' +getgrnam_r_proto='0' +gethostbyaddr_r_proto='0' +gethostbyname_r_proto='0' +gethostent_r_proto='0' +getlogin_r_proto='0' +getnetbyaddr_r_proto='0' +getnetbyname_r_proto='0' +getnetent_r_proto='0' +getprotobyname_r_proto='0' +getprotobynumber_r_proto='0' +getprotoent_r_proto='0' +getpwent_r_proto='0' +getpwnam_r_proto='0' +getpwuid_r_proto='0' +getservbyname_r_proto='0' +getservbyport_r_proto='0' +getservent_r_proto='0' +getspnam_r_proto='0' +gidformat='"lu"' +gidsign='1' +gidsize='4' +gidtype='gid_t' +glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' +gmake='gmake' +gmtime_r_proto='0' +gnulibc_version='2.2.4' +grep='grep' +groupcat='cat /etc/group' +groupstype='gid_t' +gzip='gzip' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +hostcat='cat /etc/hosts' +i16size='2' +i16type='short' +i32size='4' +i32type='long' +i64size='8' +i64type='long long' +i8size='1' +i8type='char' +i_arpainet='define' +i_bsdioctl='' +i_crypt='define' +i_db='undef' +i_dbm='undef' +i_dirent='define' +i_dld='undef' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_fp='undef' +i_fp_class='undef' +i_gdbm='undef' +i_grp='define' +i_ieeefp='undef' +i_inttypes='define' +i_langinfo='define' +i_libutil='undef' +i_limits='define' +i_locale='define' +i_machcthr='undef' +i_malloc='define' +i_math='define' +i_memory='undef' +i_mntent='define' +i_ndbm='undef' +i_netdb='define' +i_neterrno='undef' +i_netinettcp='define' +i_niin='define' +i_poll='define' +i_prot='undef' +i_pthread='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_shadow='define' +i_socks='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sunmath='undef' +i_sysaccess='undef' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_syslog='define' +i_sysmman='define' +i_sysmode='undef' +i_sysmount='define' +i_sysndir='undef' +i_sysparam='define' +i_sysresrc='define' +i_syssecrt='undef' +i_sysselct='define' +i_syssockio='undef' +i_sysstat='define' +i_sysstatfs='define' +i_sysstatvfs='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysuio='define' +i_sysun='define' +i_sysutsname='define' +i_sysvfs='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='define' +i_unistd='define' +i_ustat='define' +i_utime='define' +i_values='define' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ignore_versioned_solibs='y' +inc_version_list=' ' +inc_version_list_init='0' +incpath='' +inews='' +installarchlib='./install_me_here/usr/lib/perl5/5.8.0/armv4l-linux' +installbin='./install_me_here/usr/bin' +installman1dir='' +installman3dir='' +installprefix='./install_me_here/usr/lib/perl5' +installprefixexp='./install_me_here/usr/lib/perl5' +installprivlib='./install_me_here/usr/lib/perl5/5.8.0' +installscript='./install_me_here/usr/bin' +installsitearch='./install_me_here/usr/lib/perl5/site_perl/5.8.0/armv4l-linux' +installsitebin='./install_me_here/usr/bin' +installsitelib='./install_me_here/usr/lib/perl5/site_perl/5.8.0' +installstyle='lib/perl5' +installusrbinperl='undef' +installvendorarch='' +installvendorbin='' +installvendorlib='' +intsize='4' +issymlink='/usr/bin/test -h' +ivdformat='"ld"' +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='arm-linux-ld' +lddlflags=' -shared ' +ldflags='' +ldflags_uselargefiles='' +ldlibpthname='LD_LIBRARY_PATH' +less='less' +lib_ext='.a' +libc='/lib/libc-2.2.4.so' +libperl='libperl.so' +libpth='/lib /usr/lib' +libs='-lc -lm -ldl' +libsdirs=' /lib' +libsfiles=' libc.so' +libsfound=' /lib/libc.so' +libspath=' /lib /usr/lib' +libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt sec ucb BSD PW x util' +libswanted_uselargefiles='' +line='' +lint='' +lkflags='' +ln='ln' +lns='/bin/ln -s' +localtime_r_proto='0' +locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include' +loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib' +longdblsize='8' +longlongsize='8' +longsize='4' +lp='' +lpr='' +ls='ls' +lseeksize='8' +lseektype='off_t' +mail='' +mailx='' +make='make' +make_set_make='#' +mallocobj='' +mallocsrc='' +malloctype='void *' +man1dir=' ' +man1direxp='' +man1ext='0' +man3dir=' ' +man3direxp='' +man3ext='0' +mips_type='' +mkdir='mkdir' +mmaptype='void *' +modetype='mode_t' +more='more' +multiarch='undef' +mv='' +myarchname='armv4l-linux' +mydomain='.criticalintegration.com' +myhostname='citalopram' +myuname='linux zaurus 2.4.6-rmk1-np2-embedix #5 wed dec 11 22:20:32 cst 2002 armv4l unknown ' +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='' +nonxs_ext='Errno' +nroff='nroff' +nvEUformat='"E"' +nvFUformat='"F"' +nvGUformat='"G"' +nv_preserves_uv_bits='32' +nveformat='"e"' +nvfformat='"f"' +nvgformat='"g"' +nvsize='8' +nvtype='double' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +old_pthread_create_joinable='' +optimize='-O2' +orderlib='false' +osname='linux' +osvers='2.4.6-rmk1-np2-embedix' +otherlibdirs=' ' +package='perl5' +pager='/usr/bin/less' +passcat='cat /etc/passwd' +patchlevel='8' +path_sep=':' +perl5='' +perl='' +perl_patchlevel='' +perladmin='red@criticalintegration.com' +perllibs='-lc -lm -ldl' +perlpath='/usr/bin/perl' +pg='pg' +phostname='hostname' +pidtype='pid_t' +plibpth='' +pm_apiversion='5.005' +pmake='' +pr='' +prefix='/usr' +prefixexp='/usr' +privlib='/usr/lib/perl5/5.8.0' +privlibexp='/usr/lib/perl5/5.8.0' +procselfexe='' +prototype='define' +ptrsize='4' +quadkind='3' +quadtype='long long' +randbits='48' +randfunc='drand48' +random_r_proto='0' +randseedtype='long' +ranlib='/usr/bin/ranlib' +rd_nodata='-1' +readdir64_r_proto='0' +readdir_r_proto='0' +revision='5' +rm='rm' +rmail='' +run='' +runnm='false' +sPRIEUldbl='"E"' +sPRIFUldbl='"F"' +sPRIGUldbl='"G"' +sPRIXU64='"LX"' +sPRId64='"Ld"' +sPRIeldbl='"e"' +sPRIfldbl='"f"' +sPRIgldbl='"g"' +sPRIi64='"Li"' +sPRIo64='"Lo"' +sPRIu64='"Lu"' +sPRIx64='"Lx"' +sSCNfldbl='"f"' +sched_yield='sched_yield()' +scriptdir='/usr/bin' +scriptdirexp='/usr/bin' +sed='sed' +seedfunc='srand48' +selectminbits='32' +selecttype='fd_set *' +sendmail='' +setgrent_r_proto='0' +sethostent_r_proto='0' +setlocale_r_proto='0' +setnetent_r_proto='0' +setprotoent_r_proto='0' +setpwent_r_proto='0' +setservent_r_proto='0' +sh='/bin/sh' +shar='' +sharpbang='#!' +shmattype='void *' +shortsize='2' +shrpenv='' +shsharp='true' +sig_count='1' +sig_name='ZERO ' +sig_name_init='"ZERO", 0' +sig_num='0 ' +sig_num_init='0, 0' +sig_size='1' +signal_t='void' +sitearch='/usr/lib/perl5/site_perl/5.8.0/armv4l-linux' +sitearchexp='/usr/lib/perl5/site_perl/5.8.0/armv4l-linux' +sitebin='/usr/bin' +sitebinexp='/usr/bin' +sitelib='/usr/lib/perl5/site_perl/5.8.0' +sitelib_stem='/usr/lib/perl5/site_perl' +sitelibexp='/usr/lib/perl5/site_perl/5.8.0' +siteprefix='/usr/lib/perl5.8.0' +siteprefixexp='/usr' +sizesize='4' +sizetype='size_t' +sleep='' +smail='' +so='so' +sockethdr='' +socketlib='' +socksizetype='socklen_t' +sort='sort' +spackage='Perl5' +spitshell='cat' +srand48_r_proto='0' +srandom_r_proto='0' +src='.' +ssizetype='ssize_t' +startperl='#!/usr/bin/perl' +startsh='#!/bin/sh' +static_ext=' ' +stdchar='char' +stdio_base='((fp)->_IO_read_base)' +stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)' +stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)' +stdio_filbuf='' +stdio_ptr='((fp)->_IO_read_ptr)' +stdio_stream_array='' +strerror_r_proto='0' +strings='/usr/include/string.h' +submit='' +subversion='0' +sysman='/usr/man/man1' +tail='' +tar='' +targetarch='' +tbl='' +tee='' +test='test' +timeincl='/usr/include/sys/time.h /usr/include/time.h ' +timetype='time_t' +tmpnam_r_proto='0' +to=':' +touch='touch' +tr='tr' +trnl='\n' +troff='' +ttyname_r_proto='0' +u16size='2' +u16type='unsigned short' +u32size='4' +u32type='unsigned long' +u64size='8' +u64type='unsigned long long' +u8size='1' +u8type='unsigned char' +uidformat='"lu"' +uidsign='1' +uidsize='4' +uidtype='uid_t' +uname='uname' +uniq='uniq' +uquadtype='unsigned long long' +use5005threads='undef' +use64bitall='undef' +use64bitint='undef' +usecrosscompile='undef' +usedl='undef' +useithreads='undef' +uselargefiles='define' +uselongdouble='undef' +usemorebits='undef' +usemultiplicity='undef' +usemymalloc='n' +usenm='false' +useopcode='true' +useperlio='define' +useposix='true' +usereentrant='undef' +usesfio='false' +useshrplib='true' +usesocks='undef' +usethreads='undef' +usevendorprefix='undef' +usevfork='false' +usrinc='/usr/include' +uuname='' +uvXUformat='"lX"' +uvoformat='"lo"' +uvsize='4' +uvtype='unsigned long' +uvuformat='"lu"' +uvxformat='"lx"' +vendorarch='' +vendorarchexp='' +vendorbin='' +vendorbinexp='' +vendorlib='' +vendorlib_stem='' +vendorlibexp='' +vendorprefix='' +vendorprefixexp='' +version='5.8.0' +version_patchlevel_string='version 8 subversion 0' +versiononly='undef' +vi='' +voidflags='15' +xlibpth='/usr/lib/386 /lib/386' +xs_apiversion='5.8.0' +yacc='yacc' +yaccflags='' +zcat='' +zip='zip' +# Configure command line arguments. +config_arg0='./Configure' +config_args='-Dprefix=/usr/local/perl5.8.0 -Uinstallusrbinperl -des' +config_argc=3 +config_arg1='-Dprefix=/usr/local/perl5.8.0' +config_arg2='-Uinstallusrbinperl' +config_arg3='-des' +PERL_REVISION=5 +PERL_VERSION=8 +PERL_SUBVERSION=0 +PERL_API_REVISION=5 +PERL_API_VERSION=8 +PERL_API_SUBVERSION=0 +PERL_PATCHLEVEL= +PERL_CONFIG_SH=true diff --git a/Cross/generate_config_sh b/Cross/generate_config_sh new file mode 100755 index 0000000..4461b8c --- /dev/null +++ b/Cross/generate_config_sh @@ -0,0 +1,131 @@ +#!/usr/bin/perl + +############################################################################## +# +# Ok, so there is this buildsystem that has variables set in shell +# like this: +# +# cc='gcc' +# +# This means we can go +# +# if test "${CC+set}" != set; then +# ar='arm-linux-ar' +# else +# ar=${AR} +# fi +# +# Right??? WRONG! +# +# Damn perl installation *PARSES* and *PATTERN MATCHES* this file. +# +############################################################################## + +my $config = shift; + +my $sys = $ENV{SYS}; + +my $callbacks = {}; +$callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]]; +$callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]]; +$callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; +$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; +$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; +$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; +$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; +$callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; +$callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]]; +$callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]]; +$callbacks->{'cpprun'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]]; +$callbacks->{'cppstdin'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]]; +$callbacks->{'full_ar'} = [\&backtick, ["AR", "which $ENV{AR}", "/usr/local/arm/2.95.3/bin/arm-linux-ar"]]; +$callbacks->{'ld'} = [\&simple_process, ["LD", "arm-linux-ld"]]; +$callbacks->{'ldflags'} = [\&simple_process, ["LDFLAGS", ""]]; +$callbacks->{'ldflags_uselargefiles'} = [\&simple_process, ["LDFLAGS", ""]]; +$callbacks->{'myarchname'} = [\&simple_process, ["SYS", "armv4l-linux"]]; +$callbacks->{'archlib'} = [\&library_munge, ["SYS", "armv4l-linux"]]; +$callbacks->{'archlibexp'} = [\&library_munge, ["SYS", "armv4l-linux"]]; +$callbacks->{'installarchlib'} = [\&library_munge, ["SYS", "armv4l-linux"]]; +$callbacks->{'installsitearch'} = [\&library_munge, ["SYS", "armv4l-linux"]]; +$callbacks->{'sitearch'} = [\&library_munge, ["SYS", "armv4l-linux"]]; +$callbacks->{'sitearchexp'} = [\&library_munge, ["SYS", "armv4l-linux"]]; + +if ($config eq "") { + die("Please run me as generate_config_sh path/to/original/config.sh"); +} + +open(FILE, "$config") || die("Unable to open $config"); + +my $line_in; +while ($line_in = ) { + if ($line_in =~ /^#/) { + next; + } + + if ($line_in !~ /./) { + next; + } + + $line_in =~ /^([^=]+)=(.*)/; + my $key = $1; + my $value = $2; + if (ref($callbacks->{$key}) eq "ARRAY") { + ($callbacks->{$key}[0])->($key,$value); + } else { + print($line_in); + } +} + +sub backtick { + my $key = shift; + my $value = shift; + my $envvar = $callbacks->{$key}->[1][0]; + + if ($ENV{$envvar}) { + my $rawtext = `$callbacks->{$key}->[1][1]`; + chomp($rawtext); + print("$key=\'$rawtext\'\n"); + } else { + print("$key=\'$callbacks->{$key}->[1][2]\'\n"); + } +} + + +sub simple_process { + my $key = shift; + my $envvar = $callbacks->{$key}->[1][0]; + + if ($ENV{$envvar}) { + print("$key=\"$ENV{$envvar}\"\n"); + } else { + print("$key=\'$callbacks->{$key}->[1][1]\'\n"); + } + +} + +sub simple_process_append { + my $key = shift; + my $envvar = $callbacks->{$key}->[1][0]; + + if ($ENV{$envvar}) { + print("$key=\"$ENV{$envvar} $callbacks->{$key}->[1][2]\"\n"); + } else { + print("$key=\'$callbacks->{$key}->[1][1]\'\n"); + } + +} + +sub library_munge { + my $key = shift; + my $value = shift; + my $envvar = $callbacks->{$key}->[1][0]; + + if ($ENV{$envvar}) { + $value =~ s/$callbacks->{$key}->[1][1]/$ENV{$envvar}/g; + print("$key=$value\n"); + } else { + print("$key=$value\n"); + } + +} + diff --git a/Cross/installperl.patch b/Cross/installperl.patch new file mode 100644 index 0000000..33ad2d4 --- /dev/null +++ b/Cross/installperl.patch @@ -0,0 +1,22 @@ +--- ../installperl 2002-07-16 18:57:32.000000000 +0000 ++++ installperl 2003-04-15 01:55:54.000000000 +0000 +@@ -3,8 +3,8 @@ + BEGIN { + require 5.004; + chdir '..' if !-d 'lib' and -d '..\lib'; +- @INC = 'lib'; +- $ENV{PERL5LIB} = 'lib'; ++# @INC = 'lib'; ++# $ENV{PERL5LIB} = 'lib'; + } + + use strict; +@@ -876,7 +876,7 @@ + print " " if (@opts); + print "$file\n"; + } +- system("strip", @opts, $file); ++ system("XXSTRIPXX-strip", @opts, $file); + } else { + print "# file '$file' skipped\n" if $verbose; + } diff --git a/Cross/warp b/Cross/warp new file mode 100755 index 0000000..69cffee --- /dev/null +++ b/Cross/warp @@ -0,0 +1,14 @@ +#!/bin/sh -x + +## This script contains an rm -rf. This may alarm you. +## These directories need to be reccursively deleted. +## I don't see any method of making "Bad Things"[tm] +## Happen. But we don't run buildroot as root do we? :-) + +for f in `find lib -name install_me_here`;do +cp -r $f/* ./install_me_here/ +done + +for f in `find lib -name install_me_here`;do +rm -rf $f +done diff --git a/INSTALL b/INSTALL index 76eeb5f..c5545b7 100644 --- a/INSTALL +++ b/INSTALL @@ -1772,14 +1772,17 @@ line invocation (detailed shortly) is required to access the functionality. NOTE: Perl is routinely built using cross-compilation - in the EPOC environment but the solutions from there - can't directly be used elsewhere. - -The one environment where cross-compilation has successfully been used -as of this writing is the Compaq iPAQ running ARM Linux. The build -host was Intel Linux, the networking setup was PPP + SSH. The exact -setup details are beyond the scope of this document, see -http://www.handhelds.org/ for more information. + in the EPOC environment, in the WinCE, and in the OpenZaurus + project, but all those use something slightly different setup + than what described here. For the WinCE setup, read the + wince/README.compile. For the OpenZaurus setup, read the + Cross/README. + +The one environment where this cross-compilation setup has +successfully been used as of this writing is the Compaq iPAQ running +ARM Linux. The build host was Intel Linux, the networking setup was +PPP + SSH. The exact setup details are beyond the scope of this +document, see http://www.handhelds.org/ for more information. To run Configure in cross-compilation mode the basic switch is C<-Dusecrosscompile>. diff --git a/MANIFEST b/MANIFEST index eab6664..2a3895c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -26,7 +26,15 @@ configure.gnu Crude emulation of GNU configure config_h.SH Produces config.h cop.h Control operator header Copying The GNU General Public License +Cross/Makefile Cross-compilation +Cross/Makefile.SH.patch Cross-compilation Cross/README Cross-compilation +Cross/TODO Cross-compilation +Cross/config Cross-compilation +Cross/config.sh-arm-linux Cross-compilation +Cross/generate_config_sh Cross-compilation +Cross/installperl.patch Cross-compilation +Cross/warp Cross-compilation cv.h Code value header cygwin/cygwin.c Additional code for Cygwin port cygwin/ld2.in ld wrapper template for Cygwin port