On 21/06/15 14:58, Marco van de Voort wrote:
In our previous episode, patspiper said:
Compiling the following simple program (from fpc prog manual
http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46)
yields a linking syntax error:
Is this a bug?
Not of a general kind, since it works on most Linux distros. E.g. it works
fine on my debian jessie 64-bit.

So it must be something particular to your Linux installation or
distribution. So best is to tell something about that installation.
- I tried to link manually using the fpc produced link.res and got the same error.

- I removed the section INPUT(-l c) from link.res and linked manually (adding -lc as an option): /usr/bin/ld -b elf32-i386 -m elf_i386 --dynamic-linker=/lib/ld-linux.so.2 -L. -lc -o program1 link.res
Success!

I changed the following part in link.res:
INPUT(
-l c
)
to
INPUT(
-lc
)
and manual linking works!

So the issue is fpc producing link.res with a -l c instead of -lc. Which program specifically produces link.res?

Note: Newer ld built from source produces the same results.

Stephano
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to