I see... But then, these files should be excluded from the default lazarus build:
# find /var/tmp/portage/dev-lang/lazarus-9999/work/lazarus -name "*.pp" -exec grep -l libc {} \;
/var/tmp/portage/dev-lang/lazarus-9999/work/lazarus/ide/compileroptions.pp
/var/tmp/portage/dev-lang/lazarus-9999/work/lazarus/components/printers/unix/cupsdyn.pp
/var/tmp/portage/dev-lang/lazarus-9999/work/lazarus/debugger/gdbmimiscclasses.pp
As I understand, this needs to be fixed in order for the current lazarus to be built on amd64. Any tips, where I should look to fix this?
Three possibilities:
1. it is wrong in Lazarus mainline. But this is very unlikely, since people use it everyday, also on amd64, and sb would have noticed
2. It is wrong in the port(age) version. IOW something went wrong when the distribution took the stock FPC/Lazarus source and adapted it to portage, and didn't test AMD64 properly. Use your distributions bugtracker to report this.
3. Lazarus somehow recycled old settings (e.g. due to a homedir restored from a 32-bit system), and the amd64 recycled it. Backup and erase your ~/.lazarus directory and try again.