Page 1 of 1

Setup of kos32-gcc

Posted: Tue Sep 18, 2018 12:04 am
by petersieg16
Dear all. I found: https://github.com/callcc/KolibriOS/blo ... /build.txt

For GCC it reads:
* For a GCC program, get the toolchain at
http://ftp.kolibrios.org/users/Serge/new/Toolchain/.

Under Windows, you need the package with "msys" in name and MinGW;
after installing MinGW, unpack the package to
\MinGW\msys\1.0\home\autobuild\tools\win32, the package assumes
exactly this path. Run MinGW shell.

Under Linux, you need the package with "linux" in name
and runtime library cloog; e.g. for Debian-based distributives
use apt-get install libcloog-isl4. Unpack the package to
/home/autobuild/tools/win32, the package assumes exactly this path.

In both MinGW and Linux, make sure that the command
/home/autobuild/tools/win32/bin/kos32-gcc
invokes the compiler.

If the program uses libraries, you will also need to either compile
them separately or download SDK, if they are included to SDK.
Compiling is ultimately a sequence of calls to kos32-gcc and kos32-ld,
but filling exact parameters can be tricky, so maybe you want to
use Tup - proceed to Q2/A2 - or Make, if a maintainer has provided
Makefile.

---
I have untared as described to /home/autobuild/tools/win32.

Where exactly to I unpack the SDK available also at same link/location mentioned in the build.txt? This important information is not mentioned in the text.
Where can one download a test package (any package - even DOSBox etc. pp), so that one can make sure than setup works and compiles as expected?
I also assume, that in the accompaning makefile, the above absolute path are referenced?

I am using Linux Mint 19 64-bit. (Also have 32-bit Notebook available).

BTW: compiling menuetlibc under Linux Mint 19 fails. Under 64-bit you have to instruct for 32-bit - but at the end, it fails at same location as if trying to build under 32-bit Linux.
I will report this tomorrow with error message in another thread. (But I don't know, if menuetlibc is still relevant - or is kos32-gcc environment the actual better way?)

Many thanks,
Peter

Re: Setup of kos32-gcc

Posted: Wed Sep 19, 2018 9:29 am
by Siemargl
Better to get SVN sources

Actual gcc standard library is newlib
http://websvn.kolibrios.org/listing.php ... Fnewlib%2F&

System call wrappers are in http://websvn.kolibrios.org/filedetails ... kos32sys.h

and i do some updates for tcc in
http://websvn.kolibrios.org/filedetails ... os32sys1.h

Re: Setup of kos32-gcc

Posted: Wed Sep 19, 2018 2:49 pm
by petersieg16
Hmm.. maybe someone can update build.txt to reflect actual build environment with a detailed step to step explanation?

All this bits and pieces of obviously outdated information doesn't make it easier from someone outside core team to get started ;-)

(I now have 2 weeks vacation )

Peter

Re: Setup of kos32-gcc

Posted: Wed Sep 19, 2018 7:57 pm
by Siemargl
petersieg16 wrote:Hmm.. maybe someone can update build.txt to reflect actual build environment with a detailed step to step explanation?

All this bits and pieces of obviously outdated information doesn't make it easier from someone outside core team to get started ;-)

(I now have 2 weeks vacation )

Peter
As i check now, you must download 2 files
x86_64-linux-kos32-5.4.0.7z - this is compiler
sdk-28-10-16.7z - this is Kolibri's compiled newlib and more other ported .a for 5.4

then you need includes from newlib sources - get they all with SVN
http://websvn.kolibrios.org/listing.php ... Fnewlib%2F

and after setting path'es just try to build example (may be need fix relative pathes)
http://websvn.kolibrios.org/listing.php ... 2Fhello%2F&
when use makefile.shared - you need full koliblri image (in VM for example), there is libc.dll
when use makefile.static - all needed libc fn's will be included in yours appl, so you can try run it in linux emulator

for ex $make -f makefile.static