Search found 197 matches

by TeeEmCee
Oct 29, 2017 14:02
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 150

Re: OpenBSD porting work

Yes, as an example, many of the existing include files distributed with FB were generated with SWIG. dkl has been replacing them with new headers generated with fbfrog, which has resulted in some breaking changes, but the results do seem better. The crt/system headers are still SWIG+hand written. Th...
by TeeEmCee
Oct 28, 2017 14:05
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 150

Re: OpenBSD porting work

Thanks for that link. dkl's fbfrog does automatic 'parameterisation': it combines multiple versions of include files from different OSes into one, spliced with ifdef's. I think it can merge multiple FB headers in a separate step after they've been translated individually, but I'm not sure. If so, th...
by TeeEmCee
Oct 28, 2017 12:21
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 455

Re: FreeBASIC OpenBSD package

Does FB 1.05 work on FreeBSD if you manually force -asm att, like for OpenBSD? I would guess yes, but didn't try it. Maybe that there are almost no users (are there any aside from me?) for that reason and that there are no official releases and it's not listed as supported. I had a quick look at the...
by TeeEmCee
Oct 27, 2017 15:17
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 455

Re: FreeBASIC OpenBSD package

OK, I created a new thread for discussing the porting details. Better to discuss in the open rather than email, as there are other people working on related FB ports like Mac and FreeBSD, aside from you and I. FB does intend to officially support OpenBSD. The fact that OpenBSD and other OSes aren't ...
by TeeEmCee
Oct 27, 2017 15:16
Forum: Linux
Topic: OpenBSD porting work
Replies: 4
Views: 150

OpenBSD porting work

This thread is split off of FreeBASIC OpenBSD package to discuss work to properly support OpenBSD. I downloaded an OpenBSD install disc but don't have time to install and play around for a few days. On OpenBSD, this compiler happens to be named egcc, as to not conflict with some architectures that h...
by TeeEmCee
Oct 25, 2017 10:22
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 455

Re: FreeBASIC OpenBSD package

Thank you! I was just looking into creating a FreeBSD portfile yesterday, and will base it off of yours. # All they seem to support. ONLY_FOR_ARCHS = amd64 i386 arm and aarch64 targets are supported. I'm not really clear how different ARM CPUs and ABIs are handled (fbc only understands the names arm...
by TeeEmCee
Oct 16, 2017 22:41
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

Those functions are in crt/io.bi rather than direct.h FPC has a strong module system, and regardless of backend (can be JVM, can link to objective C etc) or object format, there is always a precompiled header per module with such info (.ppu), and all modules must be compiled (and their info loaded) ...
by TeeEmCee
Oct 16, 2017 14:35
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

But that requires actually having a list of module initialisers. The gas backend could do that by embedding metadata in object files which is then read at the linking stage. But to do that in the gcc backend without inspecting the object files (eg for constructor functions which are recognisable by ...
by TeeEmCee
Oct 15, 2017 22:10
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

FBRT0.bas: to write this as pure FB, then would have to add an __attribute__() type feature in to FB. ... But even with C this is non-standard and not completely portable as DJ handles global ctors/dtors in DOS differently than on win/*nix. Quite possible that unknown future targets will be differe...
by TeeEmCee
Oct 15, 2017 11:58
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

What, really? I've never heard of delegating something like that to the kernel on Unix, though I would expect memcpy on Windows to just call the equivalent routine in user32.dll (which is still user-mode, not part of the kernel). It seems crazy to do a syscall for an optimised memcpy, since that add...
by TeeEmCee
Oct 15, 2017 0:36
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

There are several mistakes in your memcpy. > grep "dim.*__fb_ctx" *.bas init.bas:dim __fb_ctx as FB_RTLIB_CTX str_format.bas: dim as FBSTRING ptr dst = @__fb_ctx.null_desc Other functions like fb_hListInit don't exist (grep fb_hListInit *.bas). That's because fbrtLib is mostly incomplete. ...
by TeeEmCee
Oct 14, 2017 13:52
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

Sorry, you can't simply include a couple source files from the library and expect it to work. Those files have dependencies on many other files, and on libc, as you noticed. Quite a lot of the minimum code that needs to be linked is related to initialising the console, actually, so that PRINT can wo...
by TeeEmCee
Oct 14, 2017 0:21
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

Damnit, I forgot to actually add the makefile to git! Sorry about about; I made another pull req for it. There's a lot of stuff in FB's makefile that I left out, in particular most OS-specific stuff, including support for building for DOS. It can be added back later. But I guess actually targetting ...
by TeeEmCee
Oct 13, 2017 13:14
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

OK, I got it to compile and run on linux-x86 after fixing some bugs. Should work on win32 too, if you have the prereqs for compiling libfb itself there (I don't, but aside from that, crosscompiling seemed to work). I copied out some parts of FB's makefile and modified it to prefer .bas files over .c...
by TeeEmCee
Oct 06, 2017 13:59
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3203

Re: Pure FB Runtime Library (in progress)

Just to double check: were you only using 'integer' where the original C used 'int'? Or were you also using integer in other places? Because, where 'integer' is used on the FB side (eg in tables of rtlib functions in the compiler), the rtlib uses ssize_t. So I guess you could do a replacement of all...

Go to advanced search