Change 35007 by [EMAIL PROTECTED] on 2008/12/04 11:14:02 Subject: AIX patches for Perl 5.8.9 RC2 and gcc on AIX + suidperl on AIX README.aix From: Rainer Tammer <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Date: Thu, 04 Dec 2008 10:32:11 +0100 [the rest, including unwinding change 34983 first]
Affected files ... ... //depot/perl/Makefile.SH#412 edit ... //depot/perl/README.aix#27 edit Differences ... ==== //depot/perl/Makefile.SH#412 (text) ==== Index: perl/Makefile.SH --- perl/Makefile.SH#411~34983~ 2008-12-02 10:06:52.000000000 -0800 +++ perl/Makefile.SH 2008-12-04 03:14:02.000000000 -0800 @@ -47,6 +47,7 @@ esac linklibperl='$(LIBPERL)' +linklibperl_nonshr='' shrpldflags='$(LDDLFLAGS)' ldlibpth='' DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB' @@ -104,6 +105,7 @@ esac shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib" linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl" + linklibperl_nonshr='-lperl_nonshr' ;; *) shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp" @@ -115,6 +117,7 @@ esac shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib" linklibperl="-L $archlibexp/CORE -L `pwd | sed 's/\/UU$//'` -lperl" + linklibperl_nonshr='-lperl_nonshr' ;; esac ;; @@ -266,6 +269,7 @@ PLDLFLAGS = $pldlflags LIBPERL = $libperl LLIBPERL= $linklibperl +LLIBPERL_NONSHR= $linklibperl_nonshr SHRPENV = $shrpenv # Static targets are ordinarily built without CCCDLFLAGS. However, @@ -900,10 +904,24 @@ # checks as well as the special code to validate that the script in question # has been invoked correctly. +!NO!SUBS! + +case "${osname}" in +aix*) +$spitshell >>Makefile <<'!NO!SUBS!' +suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) + $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL_NONSHR) $(LLIBPERL) `cat ext.libs` $(libs) + +!NO!SUBS! +;; +*) +$spitshell >>Makefile <<'!NO!SUBS!' suidperl$(EXE_EXT): $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) $(SHRPENV) $(LDLIBPTH) $(CC) -o suidperl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) !NO!SUBS! +;; +esac fi ==== //depot/perl/README.aix#27 (text) ==== Index: perl/README.aix --- perl/README.aix#26~34961~ 2008-12-01 00:14:42.000000000 -0800 +++ perl/README.aix 2008-12-04 03:14:02.000000000 -0800 @@ -41,34 +41,55 @@ The XL C for AIX is integrated in the XL C/C++ for AIX compiler. -If you choose XL C/C++ V9 you need APAR IZ35785 installed -otherwise the integrated SDBM_File do not compile correctly due -to an optimization bug. You can circumvent this problem by -adding -qipa to the optimization flags (-Doptimize='-O -qipa'). -The PTF for APAR IZ35785 which solves this problem will be available +If you choose XL C/C++ V9 you need APAR IZ35785 installed +otherwise the integrated SDBM_File do not compile correctly due +to an optimization bug. You can circumvent this problem by +adding -qipa to the optimization flags (-Doptimize='-O -qipa'). +The PTF for APAR IZ35785 which solves this problem will be available in 1Q 2009. IBM does provide an emergency fix for this problem. -Perl can be compiled with either IBM's ANSI C compiler or with gcc. -The former is recommended, as not only it can compile Perl with no -difficulty, but also can take advantage of features listed later +Perl can be compiled with either IBM's ANSI C compiler or with gcc. +The former is recommended, as not only it can compile Perl with no +difficulty, but also can take advantage of features listed later that require the use of IBM compiler-specific command-line flags. -If you decide to use gcc, make sure your installation is recent and -complete, and be sure to read the Perl INSTALL file for more gcc-specific -details. Please report any hoops you had to jump through to the +If you decide to use gcc, make sure your installation is recent and +complete, and be sure to read the Perl INSTALL file for more gcc-specific +details. Please report any hoops you had to jump through to the development team. +=head2 Perl 5.8.9 was successfully compiled and tested on: + + AIX Level | Compiler Level | w th | w/o th + --------------------------+-------------------------+------+------- + 5.1 TL9 32 bit | XL C/C++ V7 | OK | OK + 5.1 TL9 32 bit | gcc 3.2.2 | OK | OK + 5.1 TL9 64 bit | XL C/C++ V7 | OK | OK + 5.2 TL10 32 bit | XL C/C++ V8 | OK | OK + 5.2 TL10 64 bit | XL C/C++ V8 | OK | OK + 5.3 TL7 32 bit | XL C/C++ V9 + IZ35785 | OK | OK + 5.3 TL7 32 bit | gcc 4.2.4 | OK | OK + 5.3 TL7 64 bit | XL C/C++ V9 + IZ35785 | OK | OK + 6.1 TL1 32 bit | XL C/C++ V10 | OK | OK + 6.1 TL1 64 bit + IZ39077 | XL C/C++ V10 | OK | OK + + w th = with thread + w/o th = without thread + +Successfully tested means that all make test runs with an result of 100% OK. +All tests were conducted with -Duseshrplib set. + =head2 Building Dynamic Extensions on AIX -Starting from Perl 5.7.2 (and consequently 5.8.x / 5.10.x) and AIX 4.3 -or newer Perl uses the AIX native dynamic loading interface in the so -called runtime linking mode instead of the emulated interface that was -used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and -earlier. This change does break backward compatibility with compiled -modules from earlier Perl releases. The change was made to make Perl -more compliant with other applications like Apache/mod_perl which are -using the AIX native interface. This change also enables the use of -C++ code with static constructors and destructors in Perl extensions, +Starting from Perl 5.7.2 (and consequently 5.8.x / 5.10.x) and AIX 4.3 +or newer Perl uses the AIX native dynamic loading interface in the so +called runtime linking mode instead of the emulated interface that was +used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and +earlier. This change does break backward compatibility with compiled +modules from earlier Perl releases. The change was made to make Perl +more compliant with other applications like Apache/mod_perl which are +using the AIX native interface. This change also enables the use of +C++ code with static constructors and destructors in Perl extensions, which was not possible using the emulated interface. It is highly recommended to use the new interface. @@ -120,12 +141,12 @@ -Dusethreads \ -Dprefix=/usr/opt/perl5_32 -The -Dprefix option will install Perl in a directory parallel to the +The -Dprefix option will install Perl in a directory parallel to the IBM AIX system Perl installation. =head2 Recommended Options AIX 5.1/5.2/5.3 and 6.1 (32-bit) -With the following options you get a Perl version which passes +With the following options you get a Perl version which passes all make tests in 32-bit mode. rm config.sh @@ -156,11 +177,11 @@ =head2 Recommended Options AIX 5.1/5.2/5.3 and 6.1(64-bit) -With the following options you get a Perl version which passes all -make tests in 64-bit mode. +With the following options you get a Perl version which passes all +make tests in 64-bit mode. export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell) - + rm config.sh ./Configure \ -d \ @@ -169,10 +190,21 @@ -Duse64bitall \ -Dprefix=/usr/opt/perl5_64 -The -Dprefix option will install Perl in a directory parallel to the +The -Dprefix option will install Perl in a directory parallel to the IBM AIX system Perl installation. -=head2 Compiling Perl 5 on older AIX +If you choose gcc to compile 64-bit Perl then you need to use the +following options: + + -Dcc='gcc -maix64' + + +=head2 Compiling Perl 5 on older AIX versions up to 4.3.3 + +Due to the fact that AIX 4.3.3 reached end-of-service in December 31, +2003 this information is provided as is. The Perl versions prior to +Perl 5.8.9 could be compiled on AIX up to 4.3.3 with the following +settings (your mileage may vary): When compiling Perl, you must use an ANSI C compiler. AIX does not ship an ANSI compliant C-compiler with AIX by default, but binary builds of End of Patch.