Deutsch   English   Français   Italiano  
<vi1psa$2ot8i$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: else ladders practice
Date: Mon, 25 Nov 2024 12:17:13 +0000
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <vi1psa$2ot8i$1@dont-email.me>
References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org>
 <vhkr9e$4bje$1@dont-email.me> <vhptmn$3mlgf$1@paganini.bofh.team>
 <vhq6b4$17hkq$1@dont-email.me> <vhqm3l$3ntp7$1@paganini.bofh.team>
 <vhso61$1o2of$1@dont-email.me> <vhtrns$71ic$1@paganini.bofh.team>
 <vhtvvc$1ukc7$1@dont-email.me> <vhuc2j$7s5i$1@paganini.bofh.team>
 <vhv5m4$27sco$1@dont-email.me> <87wmgsmme0.fsf@nosuchdomain.example.com>
 <vi03n5$2c7jl$1@dont-email.me> <87sergmhkc.fsf@nosuchdomain.example.com>
 <vi0enr$2el9e$1@dont-email.me> <vi1mjh$i0ht$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Nov 2024 13:17:14 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c80a36c81a7479915291e305ba49d1d4";
	logging-data="2913554"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/w8f76pJ8Ue1Uzwcj9afTG"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:yCvWP3mK+GCkdx3mUbiB5zoKDh0=
In-Reply-To: <vi1mjh$i0ht$1@paganini.bofh.team>
Content-Language: en-GB
Bytes: 4330

On 25/11/2024 11:21, Waldek Hebisch wrote:
> Bart <bc@freeuk.com> wrote:
>>
>> This seems to be a thing with Linux, where a big chunk of a C
>> implementation is provided by the OS.
>>
>> That is, standard headers, libraries, possibly even 'as' and 'ld'
>> utilities. On Windows, C compilers tend to be self-contained (except for
>> Clang which appears to be parasitical: it used to piggy-back onto gcc,
>> then it switched to MSVC).
> 
> You know that at source level there are separate projects: gcc proper,
> binutils and libc.

Actually, no I don't. I said more on this in my reply to Keith a short 
while ago.

My experience of C compilers on Windows is that they provide a means to 
turn .c files into executable files. Such a compiler on Windows 
generally has to be self-contained, since very little is provided by the OS.

How the source code is structured, or how it's organised internally, is 
of little concern to me. My source code for cc.exe is also structured 
into different components, but I don't expect users to know or care 
about that.

Those terms are simply how Linux (and Unix I guess) has decided a C 
compiler should be organised.

So from my point of view, gcc is the outlier.

(See: https://github.com/sal55/langs/blob/master/CompilerSuite.md

This describes my current set of tools. Each .exe file is 
self-contained; no other program and no other file is needed to get from 
the input to any of the outputs.

Processing some outputs may need one of the other programs or an 
external tool, but that is by choice. Both mm.exe/cc.exe can go straight 
to EXE without any help.

The only thing not included in cc.exe is windows.h, because it is so 
massive.)

> libc provides C library, however header should
> be matched to the library, so libc also provides headers.

There is no header that I can see for Windows' msvcrt.dll C runtime. 
(There was/is a Windows SDK, but that is a massive product mostly to do 
with WinAPI.)


> Linux has distributions, which beside bare OS provide a lot of packages.
> Binary C library is used by almost all programs so is provided even
> in minimal install.  Linux has package managers, so everyting you
> install may be split into small packages, but for user it is just
> knowing few crucial names, package manager will install all
> dependencies.
> 
> AFAIK Windows alone does not have a package manager and you apparently
> reject package managers provided by third parties.  So the only
> viable approach is to install big bundle ("self-contained compiler").

Other C compilers I've used on Windows (excluding monsters like gcc, 
clang, msvc) either have their own install routine or the process is 
trivial, such as extracting files from a ZIP file.

Mine doesn't even need installing: you just run the EXE from anywhere!