In order to generate i386 and x86_64 solaris installers, I needed to modify three files compared to offical fpcbuild-3.0.0.tar.gz source: install/makepack install/install.sh and fpcsrc/gdbint/fpmake.pp The diff are below. libgdb directory was generated using offical gdb-7.7.1 sources for both elf32 and elf64. Warning: this libgdb was compiled on a system with Oracle Solaris: cat /etc/release gives this: Oracle Solaris 11.2 X86 Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved. Assembled 23 June 2014 The IDE with GDB debgger support relies on many installed dynamic libraries and might not work on other SunOS systems. To generate the x86_64 installer, I first generated a native ppcx64 3.0.0 compiler using: cd fpcsrc/compiler ; gmake ditsclean cycle OPT="-n -gw" CPU_TARGET=x86_64 BINUTILSPREFIX= and renamed ppcx64 to ppcx64-bootstrap that was used in install/makepack-64 which was used to generate the x86_64 installer. Generated 2016/01/04 Pierre Muller *** install/makepack.ori Mon Jan 4 14:57:11 2016 --- install/makepack Mon Jan 4 14:03:19 2016 *************** *** 45,50 **** --- 45,54 ---- *netbsd*) MAKE=gmake EXTRAOPT="-Fl/usr/pkg/lib" ;; + + *sunos*) MAKE=gmake + EXTRAOPT="-Fl/usr/local/lib" + ;; *openbsd*) MAKE=gmake EXTRAOPT="-Fl/usr/local/lib" ;; *** install/install.sh.ori Mon Jan 4 17:54:59 2016 --- install/install.sh Tue Jan 5 10:18:24 2016 *************** *** 206,213 **** # Here we start the thing. HERE=`pwd` ! OSNAME=`uname -s | tr A-Z a-z` ! case "$OSNAME" in haiku) # Install in /boot/common or /boot/home/config ? --- 206,213 ---- # Here we start the thing. HERE=`pwd` ! OSNAME=`uname -s | tr "[:upper:]" "[:lower:]"` ! echo "Using OSNAME=\"$OSNAME\"" case "$OSNAME" in haiku) # Install in /boot/common or /boot/home/config ? *************** *** 229,235 **** sunos) # Check if GNU llinker is recent enough, version 2.21 is needed at least GNU_LD=`which gld` ! supported_emulations=`"$GNU_LD" --target-help | sed -n "s|.*supported emulations:||p" ` supports_elf_i386_sol2=`echo $supported_emulations | grep -w elf_i386_sol2 ` supports_elf_x86_64_sol2=`echo $supported_emulations | grep -w elf_x86_64_sol2 ` if [ "$supports_elf_i386_sol2" = "" ]; then --- 229,235 ---- sunos) # Check if GNU llinker is recent enough, version 2.21 is needed at least GNU_LD=`which gld` ! supported_emulations=`"$GNU_LD" --target-help | sed -n "s|^\(elf.*\):|\1|p" ` supports_elf_i386_sol2=`echo $supported_emulations | grep -w elf_i386_sol2 ` supports_elf_x86_64_sol2=`echo $supported_emulations | grep -w elf_x86_64_sol2 ` if [ "$supports_elf_i386_sol2" = "" ]; then *************** *** 242,249 **** PREFIX=/usr/local # Use GNU tar if present if [ "`which gtar`" != "" ]; then ! TAR=`which gtar` fi ;; *) # Install in /usr/local or /usr ? --- 242,251 ---- PREFIX=/usr/local # Use GNU tar if present if [ "`which gtar`" != "" ]; then ! CMDTAR=`which gtar` ! TAR="$CMDTAR --no-same-owner" fi + echo "Using TAR binary=$CMDTAR" ;; *) # Install in /usr/local or /usr ? *** fpcsrc/packages/gdbint/fpmake.pp.ori Mon Jan 4 14:56:10 2016 --- fpcsrc/packages/gdbint/fpmake.pp Mon Jan 4 14:44:59 2016 *************** *** 167,173 **** // file within the BeforeCompile event. P.SupportBuildModes:= [bmOneByOne]; ! P.OSes:=[aix,beos,haiku,freebsd,netbsd,openbsd,linux,win32,win64,go32v2,dragonfly]; P.SourcePath.Add('src'); P.IncludePath.Add('src'); --- 167,173 ---- // file within the BeforeCompile event. P.SupportBuildModes:= [bmOneByOne]; ! P.OSes:=[aix,beos,haiku,freebsd,netbsd,openbsd,linux,win32,win64,go32v2,dragonfly,solaris]; P.SourcePath.Add('src'); P.IncludePath.Add('src'); *** install/makepack Mon Jan 4 14:03:19 2016 --- install/makepack-64 Mon Jan 4 15:17:59 2016 *************** *** 30,37 **** # 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` # retrieve real OS. HOSTOS=`uname -s | tr "[:upper:]" "[:lower:]"` --- 30,40 ---- # 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` ! SOURCECPU=x86_64 SOURCEOS=`fpc -iSO | head -n1` + # Avoid cross-compilation from ppc386 + export FPC=~/pas/fpcbuild-3.0.0/fpcsrc/compiler/ppcx64-bootstrap # retrieve real OS. HOSTOS=`uname -s | tr "[:upper:]" "[:lower:]"` *** install/install.sh.ori Mon Jan 4 17:54:59 2016 --- install/install.sh Tue Jan 5 10:18:24 2016 *************** *** 206,213 **** # Here we start the thing. HERE=`pwd` ! OSNAME=`uname -s | tr A-Z a-z` ! case "$OSNAME" in haiku) # Install in /boot/common or /boot/home/config ? --- 206,213 ---- # Here we start the thing. HERE=`pwd` ! OSNAME=`uname -s | tr "[:upper:]" "[:lower:]"` ! echo "Using OSNAME=\"$OSNAME\"" case "$OSNAME" in haiku) # Install in /boot/common or /boot/home/config ? *************** *** 229,235 **** sunos) # Check if GNU llinker is recent enough, version 2.21 is needed at least GNU_LD=`which gld` ! supported_emulations=`"$GNU_LD" --target-help | sed -n "s|.*supported emulations:||p" ` supports_elf_i386_sol2=`echo $supported_emulations | grep -w elf_i386_sol2 ` supports_elf_x86_64_sol2=`echo $supported_emulations | grep -w elf_x86_64_sol2 ` if [ "$supports_elf_i386_sol2" = "" ]; then --- 229,235 ---- sunos) # Check if GNU llinker is recent enough, version 2.21 is needed at least GNU_LD=`which gld` ! supported_emulations=`"$GNU_LD" --target-help | sed -n "s|^\(elf.*\):|\1|p" ` supports_elf_i386_sol2=`echo $supported_emulations | grep -w elf_i386_sol2 ` supports_elf_x86_64_sol2=`echo $supported_emulations | grep -w elf_x86_64_sol2 ` if [ "$supports_elf_i386_sol2" = "" ]; then *************** *** 242,249 **** PREFIX=/usr/local # Use GNU tar if present if [ "`which gtar`" != "" ]; then ! TAR=`which gtar` fi ;; *) # Install in /usr/local or /usr ? --- 242,251 ---- PREFIX=/usr/local # Use GNU tar if present if [ "`which gtar`" != "" ]; then ! CMDTAR=`which gtar` ! TAR="$CMDTAR --no-same-owner" fi + echo "Using TAR binary=$CMDTAR" ;; *) # Install in /usr/local or /usr ?