From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23392 invoked from network); 29 Mar 2021 15:08:46 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2021 15:08:46 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob21.topicbox.com (Postfix) with ESMTP id D373B29504 for ; Mon, 29 Mar 2021 11:08:43 -0400 (EDT) (envelope-from bounce.mMae8386c3c15f3973027b8de6.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 9AAAF1E76816; Mon, 29 Mar 2021 11:08:43 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=fOZKn1tf header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-pl1-f169.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1617030523; bh=KLOMHyA6tLcW+4Vt QB/P7ngdS28P2HuvPd9wcgOHLYY=; b=ENf8he5wn1J3i8hjgyP3J9ADNP73Kcmg cQAq4JbFbiAE78vassDtQNvllIY2Lvj7cS0HDuRjh9oIUhXZ8zPyXR1XwtpBSILo MqE6297bbtxplogPhxjZmCs+OotmLy6csyGNwzlviC46QBMo98+5MGVS9UMmA6A5 t1W7fWa9IPg= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1617030523; b=Orz8feprbM0hSqJXjEpfYCsaRvaLfXGQN9MGqfrTMHspyVLkjg iKXkJJnp0zRo2ED2S1byXB4lsQnX95e5LjGP5bByGNA6Ud1LWkm4iWVHIFZYrnrN TKDn3lBhn19Uy6gehJl52m55OM4lZU3DCMd8a81t2s5vnXrZ8qiNqIWIY= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=fOZKn1tf header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-pl1-f169.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=fOZKn1tf header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.214.169 (mail-pl1-f169.google.com); spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-pl1-f169.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=h9zdxIZU; x-me-sender=none; x-ptr=pass smtp.helo=mail-pl1-f169.google.com policy.ptr=mail-pl1-f169.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=6sk/7GfmC+Nxz+0uG3iCv3E1Oly3tbAHNAb5hR4zQio=; b=gWg5JvwD+hZL ekjF+Edl4MP39qEIlcAh2FqoCj9yr+e11TQk6sb2OAGeFZ4uTIaOy780FEWex0gs fBpAV2vIu+OXOxJGtndHuX/0DgvrhdPQTCXvFNeDjIf+vqGFHvKbH2YeG/OlzU+3 pcDJcDWyePjJ39r7Y9nHTZsv3DXzrso= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 0BD5D1FFA7CF for <9fans@9fans.net>; Mon, 29 Mar 2021 11:08:30 -0400 (EDT) (envelope-from charles.forsyth@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 63440BE3713; Mon, 29 Mar 2021 11:08:30 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1617030509; b=ePNjVXNvWFT1nXbd1+G7+SNHovAxCX3lMZekgQrCscPJ1DYZbJ 2fs7PA2htXsssElhp1pJefUilSANNsn5Z7Fec+2Qp3lLE8gcCnDabByUGim0NKkz u+cIn2WGYBBpeesNwQvWNXLEI3l9ncPPHgvBtMcKUIrLtVQMzO8dRwHJppBC4E6K YD+umrNln7FPYCYfpXuCXJyjJq4mrA1bmY+nprLFbiOiEFrkGj1XVvZzX5alvH63 sOmjfcw7n6vrvmgH9POzTz/zn9RAhj8AXn47LdPzT6Gtp8VfryvRpCO0S4SRSs+T ggPEsaW8P3Yg12NXW2MAh46/5FEQjMnMxdZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1617030509; bh=zHqvx7mZLJfATitcnEHtOfMH/4g7QRJeeqAl5Q7RpZo=; b=DlZ5sFYPZkBV +DeFBDYJStMgMlwL8VIJlM9q3gH3hhE1FgfwqWGdGyq+vd8V/1iZy640/WRTq9xX J+CjW8jjbKAgPT35UHamps7gtmHg0HTJdVLJfEntsgUZfvw2tQ171xylvBvlMcT/ yO2cQeStytbwZ2ZXrlr6jrmFQhPMeCqOd+SLind/fBLNad3DnhaeahlcJld5o75w iWh7PnocG2JhZWa05MPy5Ertw7n/s7lb0geb6e+jJPD39PP8hvVN0zO4WknOx0CH fteNNPAltW2h2VsBJo4mTp22Lo9cxXbhDNVK5Bsdz+CJ9Ym8dkGe0O3fTMQKjF5x JC24ic8KyQ== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=fOZKn1tf header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.214.169 (mail-pl1-f169.google.com); spf=pass smtp.mailfrom=charles.forsyth@gmail.com smtp.helo=mail-pl1-f169.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=h9zdxIZU; x-me-sender=none; x-ptr=pass smtp.helo=mail-pl1-f169.google.com policy.ptr=mail-pl1-f169.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeduledrudehiedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepgghfjg fhfffkuffvtgesrgdtreertddtjeenucfhrhhomhepvehhrghrlhgvshcuhfhorhhshiht hhcuoegthhgrrhhlvghsrdhfohhrshihthhhsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeeluefhteegffektefhfeffhfelhfdttdeuleehvdelffetledvtdevtdek vddtleenucffohhmrghinheplehprdhiohenucfkphepvddtledrkeehrddvudegrdduie elnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddtledrkeeh rddvudegrdduieelpdhhvghlohepmhgrihhlqdhplhduqdhfudeiledrghhoohhglhgvrd gtohhmpdhmrghilhhfrhhomhepoegthhgrrhhlvghsrdhfohhrshihthhhsehgmhgrihhl rdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'charles.forsyth@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="charles.forsyth@gmail.com"; helo=mail-pl1-f169.google.com; client-ip=209.85.214.169 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Mon, 29 Mar 2021 11:08:29 -0400 (EDT) (envelope-from charles.forsyth@gmail.com) Received: by mail-pl1-f169.google.com with SMTP id l1so4528589plg.12 for <9fans@9fans.net>; Mon, 29 Mar 2021 08:08:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=zHqvx7mZLJfATitcnEHtOfMH/4g7QRJeeqAl5Q7RpZo=; b=h9zdxIZU4VZDbYBqexAgrXOXhsXFnI5SriiXsFPr67ij3TkuJRF7qkHxTzqlFpQzai jA0ad9/4SAtVHhzL46Rpq5jEfSF9Bij3i5aGMv/PUq0HzLEJxkdAbxCIRaNS5srZdtx+ 9/yYsN2Mcc1g7/esrpiwdnExN50nJsgC5dd5bhcJp95jKmqtPg8LFhMw/CVeszG7XnGH qgTtjKHNyI+D34xmhmuG8G/SKy/eGwBLKGgWRukv9Uzkzdg3Zk8nk0r9nIfWv9W9+yP1 nSUysjwmINjYcdDS+Vg7tkoEuXu4vyKaZlVQp9tq4lKdUIRxIoUitJ5LdcQ13na8FjTO 1qbA== X-Gm-Message-State: AOAM533F84wY1FoRalsvBw9sAA2chGYLkMMLGRPFky5DmCCtKeJxbiL0 Y5nbqUnL6dnT89x9i131Rxs7oSwCQxRWhBiikfLwoMJEt/awWQ== X-Google-Smtp-Source: ABdhPJxF8fX1dI+mbyhsi43yjPA5tj1V/dDgcsNRker4Mg8EQH9MBTKA6krkYPgilUvyvlOit6hv28R5SKx9b/U5neQ= X-Received: by 2002:a17:902:7883:b029:e7:32bd:6b97 with SMTP id q3-20020a1709027883b02900e732bd6b97mr16685612pll.0.1617030508309; Mon, 29 Mar 2021 08:08:28 -0700 (PDT) MIME-Version: 1.0 References: <0f77c99c5130d1ce2fe33ab8c32db88a09ebfb12@hey.com> <202103291414.12TEEIJP004120@freefriends.org> In-Reply-To: <202103291414.12TEEIJP004120@freefriends.org> From: Charles Forsyth Date: Mon, 29 Mar 2021 16:08:17 +0100 Message-ID: Subject: Re: [9fans] Can compile Plan9 C compiler for windows10? To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary="00000000000009f0c005beae4157" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: a1cc0adc-90a0-11eb-ade7-a0a7efc2fd39 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNGQ3N2NjOTVhYjRlZDcwYy1NYWU4Mzg2YzNjMTVmMzk3MzAyN2I4?= =?UTF-8?B?ZGU2Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mae8386c3c15f3973027b8de6:1:Z8-9v13EPi_W8uNrONZbg8DYlkg9iSYoXWOp6_vE0xk --00000000000009f0c005beae4157 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > I doubt very much that using the Plan 9 C compilers will bring much > additional benefit for finding bugs (except bugs in the compiler!). The cross-file type-checking does sometimes pick up unpleasantness caused by type mismatches. It was originally added to allow dynamically-loaded object modules to be checked against the loading specification. It has found a few problems elsewhere, including one in Python where one .c file included a .h with a certain #define in scope that another .c file didn't define by accident, causing the two .c files to have completely different memory layouts for a structure. > Out of curiousity, why is linking against the system libraries so > hard? I assume a port of kenc to Linux would have a driver program > that would just invoke the system ld(1). I'd think that getting > the ABI and generation of ELF (or of standard Linux assembly language) > correct would be the hard part. > What am I missing? It works very differently from what you expect http://9p.io/sys/doc/compiler.html : The compiler is a single program that produces an object file. Combined in the compiler are the traditional roles of preprocessor, lexical analyzer, parser, code generator, local optimizer, and first half of the assembler. The object files are binary forms of assembly language, similar to what might be passed between the first and second passes of an assembler. Object files and libraries are combined by a loader program to produce the executable binary. The loader combines the roles of second half of the assembler, global optimizer, and loader. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T4d77cc95ab4ed70c-Mae838= 6c3c15f3973027b8de6 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --00000000000009f0c005beae4157 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I doubt very much that using the Plan 9 C compilers will brin= g much additional benefit for finding bugs (except bugs in the compiler!).<= /span>

The cross-file type-checking does = sometimes pick up unpleasantness caused by type mismatches.
It wa= s originally added to allow dynamically-loaded object modules to be ch= ecked against the loading specification.
It has found a few probl= ems elsewhere, including one in Python where one .c file included a .h with= a certain #define
in scope that another .c file didn't defin= e by accident, causing the two .c files to have completely different memory= layouts
for a structure.


Out of curiousity, why is linking against the system libraries so
hard?  I assume a port of kenc to Linux would have a driver program that would just invoke the system ld(1).  I'd think that getting the ABI and generation of ELF (or of standard Linux assembly language)
correct would be the hard part.
What am I missing?

It works very differen= tly from what you expect http://9p.io/sys/doc/compiler.html :

The compiler is a single program that produces an objec= t file. Combined in the compiler are the traditional roles of preprocessor,= lexical analyzer, parser, code generator, local optimizer, and first half = of the assembler. The object files are binary forms of assembly language, s= imilar to what might be passed between the first and second passes of an as= sembler.

Object files and libraries are combined by a loader= program to produce the executable binary. The loader combines the roles of= second half of the assembler, global optimizer, and loader. 

= --00000000000009f0c005beae4157--