perl: drop 110-always_use_miniperl.patch

The patch was introduced in commit 4c57844f0f ("lang/perl: Add hack to
make perl always use miniperl during build"), but it is not actually
necessary. By setting $perl to a non-empty value (using 'perl' as is
common on desktop distros), the logic works as intended and selects the
correct perl binary for host and target builds.

As miniperl just symlinks to host perl for target builds, the main
effect of this change is not unconditionally passing `-Ilib -I.`
anymore. This seems like a good thing; host libraries should be used
with host perl by default.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer 2025-04-25 12:35:23 +02:00 committed by Robert Marko
parent 2a7dc15402
commit e7b5a35e5c
4 changed files with 24 additions and 51 deletions

View File

@ -864,7 +864,7 @@ package='perl5'
pager='/usr/bin/less'
passcat='cat /etc/passwd'
path_sep=':'
perl=''
perl='perl'
perl5=''
perl_patchlevel=''
perl_static_inline='static __inline__'

View File

@ -1,27 +0,0 @@
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -360,22 +360,11 @@ PERL_EXE_LDFLAGS=$exeldflags
;;
esac
-case "$usecrosscompile$perl" in
-define?*)
- $spitshell >>$Makefile <<!GROK!THIS!
-# Macros to invoke a copy of our fully operational perl during the build.
-PERL_EXE = perl\$(EXE_EXT)
-RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT)
-!GROK!THIS!
- ;;
-*)
- $spitshell >>$Makefile <<!GROK!THIS!
+$spitshell >>$Makefile <<!GROK!THIS!
# Macros to invoke a copy of our fully operational perl during the build.
PERL_EXE = perl\$(EXE_EXT)
-RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib -I.
+RUN_PERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib -I.
!GROK!THIS!
- ;;
-esac
$spitshell >>$Makefile <<!GROK!THIS!
# Macros to run our tests

View File

