Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-12

freebsd 12.1

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco van de Voort

I did some investigations on the FreeBSD problems yesterday, with some results:

FreeBSD 12.1 x86_64:

1 starting compiler 3.0.4 might misalign sections. Linker LLD simply silently fails to reads objects with non aligned sections. (32-bit? 64-bit? both?) -> always use BFD with starting compiler. 2 Don Alfredo: compile works with -dFPC_USE_LIBC: true but needs ld.bfd (because of (1)? tbt) -> FPC stat record definition doesn't change in that case. Maybe only syscall nr changed but not record definition? TBD/TBT 3 "old syscalls" I replaced lseek, mmap and ftruncate with newer variants (300 something) that seem to omit the zeroed registers. Result remains the same "can't find ../" I used a defined FREEBSDNEWSYSCALL for this (not committed yet, I don't have internet atm, this goes out via mobile) -> sounds like canocalization problem (fexpand). I see getcwd output in truss but they all return "0". Seems getcwd does a lot of calls to the same directory. -> disable getcwd usage and do it the old way tbt
4 tried truss but there are very few syscalls in the output. I don't trust the result very much. I see that it calls stat11, so stat syscall number is also old.

issues to be resolved:
- syscall port still doesn't work
- compiler needs parameter to force compiler to use ld.bfd or just ld. (or lld?) So probably setting name of linker in general. I don't like to use platform specific environment variables, as FreeBSD suggests. -

0. edit compiler/targets/t_bsd.pas. Go to method TLinkerBSD.setdefaultinfo and set "linkerprogram" to "ld.bfd"
1. install binutils
2. execute EXPORT PATH=/usr/local/bin:$PATH -> this puts ld.bfd in /usr/local/bin before the one in /usr/bin and can be used to overcome the 3.0.4 bootstrap problems. 3 make with OPT=-dFPC_USE_LIBC

Reply by email

Alfred
to Marco van de Voort

I just tested on GhostBSD (FreeBSD12).

Trunk from today compiled out-of-the-box.
With available FPC 3.0.4 bootstrapper.

ld -v shows
GNU ld (GNU Binutils) 2.32

Command:

Executing: gmake --jobs=1
PP=/usr/home/superdad/fpcupdtunk/fpcbootstrap/ppcx64 FPCMAKE=/usr/home/superdad/fpcupdtunk/fpc/bin/x86_64-freebsd/fpcmake PPUMOVE=/usr/home/superdad/fpcupdtunk/fpc/bin/x86_64-freebsd/ppumove FPCDIR=/usr/home/superdad/fpcupdtunk/fpcsrc
PREFIX=/usr/home/superdad/fpcupdtunk/fpc
INSTALL_PREFIX=/usr/home/superdad/fpcupdtunk/fpc
INSTALL_BINDIR=/usr/home/superdad/fpcupdtunk/fpc/bin/x86_64-freebsd OS_SOURCE=freebsd CPU_SOURCE=x86_64 OS_TARGET=freebsd CPU_TARGET=x86_64 REVSTR=43626 REVINC=force 'OPT=-Sg -vw-n-h-l-d-u-t-p-c- -Fl/usr/local/lib -Fl/usr/pkg/lib -Fl/usr/pkg/lib -dFPC_USE_LIBC' --directory=/usr/home/superdad/fpcupdtunk/fpcsrc all install (working dir: /usr/home/superdad/fpcupdtunk/fpcsrc)
gmake compiler_cycle RELEASE=1
gmake -C compiler cycle
gmake tempclean
gmake ppc3
gmake 'OLDFPC=' next CYCLELEVEL=1
gmake rtlclean
gmake -C /usr/home/superdad/fpcupdtunk/fpcsrc/rtl clean gmake -C freebsd clean
gmake rtl
gmake -C /usr/home/superdad/fpcupdtunk/fpcsrc/rtl 'OPT=-Sg -vw-n-h-l-d-u-t-p-c- -Fl/usr/local/lib -Fl/usr/pkg/lib -Fl/usr/pkg/lib -dFPC_USE_LIBC ' all
.......
.......
Installation package utils-pas2ut for target x86_64-freebsd succeeded Skipped package utils-rmwait which has been disabled for target x86_64-freebsd
Installing package utils-lexyacc
Installation package utils-lexyacc for target x86_64-freebsd succeeded Skipped package utils-unicode which has been disabled for target x86_64-freebsd
Installing package utils-pas2js
Installation package utils-pas2js for target x86_64-freebsd succeeded

Reply by email