Recent

Author Topic: Cross compile Win32/i386 -> AIX/PowerPc  (Read 6048 times)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674
Re: Cross compile Win32/i386 -> AIX/PowerPc
« Reply #15 on: January 22, 2016, 10:00:56 am »
The fpc.cfg file (located in binutils folder)
1) the compiler does not search for fpc.cfg in the binutils folder, but in the same folder as where the compiler binary is located
2) fpc.cfg is unused during a top level "make all". You have to pass all necessary options for cross-compiling to make via the command line parameter CROSSOPT="-XR/..."

Edit: originally I wrote OPT= above; replaced with CROSSOPT= since it is needed while building the cross target (AIX in this case) and not while building the "native" target (win32 in this case).

Quote
points to lib folder (inside the lib/crt0.o is located)
-XRc:\development\cross\lib\$fpctarget\*
-XRc:\development\cross\lib\$fpctarget

How to pass to ppcrossppc.exe the right -XR parameter?
By following the instructions at http://wiki.freepascal.org/FPC_AIX_Port#Cross-compiling exactly instead of by using multiple -XR parameters (there can be only one sysroot directory, see the help of the compiler for what it does), and do not add extra things to the -XR parameter mentioned there (the compiler replaces "$fpctarget" with "powerpc-aix", so you are telling the compiler that your sysroot directory is c:\development\cross\lib\powerpc-aix, which does not exist).
« Last Edit: January 22, 2016, 10:02:48 am by Jonas Maebe »

dextermd

  • New Member
  • *
  • Posts: 13
Re: Cross compile Win32/i386 -> AIX/PowerPc
« Reply #16 on: January 22, 2016, 04:32:59 pm »
Thanks to all, everything is fine now (at least for console applications on aix).
When compiling a GUI application, FCL compilation fails to compile with error: Illegal parameter -Taix

Isn't GUI for powerpc/aix supported?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674
Re: Cross compile Win32/i386 -> AIX/PowerPc
« Reply #17 on: January 22, 2016, 04:44:02 pm »
Thanks to all, everything is fine now (at least for console applications on aix).
When compiling a GUI application, FCL compilation fails to compile with error: Illegal parameter -Taix

Isn't GUI for powerpc/aix supported?
The FCL is not GUI. The LCL is GUI. I doubt that anyone has ever tried before to compile the LCL for AIX. The error you get however simply suggests that Lazarus is not calling your PowerPC cross-compiler (the AIX target only exists for PowerPC and PowerPC64, so other compilers will say that they don't know this target).

When reporting problems, you should always post the full output, otherwise people that want to help have to guess and that's not useful to anyone.

dextermd

  • New Member
  • *
  • Posts: 13
Re: Cross compile Win32/i386 -> AIX/PowerPc
« Reply #18 on: January 22, 2016, 04:53:47 pm »
Sorry, my mistake about posting the error messages, wont happen again.

I wrongly specified the CPU target family (forgot to set it to 'powerpc') - thanks for pointing it to me.
Now it's compiling.