In our previous episode, Pierre Free Pascal said: > I tried to get i386-openbsd port up to date,
I had a openbsd 4.8 VM lying around, so I tried my usual cross bootstrap routine (I'm lazy, you don't need crossbinutils on BSD systems since they can run the linux bootstrap compiler) What I did (preparation): 0. checked out the repo on the openbsd VM 1. compiled a linux compiler on linux with -dCMEM, this so that the binary has a decent ELF "ident" section 2. Copy it over to the openbsd VM. chmod +x 3. ran sysctl kern.emul.linux=1 as root to enable linux emulation 4. ran "pkg_add fedora_base" to install basic userland 5. ran "pkg_add gmake" to install GNU make 6. modified rtl/openbsd/makefile to also compile cmem 7. ran gmake PP=~/linux-bootstrap-with-cmem-ppc386 OS_TARGET=openbsd BINUTILSPREFIX="" OPT=-gl in rtl/openbsd to build rtl First I tried to build the compiler straight: gmake all PP=~/linux-bootstrap-with-cmem-ppc386 OS_TARGET=openbsd RTL=/fpc/fpc/rtl/units/i386-openbsd OPT="-gl" BINUTILSPREFIX="" this yields a compiler that gives an exception in readdir (if I try to compile) or options.readparameters with no parameters. If I run with -i or -h, the usual output appears with a crash in SYSTEM_REMOVE_FIXED_CHUNKS following it, which I assume is a heapmanager function calling munmap? I then tried to build with CMEM (same line as above but with -dCMEM added to OPT) to work around potential memory allocation problems, but that didn't link on a bunch of operating_system_* missing symbols (envp/argv/argc), so I assume its startup code wasn't fixed. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel