Forum > General

Bootstrapping

<< < (2/3) > >>

Thaddy:

--- Quote from: funlw65 on November 16, 2022, 11:24:54 am ---Bootstrapping should be a common knowledge for the one that bases his entire cross-platform work on pascal (and especially on a specific version of freepascal). A pascal compiler that can't be compiled with the C compiler (freepascal killed gnu pascal).

--- End quote ---
Can you explain relevance? Freepascal is, just like some but not all C compilers, a self-compiling compiler. I am a bit bemused that you draw in C.
(GNU Pascal is not a very good example, since it is a compiler that can not compile itself and relies on C, hence it got dumped...)

marcov:

--- Quote from: funlw65 on November 16, 2022, 11:24:54 am ---Bootstrapping should be a common knowledge for the one that bases his entire cross-platform work on pascal (and especially on a specific version of freepascal).

--- End quote ---

Because?


--- Quote --- A pascal compiler that can't be compiled with the C compiler (freepascal killed gnu pascal).

--- End quote ---

No, being gcc based killed GPC. It was simply too hard to work with, and major version transitions of GCC were painful.

The authors gave those reasons in their exit message, and said they would opt for a compiler generating C/C++ written in C++ (and maybe later itself) if they had to start over.

Anyway since those years something has changed in FPC, since pas2js exists and also the JVM backend. You could use one of those as basis for a bootstrap.  But IMHO the whole problem is overrated.

funlw65:
I am very comfortable with Jalv2 compiler of JAL language for PICs, mainly because I can set a development workstation no matter the operating system. It is written in C language and can be compiled everywhere.

Not so much with Great Cow Basic, written in FreeBasic that is not available for all the operating systems. These two are the most complete open source compilers for PICs with a plus for GCB for AVR support. Both come also with their own assembler as gputils is behind regarding the support for the new arrivals.

This is just a minor example (to which I could add the case with the written books and tutorials that you trow away because it refers to old versions of languages that no longer work for your system).

For my needs, freepascal 3.0.4 is more than enough.  But is available for only a few operating systems. And I am interested in DragonFlyBSD for its mp support which is better than in NetBSD and OpenBSD and for its wonderful file system (Hammer/Hammer2). Sometimes, the ABI breaks in these UNIXes and you have to recompile all the applications (and repeat the bootstrap for fpc) and I want to be able to carry that version of pascal from version to version, without disturbing anyone. And without anyone knowing what I need and use (well, too late now) and for what.

For the C language that is affected in time by the change of C standards the solution is simple. I'm using TinyCC statically compiled under Linux with musl and I can stay with C89/C99 standards as long as I want.

Well, no rush as I wait for the Spring to come to set a dflybsd workstation...

PascalDragon:

--- Quote from: funlw65 on November 16, 2022, 09:44:00 am ---Is there a tutorial for bootstrapping  freepascal for a certain operating system?

--- End quote ---

For an unsupported operating system or one that is already supported but has no binary release?

For the former see this slightly outdated example (though more or less still valid).

For the later see - as marcov mentioned - the buildfaq. Though in short: you need suitable binutils for a host for which the compiler exists and then build it using


--- Code: ---make all OS_TARGET=<targetos> CPU_TARGET=<targetcpu> BINUTILSPREFIX=<prefix> CROSSBINDIR=<path>
make install OS_TARGET=<targetos> CPU_TARGET=<targetcpu> INSTALL_PREFIX=/path/for/install
--- End code ---

<targetos> and <targetcpu> are the names of the OS and CPU for your desired system respectively, <prefix> is the prefix that the binutils use (e.g. aarch64-elf-), <path> is the path where the binutils reside (if they aren't located in $PATH, in that case you can leave out that option) and /path/for/install is where you want to copy the installation to before you move it over to your real operating system.


--- Quote from: funlw65 on November 17, 2022, 02:34:14 am ---For my needs, freepascal 3.0.4 is more than enough.  But is available for only a few operating systems. And I am interested in DragonFlyBSD for its mp support which is better than in NetBSD and OpenBSD and for its wonderful file system (Hammer/Hammer2).
--- End quote ---

Seems like no one was interested enough to create a binary distribution for DragonFlyBSD.


--- Quote from: funlw65 on November 17, 2022, 02:34:14 am ---Sometimes, the ABI breaks in these UNIXes and you have to recompile all the applications (and repeat the bootstrap for fpc) and I want to be able to carry that version of pascal from version to version, without disturbing anyone. And without anyone knowing what I need and use (well, too late now) and for what.
--- End quote ---

Sometimes source adjustments are necessary however as was recently the case with FreeBSD. Then a simple recompile won't help.

DonAlfredo:
Sidenote about DragonFly.
Various bootstrappers for dragonfly can be found here: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/bootstrappers_v1.0
Fpcupdeluxe for DragonFly can be found here: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.2.0n/fpcupdeluxe-x86_64-dragonfly

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version