* * *

Author Topic: How do check that the paths in fpc.cfg are passed to the linker?  (Read 395 times)

vfclists

  • Hero Member
  • *****
  • Posts: 822
    • HowTos Considered Harmful?
When compiling some  32bit programs on a 64bit system, the linker cannot locate paths which are in fpc.cfg

Code: Pascal  [Select]
  1. /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9.2/libgcc.a when searching for /usr/lib/gcc/x86_64-linux-gnu/4.9.2/libgcc.a
  2. /usr/bin/ld: cannot find /usr/lib/gcc/x86_64-linux-gnu/4.9.2/libgcc.a
  3.  

I can only  resolve it by linking /usr/lib/gcc/x86_64-linux-gnu/4.9.2/32/libgcc.a to /usr/lib/i386-linux-gnu although it is present in fpc.cfg.

Code: Pascal  [Select]
  1. # path to the gcclib
  2. #ifdef cpui386
  3. -Fl/usr/lib/gcc/x86_64-linux-gnu/4.9/32
  4. #endif
  5. #ifdef cpux86_64
  6. -Fl/usr/lib/gcc/x86_64-linux-gnu/4.9
  7. #endif
  8.  

Does cpui386 match all the architectures, iei386, i486, i586, i686?

Anyway back to the main question -  how do you check that all the paths specified in fpc.cfg are passed to the linker?

Windows - Lazarus 1.0.8/FPC 2.6.0
Linux - Lazarus 1.4.4 /FPC 2.6.4

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 556
Re: How do check that the paths in fpc.cfg are passed to the linker?
« Reply #1 on: March 20, 2017, 11:07:47 pm »
Compile with -Cn and inspect the generated ppas.sh and link.res files. You can also compile with -va to see how the compiler parses your fpc.cfg file.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus