Recent

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

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • 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?

Lazarus 3.0/FPC 3.2.2

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
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.

 

TinyPortal © 2005-2018