From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by sourceware.org (Postfix) with ESMTP id 07265385E03F for ; Mon, 23 Mar 2020 09:43:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 07265385E03F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-zH_HQTY_NGClj5gzW4mVIg-1; Mon, 23 Mar 2020 05:43:13 -0400 X-MC-Unique: zH_HQTY_NGClj5gzW4mVIg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EDFD3190D341; Mon, 23 Mar 2020 09:43:11 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-22.ams2.redhat.com [10.36.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82D3F7E30C; Mon, 23 Mar 2020 09:43:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 02N9h9fu022295; Mon, 23 Mar 2020 10:43:09 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 02N9h8Hb022294; Mon, 23 Mar 2020 10:43:08 +0100 Date: Mon, 23 Mar 2020 10:43:08 +0100 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Check endianess detection. Message-ID: <20200323094308.GD2156@tucnak> Reply-To: Jakub Jelinek References: <82f5cda2-97f4-039e-5094-c528b220eb78@suse.cz> MIME-Version: 1.0 In-Reply-To: <82f5cda2-97f4-039e-5094-c528b220eb78@suse.cz> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-20.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Mon, 23 Mar 2020 09:43:16 -0000 On Mon, Mar 23, 2020 at 10:25:32AM +0100, Martin Li=C5=A1ka wrote: > Hi. >=20 > As seen in the PR, sparc64 LTO test-suite fails due to missing > definition of __BIG_ENDIAN__ macro. That said, I updated the > endianess detection to use __BYTE_ORDER__. >=20 > I tested the detection on x86_64-linux-gnu, ppc64-linux-gnu and > lto.exp testsuite survives on a sparc64-linux machine. Those are GCC specific macros, are you sure plugin-api.h will be always compiled just with GCC and no other compiler? You can use them but should be prepared for some fallback (e.g. endian.h, whatever else). And there is also PDP endian... =09Jakub