From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id 47A70385DC01 for ; Wed, 1 Apr 2020 05:01:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 47A70385DC01 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hp@bitrange.com Received: by arjuna.pair.com (Postfix, from userid 3006) id A53658A69E; Wed, 1 Apr 2020 01:01:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id A44B88A65C; Wed, 1 Apr 2020 01:01:09 -0400 (EDT) Date: Wed, 1 Apr 2020 01:01:09 -0400 (EDT) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: "Maciej W. Rozycki" cc: =?UTF-8?Q?Martin_Li=C5=A1ka?= , Jakub Jelinek , GCC Patches , binutils@sourceware.org Subject: Re: [PATCH] PR lto/94249: Correct endianness detection with the __BYTE_ORDER macro In-Reply-To: Message-ID: References: <20200323103505.GF2156@tucnak> <6313e487-6dbb-ac17-4160-4ac600af40be@suse.cz> <7369b1aa-be0d-92cc-4f81-1612f101e2e8@suse.cz> <3786da05-1530-38c5-e9e2-cd69418cd42a@suse.cz> <5b27738a-9885-9906-0c93-888daf4a066f@suse.cz> <20200324083109.GP2156@tucnak> <20200324091805.GQ2156@tucnak> User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 05:01:11 -0000 On Tue, 31 Mar 2020, Maciej W. Rozycki wrote: > Correct an issue with GCC commit 906b3eb9df6c ("Improve endianess > detection.") and fix a typo in the __BYTE_ORDER fallback macro check > that causes compilation errors like: > > .../include/plugin-api.h:162:2: error: #error "Could not detect architecture endianess" > > on systems that do not provide the __BYTE_ORDER__ macro. > Index: binutils/include/plugin-api.h > =================================================================== > --- binutils.orig/include/plugin-api.h > +++ binutils/include/plugin-api.h > @@ -51,7 +51,7 @@ > /* Older GCC releases (<4.6.0) can make detection from glibc macros. */ > #if defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__ANDROID__) > #include > -#ifdef _BYTE_ORDER > +#ifdef __BYTE_ORDER > #if __BYTE_ORDER == __LITTLE_ENDIAN > #define PLUGIN_LITTLE_ENDIAN 1 > #elif __BYTE_ORDER == __BIG_ENDIAN FWIW, I was about to commit that as obvious, also the bignum.h inclusion thing! The only question being, how the typo passed any kind of testing in the first place... No actually, there's also the question why the plugin-API needs to bother with host endianness. It's not like endians are going to be different between plugins and gcc on host. brgds, H-P