Lazarus

Free Pascal => General => Topic started by: vfclists on March 20, 2017, 05:51:42 pm

Title: How do check that the paths in fpc.cfg are passed to the linker?
Post by: vfclists on March 20, 2017, 05:51:42 pm
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?

Title: Re: How do check that the paths in fpc.cfg are passed to the linker?
Post by: Jonas Maebe 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