From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125459 invoked by alias); 19 Aug 2019 08:56:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 125448 invoked by uid 89); 19 Aug 2019 08:56:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-101.7 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=wasteful, Agner, loader, Fog X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 08:56:17 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MBlgy-1i7Ix82w9c-00CAku for ; Mon, 19 Aug 2019 10:56:14 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id EF5D5A80770; Mon, 19 Aug 2019 10:56:13 +0200 (CEST) Date: Mon, 19 Aug 2019 08:58:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Clang is using the wrong memory model Message-ID: <20190819085613.GI11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20190816082603.GR11632@calimero.vinschen.de> <8d594f4d-17e0-447a-8b18-1ed620815e0f@agner.org> <20190816095200.GU11632@calimero.vinschen.de> <2024f551-66e6-47c5-a0b6-2dfa735a690d@agner.org> <20190816111133.GV11632@calimero.vinschen.de> <6008d30a-cd6c-5449-2933-a041e804856c@agner.org> <20190817081605.GX11632@calimero.vinschen.de> <17081147-f46a-51bf-65e9-3df7748b1780@agner.org> <20190818115739.GD11632@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xEUC5fB8Sf//E0AF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00270.txt.bz2 --xEUC5fB8Sf//E0AF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1307 On Aug 18 18:24, Agner Fog wrote: > On 18/08/2019 13.57, Corinna Vinschen wrote: > > Nope, Cygwin uses the Windows loader. >=20 > Then, how do you do the extra linking? What is producing the "Cygwin runt= ime > failure" message when loading/linking a DLL fails? >=20 > > If the medium model is wasteful in clang, that's a clang > > optimization problem, not a Cygwin problem. >=20 > The medium model in Clang is not wasteful. Your words: * The memory models work differently in gcc an Clang. Gcc with a medium or large memory model is using 64-bit address tables to access a variable in a different C/CPP file. Clang with a medium or large memory model is using 64-bit addresses not only for external variables, but also for local static data. This includes floating point constants, string constants, array initializers, jump tables, global variables, and more. > designed to do. It was never designed with Cygwin in mind. That's not Cygwin's fault, is it? You're asking to change the system to pamper the compiler, rather than asking the compiler to work better for a given system. That's not how this usually works.=20=20 Make sure that clang uses the medium memory model by default. If clang is doing this inefficiently, clang needs fixing. Corinna --=20 Corinna Vinschen Cygwin Maintainer --xEUC5fB8Sf//E0AF Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1aZC0ACgkQ9TYGna5E T6AEAxAAhrHr+816UQug0dBUQrCl95fow9/QywdZVZ/Ia8bF6cAkinHYry0KVwuz FMktQTE9jZQuiU3wLlqDSOowpKYLykJCDBK05L9IRilZi7oA1Q/nnQc1VTiFwPxB ZtPOcpLD8b/yX41bHzjMGH7n8zRvzDlysETlQf2b3h3KqzZzpxcD5aBZcSHjYJhT AlLBLPZncdbuQHoSeBUbQW9F8BlGHL2k6LjIornnnTrOMKb4B3npAxL5Vr6uhp20 wFA0ygjLalUlJeVZlqtvrxkK9zTvlYX1IQpatOZIILgvg8bN7Iqqe5baBOVosXdH 4X80Ht4fndJNsDQWnnoY2EyWbSa9BGlEeS9WdPlo5LcK1lYLkMW8iAkteoy4rYro n49Kx38cI1LuEiDqqcHBy2yOvYiu6g/ooA9nZWoEg0/m68uEpSSeREokAAzLMrTL nmExe9BTWmyyVX+uX4b5AkTnpW2KUaMCgRCYQVwpDxGzTcjooFJSaF+J6BysSCea mYirlQN1CHvDcv9feF1LEgLFhOlSogqNUGmcmrnYH0sPSpMK0zvuJ3B/x1ttZZC+ 5M6Gsqsj9D6Wwu6ZL4l6HW2hUOPTxCN2sHj8sPT4Xi7cS2Yl7U7FFebjqdS+PBEm mulF9GS+PETjakpeBREUiqFOVB430hDpoQcDGUOIB0g0ziD9Y6E= =Wdyi -----END PGP SIGNATURE----- --xEUC5fB8Sf//E0AF--