:: Re: [DNG] Why C/C++ ? or any other …
Góra strony
Delete this message
Reply to this message
Autor: David Billsbrough
Data:  
Dla: Didier Kryn
CC: dng
Temat: Re: [DNG] Why C/C++ ? or any other legacy language
You wrote:
 
>    Sorry but I don't understand at all the meaning of your mail and what conclusion you draw    (~;

 
Hello Didier,
 
The very 'challenge' in which I was trying to reference was just that!  How hard in *time* and/or *effort* to get a running version
of GNU Ada (gnat) on a machine that I have access to:
 
On one 'VPS' in the cloud a Ubuntu LTS image, I installed a 'package' with apt and had the version previous posted
running in 15 minutes that include search to Inter_webs for a 'hello world' example to compile.
 
On another 'VPS' in the cloud a FreeBSD 13.1 image, I installed a *package* with 'pkg' and had a working version of
GNU Ada (gnat) 12.2 version running but had to manual create a few symbolic links as its bin directory was not in
my default path for my working user account.
 
On another virtual machine (Oracle VirtualBox) image of Devuan 5, I was able to quickly install GNU Ada (gnat)
using 'apt' and compile the same hello example and after striping a ELF executable file it was '30912' bytes in size.
 
Compare that to a 'hello world' program in *golang* this executable file is down right *skinny*!
 
I could and have used 'nasm' and created an 'elf' executable file in the neighborhood on less than '4000' bytes but
little more knowledge to both Linux or FreeBSD kernel *syscalls* are required for i386/x86_64 assembler.
 
 
regards,
 
David
--
David - KC4ZVW
Chuluota, FL
 
 

Sent: Sunday, August 11, 2024 at 6:28 AM
From: "Didier Kryn" <kryn@???>
To: dng@???
Subject: Re: [DNG] Why C/C++ ? or any other legacy language

Le 10/08/2024 à 23:48, David Billsbrough via Dng a écrit :
With much referencing legacy languages and manuals, I had to check out
how long to get a working compiler to test out on a current Linux
installation. It sounded like a challenge:

<gnat installed>

kc4zvw@www:~$ gnat --version
GNAT 10.5.0
Copyright (C) 1996-2020, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

kc4zvw@www:~$
    Sorry but I don't understand at all the meaning of your mail and what conclusion you draw (~;
    About challenges with Gnat, I addressed around 2012 the challenge of building a GCC with Ada, C and C++ support, native arch-wise, but linking against Musl-libc and itself statically linked against Musl libc. It first needed a cross-compiler, to build the native one. It took me months, and the cpu power of a Dell server, mostly because I'm not an expert of GCC, but also because the Gnat runtime library contained hacks into the GNU libc. But I succeeded.
    I imagine it is possible to compile the front-end separately, since it is packaged separately in Debian, but this is not described in the GCC manuals; instead, they suggest to just list the languages you want. Of course C and C++ were necessary for the cross-compiler, since GCC itself is written in C and C++.
    There was still a litle trick missing in my compiler: making it link the libc statically by default. Gnat links by default all libraries statically, except the libc, which is a "feature" of glibc. I couldn't get any help from the GCC devel mailing list: nobody answered.
--     Didier
_______________________________________________ Dng mailing list Dng@??? https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng