From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 41A94398E414 for ; Tue, 2 Feb 2021 23:11:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 41A94398E414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: 3Sax/lmOa78uGZ8RtWL15ag60sCE5YDiYKuk1PhnutmUS62C0hPJ+3UaKDJFnBhJKyt9a89phU fUnTV9jHiOizDAZsviVBolhcY/8xG3Gez6ohS/GxvhRlaDErqw2zyn9k9suuPORnZXdHhtJh6m G9GzHCO+XOOQnJzuK7ZAP7o+auKuOhmVDn9DaVvLV3hA5YW+4bMd/xCn512jaUnncLNRRvTo5m EYs8m42YQupZOOSWplrpvvNhCU1Eb2FvV411/nupV51+L8yQyYTo3xgGHpOR6Fh0Pq2bMJAxGf zxQ= X-IronPort-AV: E=Sophos;i="5.79,396,1602576000"; d="scan'208";a="57697829" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 02 Feb 2021 15:11:18 -0800 IronPort-SDR: 1RBt7FeXg/gah5dpE1mkR8Vq0HscpZBYkNxQ2TFiahe7UuZM5O29wCHOcwgBFnNYuHHRcdjFPz P0vYYoyRfSKtQJ3PD78Ug6SmQcUEFsuKKIsdBix2qtkMT7n6llyQU1cedE4MZxPz4Vzi2XwP0T NHSJa9oJ3dG5DtcXPw/xGjBuWXsy8CfumbSPlGFbq4+CtY+mmd328MKEeydjSI/Pmf4DyxljF2 XnXFVzGyC9+hiz9d19hcazpDUAhUq2G3jVXuRuXI8srImuZtE6PoZOsxfJy+ZaR8qifGmpwX3i jNQ= Date: Tue, 2 Feb 2021 23:11:12 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: "H.J. Lu" CC: Subject: Re: [PATCH] x86: Require full ISA support for x86-64 level marker [BZ #27318] In-Reply-To: <20210202215112.1002416-1-hjl.tools@gmail.com> Message-ID: References: <20210202215112.1002416-1-hjl.tools@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3123.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2021 23:11:20 -0000 On Tue, 2 Feb 2021, H.J. Lu via Libc-alpha wrote: > Instead, we should require full ISA support for x86-64 level marker to > detect such case: > > In file included from ../sysdeps/x86/abi-note.c:28: > ../sysdeps/x86/isa-level.c:62:5: error: #error "Invalid ISAs for x86-64 ISA level v3" > 62 | # error "Invalid ISAs for x86-64 ISA level v3" > | ^~~~~ When does this error occur (what conditions for compilation / configuration of glibc)? It's definitely valid to build glibc with a compiler defaulting to any -march option valid for x86_64, including those between two ISA levels such as -march=sandybridge; that must not produce an error with default configure options, and must produce a glibc binary that does in fact execute correctly on the processor corresponding to the compiler default. It's OK for compiling glibc with -march=sandybridge to produce a glibc binary that does not contain ISA level markers, or contains ISA level markers that permit execution on some processors that don't have all the instructions used in the binary. It's not OK for it to fail to compile glibc, or to produce a binary that doesn't execute on Sandy Bridge. -- Joseph S. Myers joseph@codesourcery.com