summaryrefslogtreecommitdiff
path: root/data/perl/perl-cross.diff
diff options
context:
space:
mode:
Diffstat (limited to 'data/perl/perl-cross.diff')
-rw-r--r--data/perl/perl-cross.diff324
1 files changed, 324 insertions, 0 deletions
diff --git a/data/perl/perl-cross.diff b/data/perl/perl-cross.diff
new file mode 100644
index 000000000..a1a9d57e5
--- /dev/null
+++ b/data/perl/perl-cross.diff
@@ -0,0 +1,324 @@
+diff -uNr perl-cross-1.2/Makefile perl-cross-1.2+iPhone/Makefile
+--- perl-cross-1.2/Makefile 2018-04-16 21:22:36.000000000 -1000
++++ perl-cross-1.2+iPhone/Makefile 2018-08-16 22:14:41.000000000 -1000
+@@ -135,7 +135,7 @@
+ perl$x: LDFLAGS += -Wl,-rpath,$(archlib)/CORE
+ endif
+ endif # or should it be "else"?
+-perl$x: LDFLAGS += -Wl,-E
++#perl$x: LDFLAGS += -Wl,-E
+
+ perl$x: perlmain$o $(LIBPERL) $(static_tgt) static.list ext.libs
+ $(eval extlibs=$(shell cat ext.libs))
+@@ -180,7 +180,7 @@
+
+ ifeq ($(useshrplib),true)
+ $(LIBPERL):
+- $(CC) $(LDDLFLAGS) -o $@ $(filter %$o,$^) $(LIBS)
++ $(CC) $(LDDLFLAGS) -install_name $(archlib)/CORE/$@ -o $@ $(filter %$o,$^) $(LIBS)
+ else
+ $(LIBPERL):
+ $(AR) cru $@ $(filter %$o,$^)
+@@ -211,7 +211,7 @@
+ # The rules below replace make_ext script used in the original
+ # perl build chain. Some host-specific functionality is lost.
+ # Check miniperl_top to see how it works.
+-$(nonxs_tgt) $(disabled_nonxs_tgt): %/pm_to_blib: | %/Makefile
++$(nonxs_tgt) $(disabled_nonxs_tgt): %/pm_to_blib: | %/Makefile dynaloader
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL)
+
+ DynaLoader$o: | ext/DynaLoader/pm_to_blib
+@@ -226,7 +226,7 @@
+ $(static_tgt): %/pm_to_blib: | %/Makefile $(nonxs_tgt)
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL) LINKTYPE=static static
+
+-$(dynamic_tgt) $(disabled_dynamic_tgt): %/pm_to_blib: | %/Makefile
++$(dynamic_tgt) $(disabled_dynamic_tgt): %/pm_to_blib: | %/Makefile dynaloader
+ $(MAKE) -C $(dir $@) all PERL_CORE=1 LIBPERL=$(LIBPERL) LINKTYPE=dynamic
+
+ lib/re.pm: ext/re/re.pm
+@@ -282,7 +282,7 @@
+
+ # mktables does not touch the files unless they need to be rebuilt,
+ # which confuses make.
+-lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)
++lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM) utilities
+ ./miniperl_top lib/unicore/mktables -w -C lib/unicore -P pod -maketest -makelist -p
+
+ # The following rules ensure that modules listed in mkppport.lst get
+diff -uNr perl-cross-1.2/Makefile.config.SH perl-cross-1.2+iPhone/Makefile.config.SH
+--- perl-cross-1.2/Makefile.config.SH 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/Makefile.config.SH 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ if [ ! -f config.sh ]; then
+ echo "config.sh not found" >&2
+diff -uNr perl-cross-1.2/cnf/config.guess perl-cross-1.2+iPhone/cnf/config.guess
+--- perl-cross-1.2/cnf/config.guess 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/config.guess 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # Attempt to guess a canonical system name.
+ # Copyright 1992-2016 Free Software Foundation, Inc.
+
+@@ -925,7 +925,7 @@
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+- objdump --private-headers /bin/sh | grep -q ld.so.1
++ objdump --private-headers /bin/bash | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+diff -uNr perl-cross-1.2/cnf/config.sub perl-cross-1.2+iPhone/cnf/config.sub
+--- perl-cross-1.2/cnf/config.sub 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/config.sub 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#! /bin/bash
+ # Configuration validation subroutine script.
+ # Copyright 1992-2016 Free Software Foundation, Inc.
+
+@@ -1407,7 +1407,7 @@
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+- | -onefs* | -tirtos* | -phoenix*)
++ | -onefs* | -tirtos* | -phoenix* | -iphoneos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+diff -uNr perl-cross-1.2/cnf/configure perl-cross-1.2+iPhone/cnf/configure
+--- perl-cross-1.2/cnf/configure 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ base=${0%/*}; test -z "$base" && base=.
+
+@@ -8,7 +8,7 @@
+ appendlog() { cat "$cfglog" >> "$1"; rm -f "$cfglog"; cfglog="$1"; }
+
+ config="config.sh.$$"
+-echo "#!/bin/sh" > $config
++echo "#!/bin/bash" > $config
+ echo "" >> $config
+ setconfig() { mv "$config" "$1"; config="$1"; }
+ delconfig() { rm "$config"; }
+diff -uNr perl-cross-1.2/cnf/configure__f.sh perl-cross-1.2+iPhone/cnf/configure__f.sh
+--- perl-cross-1.2/cnf/configure__f.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure__f.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -254,10 +254,10 @@
+ try_link_libs $libs $*
+ }
+
+-try_readelf() {
+- require 'readelf'
++try_nm() {
++ require 'nm'
+ require '_o'
+- run $readelf $* try$_o
++ run $nm $* try$_o
+ }
+
+ try_objdump() {
+diff -uNr perl-cross-1.2/cnf/configure_func.sh perl-cross-1.2+iPhone/cnf/configure_func.sh
+--- perl-cross-1.2/cnf/configure_func.sh 2018-04-21 11:28:00.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_func.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -7,7 +7,7 @@
+ try_start
+ funcincludes "$3" "$4" "$includes"
+ try_add "int main(void) { $2($3); return 0; }"
+- try_link -O0 -fno-builtin
++ try_link -O0 -fno-builtin -Wno-error=implicit-function-declaration
+ resdef $1 'found' 'missing'
+ fi
+ }
+diff -uNr perl-cross-1.2/cnf/configure_misc.sh perl-cross-1.2+iPhone/cnf/configure_misc.sh
+--- perl-cross-1.2/cnf/configure_misc.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_misc.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -92,7 +92,7 @@
+ define extras ''
+
+ # These are important but we don't test them
+-define startsh '#!/bin/sh'
++define startsh '#!/bin/bash'
+ define spitshell 'cat'
+ define d_Gconvert 'sprintf((b),"%.*g",(n),(x))'
+ define d_modfl_pow32_bug 'undef'
+@@ -287,7 +287,7 @@
+ define runnm false # unused
+ define sed sed # unused
+ define sendmail
+-define sh /bin/sh
++define sh /bin/bash
+ define shar # unused
+ define sleep # unused
+ define smail # unused
+@@ -335,7 +335,7 @@
+ define mallocobj
+ define mallocsrc
+ define mistrustnm
+-define n '-n'
++#define n '-n'
+ define orderlib
+ define perl
+ define perl5
+diff -uNr perl-cross-1.2/cnf/configure_path.sh perl-cross-1.2+iPhone/cnf/configure_path.sh
+--- perl-cross-1.2/cnf/configure_path.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_path.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -108,7 +108,7 @@
+ define privlibexp "$privlib"
+ define binexp "$bin"
+
+-define libpth "/lib /usr/lib /usr/local/lib"
++define libpth ""
+ define glibpth "$libpth"
+ define plibpth
+
+diff -uNr perl-cross-1.2/cnf/configure_tool.sh perl-cross-1.2+iPhone/cnf/configure_tool.sh
+--- perl-cross-1.2/cnf/configure_tool.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_tool.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -2,7 +2,16 @@
+
+ tryprog() {
+ log "trying $1=$2"
+- if command -v "$2" 1>/dev/null 2>/dev/null; then
++ if echo $2 | grep -q xcrun; then
++ if $2 -f $3 1>/dev/null 2>/dev/null; then
++ define "$1" "$2$3"
++ result "$2$3"
++ return 0
++ else
++ return 1
++ fi
++ fi
++ if command -v $2 1>/dev/null 2>/dev/null; then
+ define "$1" "$2"
+ result "$2"
+ return 0
+@@ -75,7 +84,12 @@
+ fi
+
+ # Finally, try $target-gcc
+- test -n "$toolsprefix" && tryprog $1 "$toolsprefix$3" && return 0
++ mstart "trying $toolsprefix$3"
++ if echo $toolsprefix | grep -q xcrun; then
++ test -n "$toolsprefix" && tryprog $1 "$toolsprefix" $3 && return 0
++ else
++ test -n "$toolsprefix" && tryprog $1 "$toolsprefix$3" && return 0
++ fi
+ test -n "$target" && tryprog $1 "$target-$3" && return 0
+ test -n "$targetarch" && tryprog $1 "$targetarch-$3" && return 0
+
+@@ -86,9 +100,8 @@
+ whichprog cc CC gcc || whichprog cc CC cc || die "No C compiler found"
+ #whichprog ld LD ld # while correct, this breaks MM library test
+ whichprog ar AR ar || die "Cannot find ar"
+-whichprog nm NM nm
++whichprog nm NM nm || die "Cannot find nm"
+ whichprog ranlib RANLIB ranlib
+-whichprog readelf READELF readelf || die "Cannot find readelf"
+ whichprog objdump OBJDUMP objdump || die "Cannot find objdump"
+
+ # XXX: this looks wrong, but the usemmldlt code depends on $ld being able
+@@ -154,7 +167,7 @@
+
+ # Used only for modules
+ define cccdlflags '-fPIC -Wno-unused-function'
+-define ccdlflags '-Wl,-E'
++#define ccdlflags '-Wl,-E'
+
+ # Misc flags setup
+ predef lddlflags "-shared" # modules
+@@ -262,6 +275,14 @@
+ define osname "linux"
+ result "Linux"
+ ;;
++ *-darwin*)
++ define osname "darwin"
++ result "Darwin"
++ ;;
++ *-iphoneos*)
++ define osname "iphoneos"
++ result "iPhoneOS"
++ ;;
+ *-bsd*)
+ define osname "bsd"
+ result "BSD"
+diff -uNr perl-cross-1.2/cnf/configure_type.sh perl-cross-1.2+iPhone/cnf/configure_type.sh
+--- perl-cross-1.2/cnf/configure_type.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_type.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -38,13 +38,13 @@
+ return
+ fi
+
+- if not try_readelf -s > try.out 2>>$cfglog; then
++ if not try_nm -g > try.out 2>>$cfglog; then
+ result 'unknown'
+ die "Cannot determine sizeof($2), use -D${1}size="
+ return
+ fi
+
+- result=`grep foo try.out | sed -r -e 's/.*: [0-9]+ +//' -e 's/ .*//'`
++ result=`grep foo try.out | sed -e s/' .*'// -e s/^0*//`
+ if [ -z "$result" -o "$result" -le 0 ]; then
+ result "unknown"
+ die "Cannot determine sizeof($2)"
+diff -uNr perl-cross-1.2/cnf/configure_type_sel.sh perl-cross-1.2+iPhone/cnf/configure_type_sel.sh
+--- perl-cross-1.2/cnf/configure_type_sel.sh 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/configure_type_sel.sh 2018-08-16 20:31:19.000000000 -1000
+@@ -114,7 +114,7 @@
+ fi
+
+ # Most targets use .data but PowerPC has .sdata instead
+- if try_compile && try_objdump -j .data -j .sdata -s; then
++ if try_compile && try_objdump -s ; then
+ bo=`grep '11' try.out | grep '44' | sed -e 's/ .*//' -e 's/[^1-8]//g' -e 's/\([1-8]\)\1/\1/g'`
+ else
+ bo=''
+diff -uNr perl-cross-1.2/cnf/diffs/dedup.px perl-cross-1.2+iPhone/cnf/diffs/dedup.px
+--- perl-cross-1.2/cnf/diffs/dedup.px 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/diffs/dedup.px 2018-08-16 20:31:19.000000000 -1000
+@@ -2,7 +2,7 @@
+
+ @files = (ls("perl*/*.patch"), ls("cperl*/*.patch"));
+
+-print "#!/bin/sh\n\n";
++print "#!/bin/bash\n\n";
+
+ %map = ( );
+
+diff -uNr perl-cross-1.2/cnf/hints/darwin perl-cross-1.2+iPhone/cnf/hints/darwin
+--- perl-cross-1.2/cnf/hints/darwin 1969-12-31 14:00:00.000000000 -1000
++++ perl-cross-1.2+iPhone/cnf/hints/darwin 2018-08-16 20:33:20.000000000 -1000
+@@ -0,0 +1,7 @@
++# Linux syscalls
++d_voidsig='undef'
++d_nanosleep='define'
++d_clock_gettime='define'
++d_clock_getres='define'
++d_clock_nanosleep='undef'
++d_clock='define'
+diff -uNr perl-cross-1.2/configure perl-cross-1.2+iPhone/configure
+--- perl-cross-1.2/configure 2018-04-15 20:40:22.000000000 -1000
++++ perl-cross-1.2+iPhone/configure 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ earlydie() { echo "$@" >&2; exit 1; }
+
+diff -uNr perl-cross-1.2/miniperl_top perl-cross-1.2+iPhone/miniperl_top
+--- perl-cross-1.2/miniperl_top 2018-04-17 06:07:31.000000000 -1000
++++ perl-cross-1.2+iPhone/miniperl_top 2018-08-16 20:31:19.000000000 -1000
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # This script can be used to run Makefile.PL
+ # Note that is relies on $0 to tell where lib/ is; typically