From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by sourceware.org (Postfix) with ESMTPS id 7B130385B831 for ; Mon, 23 Mar 2020 17:41:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7B130385B831 Received: by mail-ot1-x344.google.com with SMTP id x11so2172817otp.6 for ; Mon, 23 Mar 2020 10:41:20 -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:cc:content-transfer-encoding; bh=G4w/tdfzh2akEo6ry4jJWodeNrc/mWy+MDQXCjDTKH0=; b=LglqbE7YHXOwdNqtEjr/KJmYXLFzZLsiNU7w8G0WvkEsUvlhwJxV1bDDwZGLNf+mlH fDNB/Ar0uvLynShGDFuvkzUDJCrUR3ZTmAsH3vXXDodpY4MyotYe9h4fbW5ex8njDAyg 3tH9vaqkXB4mh+Vmty3uKKT0LnJcXK6cnbAutfeGpVkT8pGWZif8HfOqKDrfX5xG38ac NP3E/cwkfjgbxkbLSjSIQ+gdyshVgP9XoauxX9UliDrbgGlE7PaOZQ0xhMKoOtI5VUJS 1xFMXEaeWSeIh8CoY+CTZ0yUg74vqDuee0RWFDh9YMN49Xr6UwfHf1cUr2VY644JJQNt UNmg== X-Gm-Message-State: ANhLgQ1+1BHoXeGua4IjFDH5kxBz1/Tzg/ShDh40vakyCSspWZFYZS75 oYf/TI5GwDxtTEGtPvdr7sJJLC0yZM4bHrbmInI= X-Google-Smtp-Source: ADFU+vs+pxdRft8FL/mt+IRS8qNLSpllQuXCp4vm/xAnF5jYmf2a1E3xi4UpU/tIp8rxe37deZbgJqRhLHI4VWsx19U= X-Received: by 2002:a9d:7dc4:: with SMTP id k4mr17820592otn.89.1584985279798; Mon, 23 Mar 2020 10:41:19 -0700 (PDT) MIME-Version: 1.0 References: <82f5cda2-97f4-039e-5094-c528b220eb78@suse.cz> <20200323094308.GD2156@tucnak> <20200323101025.GE2156@tucnak> <7a5da5ef-1f97-c273-ca22-7621c419f1c3@suse.cz> <20200323103505.GF2156@tucnak> <6313e487-6dbb-ac17-4160-4ac600af40be@suse.cz> <7369b1aa-be0d-92cc-4f81-1612f101e2e8@suse.cz> <3786da05-1530-38c5-e9e2-cd69418cd42a@suse.cz> In-Reply-To: <3786da05-1530-38c5-e9e2-cd69418cd42a@suse.cz> From: "H.J. Lu" Date: Mon, 23 Mar 2020 10:40:43 -0700 Message-ID: Subject: Re: [PATCH] Check endianess detection. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Richard Biener , Jakub Jelinek , GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 17:41:23 -0000 On Mon, Mar 23, 2020 at 10:17 AM Martin Li=C5=A1ka wrote: > > On 3/23/20 5:06 PM, H.J. Lu wrote: > > #if __has_include () > > ... > > #ifdef __BYTE_ORDER > > #if __BYTE_ORDER =3D=3D __BIG_ENDIAN > > ... > > > > We support V2 interface only if defines __BYTE_ORDER? > > Right now we rely on __BIG_ENDIAN__ which is a weak endianess detection. > So we either need a very robust endianess detection (as mention in this t= hread): > https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/int_e= ndianness.h I prefer this one. > or > > we'll come up with ld_plugin_symbol_v2 > > or > > we will shift values in 'int def' in order to support symbol_type and sec= tion_kind. > > What do you prefer H.J.? > Thanks, > Martin --=20 H.J.