@ -8,7 +8,7 @@
ranlib = $ranlib
ECHO = $echo
@@ -791,7 +792,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
@@ -802,7 +803,7 @@ bitcount.h: generate_uudmap$(HOST_EXE_EX
./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
@ -17,7 +17,7 @@
$(LNS) $(HOST_GENERATE) generate_uudmap$(HOST_EXE_EXT)
!NO!SUBS!
@@ -896,26 +897,26 @@ mydtrace.h: $(DTRACE_H)
@@ -907,26 +908,26 @@ mydtrace.h: $(DTRACE_H)
define)
$spitshell >>$Makefile <<'!NO!SUBS!'
$(DTRACE_MINI_O): perldtrace.d $(miniperl_objs_nodt)
@ -48,7 +48,7 @@
!NO!SUBS!
;;
@@ -926,13 +927,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
@@ -937,13 +938,13 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
case "$useshrplib" in
true)
$spitshell >>$Makefile <<'!NO!SUBS!'
@ -64,7 +64,7 @@
mv $@ libperl$(OBJ_EXT)
$(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
!NO!SUBS!
@@ -941,7 +942,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
@@ -952,7 +953,7 @@ $(LIBPERL): $& $(perllib_dep) $(DYNALOAD
;;
*)
$spitshell >>$Makefile <<'!NO!SUBS!'
@ -73,7 +73,7 @@
$(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER)
@$(ranlib) $(LIBPERL)
!NO!SUBS!
@@ -975,7 +976,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
@@ -986,7 +987,7 @@ $(MINIPERL_EXE): lib/buildcustomize.pl
amigaos*)
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
@ -82,7 +82,7 @@
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
# $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
@@ -997,7 +998,7 @@ NAMESPACEFLAGS = -force_flat_namespace
@@ -1008,7 +1009,7 @@ NAMESPACEFLAGS = -force_flat_namespace
esac
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
@ -91,7 +91,7 @@
$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
@@ -1008,8 +1009,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
@@ -1019,8 +1020,8 @@ lib/buildcustomize.pl: $& $(miniperl_obj
if test "X$hostperl" != X; then
$spitshell >>$Makefile <<!GROK!THIS!
lib/buildcustomize.pl: \$& \$(miniperl_dep) write_buildcustomize.pl
@ -102,7 +102,7 @@
\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
\$(LDLIBPTH) ./miniperl\$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
@@ -1017,7 +1018,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
@@ -1028,7 +1029,7 @@ lib/buildcustomize.pl: \$& \$(miniperl_d
else
$spitshell >>$Makefile <<'!NO!SUBS!'
lib/buildcustomize.pl: $& $(miniperl_dep) write_buildcustomize.pl
@ -111,7 +111,7 @@
$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
$(miniperl_objs) $(libs)
$(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
@@ -1030,7 +1031,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
@@ -1041,7 +1042,7 @@ lib/buildcustomize.pl: $& $(miniperl_dep
$spitshell >>$Makefile <<'!NO!SUBS!'
$(PERL_EXE): $& $(perlmain_dep) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl
@ -120,7 +120,7 @@
!NO!SUBS!
case "$osname" in
@@ -1130,8 +1131,8 @@ pod/perl5400delta.pod: pod/perldelta.pod
@@ -1141,8 +1142,8 @@ pod/perl5400delta.pod: pod/perldelta.pod
$(LNS) perldelta.pod pod/perl5400delta.pod
extra.pods: $(MINIPERL_EXE)
@ -131,7 +131,7 @@
-@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
nx=`echo $$x | sed -e "s/README\.//"`; \
$(LNS) ../$$x "pod/perl"$$nx".pod" ; \
@@ -1330,11 +1331,11 @@ realclean: _realcleaner _mopup
@@ -1341,11 +1342,11 @@ realclean: _realcleaner _mopup
@echo "Note that '$(MAKE) realclean' does not delete config.sh or Policy.sh"
_clobber:
@ -148,7 +148,7 @@
clobber: _realcleaner _mopup _clobber
@@ -1342,24 +1343,24 @@ distclean: clobber
@@ -1353,24 +1354,24 @@ distclean: clobber
# Like distclean but also removes emacs backups and *.orig.
veryclean: _verycleaner _mopup _clobber
@ -184,7 +184,7 @@
-cd pod; $(LDLIBPTH) $(MAKE) $(CLEAN)
-cd utils; $(LDLIBPTH) $(MAKE) $(CLEAN)
-@if test -f $(MINIPERL_EXE) ; then \
@@ -1369,8 +1370,8 @@ _cleaner1:
@@ -1380,8 +1381,8 @@ _cleaner1:
else \
sh $(CLEAN).sh ; \
fi
@ -195,7 +195,7 @@
# Dear POSIX, thanks for making the default to xargs to be
# run once if nothing is passed in. It is such a great help.
@@ -1385,24 +1386,24 @@ _cleaner1:
@@ -1396,24 +1397,24 @@ _cleaner1:
# Add new rules before that line - the next line (rm -f so_locations ...) is
# used as a placeholder by a regen script.
_cleaner2:
@ -237,7 +237,7 @@
-rmdir lib/version lib/threads lib/inc/ExtUtils lib/inc lib/encoding
-rmdir lib/autodie/exception lib/autodie/Scope lib/autodie lib/XS
-rmdir lib/Win32API lib/VMS lib/Unicode/Collate/Locale
@@ -1459,11 +1460,11 @@ _realcleaner:
@@ -1470,11 +1471,11 @@ _realcleaner:
_verycleaner:
@$(LDLIBPTH) $(MAKE) _cleaner1 CLEAN=veryclean
@$(LDLIBPTH) $(MAKE) _cleaner2
@ -251,7 +251,7 @@
lint $(lintflags) -DPERL_CORE -D_REENTRANT -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(c)
cscopeflags = -Rb # Recursive, build-only.
@@ -1524,7 +1525,7 @@ case "$targethost" in
@@ -1535,7 +1536,7 @@ case "$targethost" in
'') $spitshell >>$Makefile <<'!NO!SUBS!'
test_prep test-prep: test_prep_pre $(MINIPERL_EXE) $(unidatafiles) $(PERL_EXE) \
$(dynamic_ext) $(TEST_PERL_DLL) runtests $(generated_pods) common_build
@ -260,7 +260,7 @@
!NO!SUBS!
;;
@@ -1574,7 +1575,7 @@ test_prep test-prep: test_prep_pre \$(MI
@@ -1585,7 +1586,7 @@ test_prep test-prep: test_prep_pre \$(MI
$to config.sh
# --- For lib/diagnostics.t with -Duseshrplib
$to \$(PERL_EXE)
@ -269,7 +269,7 @@
$to t/\$(PERL_EXE)
!GROK!THIS!
@@ -1592,7 +1593,7 @@ else
@@ -1603,7 +1604,7 @@ else
$spitshell >>$Makefile <<'!NO!SUBS!'
test_prep_reonly: $(MINIPERL_EXE) $(PERL_EXE) $(dynamic_ext_re) $(TEST_PERL_DLL)
$(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
@ -278,7 +278,7 @@
!NO!SUBS!
fi
@@ -1648,7 +1649,7 @@ minitest_prep: $(MINIPERL_EXE)
@@ -1659,7 +1660,7 @@ minitest_prep: $(MINIPERL_EXE)
@echo "You may see some irrelevant test failures if you have been unable"
@echo "to build lib/Config.pm, or the Unicode data files."
@echo " "

View File

@ -42,10 +42,10 @@ Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
- ;;
-esac
-
$spitshell >>$Makefile <<!GROK!THIS!
# Macros to invoke a copy of our fully operational perl during the build.
PERL_EXE = perl\$(EXE_EXT)
@@ -1045,20 +1029,6 @@ $(PERL_EXE): $& $(perlmain_dep) $(LIBPER
case "$usecrosscompile$perl" in
define?*)
$spitshell >>$Makefile <<!GROK!THIS!
@@ -1056,20 +1040,6 @@ $(PERL_EXE): $& $(perlmain_dep) $(LIBPER
$(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) $(perlmain_objs) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs)
!NO!SUBS!
;;