[fpc-pascal] Compile fpc 64 bit from /fixes_3_2/

Marco van de Voort fpc at pascalprogramming.org
Tue Oct 8 19:28:45 CEST 2019


Op 2019-10-08 om 17:02 schreef fredvs:
>
> The script first clean everything and do the compilation of fpc with ppcx64
> and all seems ok.
> But, when the compilation is ok and a "new" ppcx64 is created, I dont know
> why, the process continue, remove all was already done, recompile all using
> ppc386 (fpc 32 bit) and finally only install new fpc 32 bit (ppc386).

Here is my buildscript used to build a new snapshot. Note that it passes 
the /new/ compiler to make install.  (FPC=compiler/$GENCOMPILER)

The script is made so that I can easily move it around machines and only 
adapt things like "CORES", OPTSETTINGS etc.

#!/usr/bin/env bash
# simple i386/x86_64 building on linux/*BSD.

# Rule of thumb physical+1
CORES=5
HOSTARCH=`uname -m`
HOSTOS=`uname -s`
SRCDIR=/fpc/fpctrunk
DESTDIR=~/src/builded
HAVEDEBUG=1
OVERRIDEDETECTION=0
HAVEOPT=0
LIBCRTL=0
ARGS=" -viwn -Sg -Fl/usr/local/lib  -dLZX_USETHREADS "
OPTSETTINGS=" -O4 -Opcoreavx -Cpcoreavx  -Cfavx "
DEBUGSETTING=" -gw2 -godwarfsets "

#----------------------

is64=0
START=ppcrel
GENCOMPILER=ppc386
NEWOPT=""

if [ $LIBCRTL = "1" ] ; then
   ARGS+=" - dFPC_USE_LIBC "
fi
if [ $OVERRIDEDETECTION != 1 ]; then
if [ "$HOSTARCH" = "x86_64" ] ; then
   is64=1
fi
if [ "$HOSTARCH" = "amd64" ] ; then
   is64=1
fi
fi

if [ $is64 = 1 ]; then
   START=ppcrel64
   GENCOMPILER=ppcx64
fi

if [ "$HAVEDEBUG" = "1" ] ; then
   if [ "$ARGS" != "" ]; then
    ARGS="$ARGS$DEBUGSETTING"
   fi
fi

if [ "$HAVEOPT" = "1" ] ; then
   $NEWOPT=$OPTSETTINGS
fi

GMAKE=gmake
if [ $HOSTOS = "Linux" ] ; then
   GMAKE=make
fi

JOPT="-j $CORES"
FPMAKEOPT="-T $CORES"
while getopts ":nj:" optname
   do
     case "$optname" in
       "j")
         echo Cores overriden to $OPTARG
         JOPT="-j $OPTARG"
         FPMAKEOPT="-T $OPTARG"
         ;;
       "n")
          JOPT=""
         ;;
       *)
         echo "Unknown error while processing options"
         ;;
     esac
   done

if [ $OVERRIDEDETECTION != 1 ]; then
echo ARCH is $HOSTARCH on \(OS:\) $HOSTOS
echo Build in $SRCDIR, installing in $DESTDIR with $CORES cores
fi

cd $SRCDIR

$GMAKE $JOPT clean all  FPMAKEOPT="$FPMAKEOPT" PP="$START" FPC="$START" 
OPT="$ARGS" NEWOPT="$NEWOPT" &> ~/buildlog64

if [ ! $? = 0 ] ; then
  echo Grr, failed again
else
  $GMAKE install FPC=compiler/$GENCOMPILER OPT="$ARGS" NEWOPT=$NEWOPT 
INSTALL_PREFIX=$DESTDIR &> ~/installog64
  if [ ! $? = 0 ] ; then
   echo INSTALL failed | tee ~/outcome
  else
   echo Everything _should_ be fine.| tee ~/outcome
  fi
fi





More information about the fpc-pascal mailing list