diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-09-30 07:01:36 +0000 |
---|---|---|
committer | Nicholas Clarck <nick@i3.procura.nl> | 2021-10-04 10:41:55 +0200 |
commit | 5b587f96555d8465fa5a58672748f7e6d5916965 (patch) | |
tree | c9bec237c059e49a5fc0d6f53f70dafb3d5b518e /Makefile.SH | |
parent | 847816e65cee9ad88b65ceffcaa5fbb2f298798e (diff) | |
download | perl-5b587f96555d8465fa5a58672748f7e6d5916965.tar.gz |
The special AIX target MINIPERL_NONSHR is not needed, so remove it
AIX needs to generate a linker definition file prior to linking the perl
binary.
From the dawn of Perl 5, the miniperl binary was built nearly identically to
the perl binary, so for a build using a shared perl library, miniperl was
linked against the shared perl library.
Originally this linker definition file was generated by a shell script, but
this was problematic in various ways, so the AIX build was migrated to share
the Win32 approach - generating the linker definitions using makedef.pl.
Because this needs to be run during the build, and because the build can't
assume that an installed perl binary exists, it needs to be run by a perl
binary in the build tree. (As was) even miniperl needed this file to exist
already, hence when this change was made the Makefile generated for AIX was
changed to add steps to build an extra 'miniperl_nonshr' binary, not using a
shared library, to generate the linker definition file.
This was all done in July 1999 with commit 549a6b102c2ac8c4:
Fixed AIX dynamic loading and AIX shared Perl library.
Tested in: AIX 4.1.5 cc+useshrplib+usethreads, 4.1.5 cc,
4.1.5 gcc+useshrplib+usethreads, 4.3.1 cc+useshrplib.
Hijacked win32/makedef.pl for more general purpose export
list building, now it is used (as toplevel makedef.pl)
for win32 and AIX (perl_exp.SH made unnecessary).
Because the export lists are now correct in AIX, no more linker
warnings about "Exported symbol not defined" should appear.
However the need for the 'miniperl_nonshr' binary was actually eliminated in
Feb 2000 by commit 18c4b137c9980e71: fix AIX and multiplicity problems
by the seemingly innocent looking change:
case "${osname}${osvers}" in
- next4*)
+ next4*|aix*)
$spitshell >>Makefile <<'!NO!SUBS!'
miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
$(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
What this does is cause AIX to "join" the NeXTSTEP special case code, that
links miniperl with the object files. Meaning that from this point on AIX
miniperl was never using a shared perl library. So the special case build of
the 'miniperl_nonshr' binary could have been eliminated too.
Independent of this story, miniperl for every other platform *also* stopped
being linked against a shared perl library as of March 2006 with commit
908fcb8bef8cbab8:
Move DynaLoader.o into libperl.so.
This avoids the need to statically link DynaLoader into the stub perl
executable and make libperl.so provide all the code needed to get a
functional embedded perl interpreter up running. As a side effect
this also moves DynaLoader into libperl.a for non-useshrplib builds.
Fixes [perl #32539]
meaning that AIX no longer needs a special case for shared perl library
builds to keep miniperl unshared, because all platforms have it now.
Finally, in investigating a v5.26.0 build failure, I identified the cause
and then yesterday committed a fix to blead as part of commit 8f1941325681:
The Makefile must run makedef.pl with -Ilib on the command line
not realising that this had already been identified and fixed by Merijn
in Oct 2017 by commit 72bbce3da5eeffde:
miniperl also needs -Ilib for perl.exp on AIX etc
My commit mistakenly used miniperl_nonshr again. Revert back to his correct
approach, using the regular miniperl.
And hence we can safely delete miniperl_nonshr and all the logic related to
it, as it has been unused since Oct 2017.
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/Makefile.SH b/Makefile.SH index 0907508e2a..a869c9891d 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -298,7 +298,6 @@ DLSUFFIX = .$dlext PLDLFLAGS = $pldlflags LIBPERL = $libperl LLIBPERL= $linklibperl -LLIBPERL_NONSHR= $linklibperl_nonshr SHRPENV = $shrpenv # Static targets are ordinarily built without CCCDLFLAGS. However, @@ -818,7 +817,6 @@ esac case "$osname" in aix) $spitshell >>$Makefile <<!GROK!THIS! -LIBS = $perllibs # In AIX we need to change this for building Perl itself from # its earlier definition (which is for building external # extensions *after* Perl has been built and installed) @@ -829,19 +827,6 @@ CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'` define|true|[yY]*) $spitshell >>$Makefile <<'!NO!SUBS!' -LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT) -MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT) - -$(LIBPERL_NONSHR): $(perllib_objs) - $(RMS) $(LIBPERL_NONSHR) - $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs) - -$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) $(mini_only_objs) - $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \ - $(mini_only_objs) $(LIBPERL_NONSHR) $(LIBS) - -MINIPERLEXP = $(MINIPERL_NONSHR) - LIBPERLEXPORT = perl.exp !NO!SUBS! @@ -849,7 +834,6 @@ LIBPERLEXPORT = perl.exp ;; *) $spitshell >>$Makefile <<'!NO!SUBS!' -MINIPERLEXP = $(MINIPERL_EXE) PERLEXPORT = perl.exp @@ -857,8 +841,8 @@ PERLEXPORT = perl.exp ;; esac $spitshell >>$Makefile <<'!NO!SUBS!' -perl.exp: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) - ./$(MINIPERLEXP) -Ilib makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp +perl.exp: $(MINIPERL_EXE) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) + $(MINIPERL) makedef.pl --sort-fold PLATFORM=aix CC_FLAGS="$(OPTIMIZE)" > perl.exp !NO!SUBS! ;; @@ -867,7 +851,7 @@ os2) MINIPERLEXP = miniperl perl5.def: $(MINIPERLEXP) makedef.pl $(CONFIGPM) $(SYM) $(SYMH) miniperl.map - ./$(MINIPERLEXP) -Ilib makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def + $(MINIPERL) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def !NO!SUBS! ;; @@ -1425,7 +1409,7 @@ _cleaner2: rm -rf pod/perlfunc pod/perlipc -rmdir ext/B/lib -rm -f dist/Time-HiRes/xdefine - rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR) + rm -f so_locations $(LIBPERL_NONSHR) -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 |