Skip to content

Commit

Permalink
For AIX, modify the perl.exp path in ccdlflags earlier in Makefile.SH
Browse files Browse the repository at this point in the history
The config.sh value for ccdlflags includes the path to the *installed*
copy of the file perl.exp

While building, that file doesn't exist (or worse, is incompatible) so in
the Makefile we need CCDLFLAGS to point to the local copy. Previously the
Makefile had CCDLFLAGS first set to the value with the installed path, and
then set it again to the local path "for building Perl itself". However,
the Makefile is *only* used for building Perl itself (not installed
extensions), hence we never need the first value. Hence move the sed logic
for the change earlier, write out the first declaration of CCDLFLAGS with
the "local" value, and eliminate the second declaration.

The sed logic was added in July 1999 by commit 5f9d9a1:
    AIX magic: ccdlflags needs to be different for
    Perl itself and for extra-core extensions
    (as used by ExtUtilss::embed::ldopts).
    Based on the problems described in
    To: perl5-porters@perl.org
    Subject: [ID 19990722.002] Perl 5.00503 and AIX 4.1.5; perl.exp; build errors. Also Imagemagick...
    Reply-To: m.w.ellwood@rl.ac.uk
    Message-Id: <Pine.A41.3.96.990722141209.72660V-100000@unixfe.rl.ac.uk>

It probably should have always been done the way this commit now does it.
  • Loading branch information
nwc10 authored and Nicholas Clarck committed Oct 4, 2021
1 parent 5b587f9 commit 619c007
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ EOT
;;
esac

# ccdlflags, not to be confused with cccdlflags:
case "${osname}" in
aix)
# In AIX we need to change this for building Perl itself from
# the config.sh definition (which is for building external
# extensions *after* Perl has been built and installed)
ccdlflags=`echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
;;
esac

: is Cwd static or dynamic
static_cwd='define'
list_util_dep='$(PERL_EXE)'
Expand Down Expand Up @@ -816,13 +826,6 @@ esac

case "$osname" in
aix)
$spitshell >>$Makefile <<!GROK!THIS!
# 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)
CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'`
!GROK!THIS!
case "$useshrplib" in
define|true|[yY]*)
$spitshell >>$Makefile <<'!NO!SUBS!'
Expand Down

0 comments on commit 619c007

Please sign in to comment.