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]
[+]
[-]
/
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
/
usr
/
bin
/
ld
:
cannot find
/
usr
/
lib
/
gcc
/
x86_64
-
linux
-
gnu
/
4
.
9
.
2
/
libgcc
.
a
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]
[+]
[-]
# path
to
the gcclib
#ifdef cpui386
-
Fl
/
usr
/
lib
/
gcc
/
x86_64
-
linux
-
gnu
/
4.9
/
32
#endif
#ifdef cpux86_64
-
Fl
/
usr
/
lib
/
gcc
/
x86_64
-
linux
-
gnu
/
4.9
#endif
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