A few little changes to the ceckout of release_3_0_4 tag of fpcbuild repository were made in order to be able to generate an installation tar for powerpc-aix target. Generated January 4th 2018. Enjoy, and report any problem, Pierre Muller Index: install/makepack =================================================================== --- install/makepack (revision 1345) +++ install/makepack (working copy) @@ -30,9 +30,13 @@ # to use the | head -n1 to fix a bug in fpc 1.9.4 and earlier # that uses exitcode 1 also when printing info resulting in # fpc binary to print an error line (PFV) -SOURCECPU=`fpc -iSP | head -n1` -SOURCEOS=`fpc -iSO | head -n1` +if [ -z "$STARTFPC" ] ; then + STARTFPC=fpc +fi +SOURCECPU=`$STARTFPC -iSP | head -n1` +SOURCEOS=`$STARTFPC -iSO | head -n1` + # retrieve real OS. HOSTOS=`uname -s | tr "[:upper:]" "[:lower:]"` @@ -56,6 +60,10 @@ *openbsd*) MAKE=gmake EXTRAOPT="-Fl/usr/local/lib" ;; + *aix*) MAKE=gmake + EXTRAOPT="-Fl/opt/freeware/lib" + export SPECIALLINK="-Xd -CTsmalltoc" + ;; esac if [ $# -ne 0 ]; then Index: fpcsrc/ide/fpmake.pp =================================================================== --- fpcsrc/ide/fpmake.pp (revision 37892) +++ fpcsrc/ide/fpmake.pp (working copy) @@ -137,6 +137,7 @@ T : TTarget; CompilerTarget : TCpu; s: string; + ps : integer; begin AddCustomFpmakeCommandlineOption('CompilerTarget','Target CPU for the IDE''s compiler'); @@ -191,6 +192,20 @@ if CompilerTarget = mipsel then P.Options.Add('-Fu../compiler/mips'); + { Handle SPECIALLINK environment variable if available } + s:=Trim(GetEnvironmentVariable('SPECIALLINK')); + if s<>'' then + begin + ps:=pos(' ',s); + while ps>0 do + begin + P.Options.Add(copy(s,1,ps-1)); + s:=Trim(copy(s,ps+1,length(s))); + ps:=pos(' ',s); + end; + if s<>'' then + P.Options.Add(s); + end; P.Options.Add('-Sg'); P.IncludePath.Add('compiler'); Index: fpcsrc/utils/fpcm/revision.inc =================================================================== --- fpcsrc/utils/fpcm/revision.inc (revision 37892) +++ fpcsrc/utils/fpcm/revision.inc (working copy) @@ -1 +1 @@ -'2017-02-13 rev 35434' +'2017-09-02 rev 37116' Index: install/install.sh =================================================================== --- install/install.sh (revision 1345) +++ install/install.sh (working copy) @@ -39,6 +39,19 @@ # # CMDTAR="tar" +OS=`uname -s` +if [ "$OS" == "AIX" ] ; then + GNUTAR=`which gtar` + if [ -e "$GNUTAR" ] ; then + CMDTAR="$GNUTAR" + echo "Using GNU tar" + else + echo "GNU tar not found, installation might fail as AIX tar is not compatible" + echo "If you know how to call AIX tar to install Free Pascal please report" + echo "to fpc-devel mailing list" + fi +fi + TAR="$CMDTAR --no-same-owner" # Untar files ($3,optional) from file ($1) to the given directory ($2) unztar ()