From patchwork Sun Oct 29 21:15:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 23954 Received: (qmail 16290 invoked by alias); 29 Oct 2017 21:15:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 16271 invoked by uid 89); 29 Oct 2017 21:15:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:20171029211541, H*MI:20171029211541 X-HELO: mail-pg0-f46.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=3r62ncGZWZsOGsrlJ2UQXpSFiMfW1nyWC3CogxZ2lpQ=; b=WJNj5Mev7jExIB11VV45qakw3lbYMmCc+Q+saw7OqFIA3U/lLVRNSgHmLuFrRZO/jv xKggr/OJj8/+2kVdauqeLt3QNsnOmK69UYKTHTGqltPCsxtYGTxkOnyBVWAJf0h0+zXC shmcc+QDSsit/RXCuzT4Pvj8WqqJDdqmpdjmmh9NZlavBcLEQDKWZaebYoflMSIPF0cA uohSoxIw6IgafqJEJx7+sRdl8LwWJoAnV01Z0PsqkgdGT/e9UU7EXqQfMDZTa4N1tibv NLX9kzo1Z6NhjVQwwJO/Q1ODfGEj12l7Zi9bxhaDbzfb6ROm1W3D+i3trUAnjmb0miEf dAjg== X-Gm-Message-State: AMCzsaXJbAUg26lUqqLwM3ZEYBxjkgg7pEer1jhVgv5L23lcgf+f2Chc StCkqZJvUDaXwgmNyxQSx1kzrA== X-Google-Smtp-Source: ABhQp+Q5V1vJ58gtWAVWgi+jp8rInQ679LBiukVWYwi1rFN8EpdiYGyWE2Q+I110bIoUHgMK1HRu/g== X-Received: by 10.99.99.71 with SMTP id x68mr6024442pgb.334.1509311742691; Sun, 29 Oct 2017 14:15:42 -0700 (PDT) Date: Sun, 29 Oct 2017 14:15:41 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363] Message-ID: <20171029211541.GA6435@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) Set dl_platform to "x86_64" for x32 by default since kernel may set it to "i686". This fixed: FAIL: elf/tst-platform-1 on x32. Tested on x86-64 and x32. Any comments? H.J. --- [BZ #22363] * sysdeps/x86/cpu-features.c (init_cpu_features): Set GLRO(dl_platform) to "x86_64" by default for x32. --- sysdeps/x86/cpu-features.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 87aaa8683c..0ca29365ef 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -430,6 +430,11 @@ no_cpuid: if (platform != NULL) GLRO(dl_platform) = platform; +# ifdef __ILP32__ + /* Set dl_platform to "x86_64" since kernel may set it to "i686". */ + else + GLRO(dl_platform) = "x86_64"; +# endif } #else GLRO(dl_hwcap) = 0;