From patchwork Mon Apr 6 13:24:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 38751 Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 80C5C385DC08 for ; Mon, 6 Apr 2020 13:24:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 80C5C385DC08 Received: by mail-pf1-x441.google.com with SMTP id v23so4612523pfm.1 for ; Mon, 06 Apr 2020 06:24:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=jTy5CxxyP6yha3e+kUqHDGoFMkHIVG6cTvzqLziSUZ8=; b=oooHzymEtAomo2hUo+fe9zEIfL1vjcdoDdLhL01Lyhp8ZHYNG/pdebsQ+agNVBAE+m XcFzo732fbOOuL1Sgqymk9vSyQv0l5S+mF92b18xOPx2bACV9y2i38ovMO02hpYyS9yf wNat1y0ayA8jN30A5ul2VyOZPVWNGrrH7kqVHs0LnGE0PviJsbNwSMA4bL9HsxCTV0Hs +gspeeI0+2ED/NBfjvNpcy43gfdA+iTFSfEKw1Ii6uKoQTagFxz77lPaksSGFgYWIpbw T/6XbBRKu2ZcMJNQX7DdmzN0Uu3A4gYXlwagERNwa5rHW/qyGincpewTHPMdnwDiSfDV fOOQ== X-Gm-Message-State: AGi0PuaJyBJqc3k6LQP/GjfnSEtkCgWYu/7U6kTuU3/obYEsVjQoYJlD CRBQllDqWapsO0ctVUalhm0AiYjH X-Google-Smtp-Source: APiQypJAEbQ77RVAZSH1UkclI++a3LctmeL9E+RpKU2U5b7hCgGWqgzh2lloph5jV23UDC5bM/ao4w== X-Received: by 2002:aa7:8517:: with SMTP id v23mr21425012pfn.250.1586179487394; Mon, 06 Apr 2020 06:24:47 -0700 (PDT) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id v5sm11595617pfn.105.2020.04.06.06.24.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 06:24:46 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 0323FC035E for ; Mon, 6 Apr 2020 06:24:46 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH] i386: Disable check_consistency for GCC 5 and above [BZ #25788] Date: Mon, 6 Apr 2020 06:24:45 -0700 Message-Id: <20200406132445.2343799-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-25.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, 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: 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: Mon, 06 Apr 2020 13:24:51 -0000 check_consistency should be disabled for GCC 5 and above since there is no fixed PIC register in GCC 5 and above. Check __GNUC_PREREQ (5,0) instead OPTIMIZE_FOR_GCC_5 since OPTIMIZE_FOR_GCC_5 is false with -fno-omit-frame-pointer. --- sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 5e3888060b..6671afe65e 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -580,8 +580,9 @@ struct libc_do_syscall_args # define EXTRAVAR_5 #endif -/* Consistency check for position-independent code. */ -#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5 +/* Consistency check for position-independent code. Disabled for GCC 5 + and above since there is no fixed PIC register in GCC 5 and above. */ +#if defined __PIC__ && !__GNUC_PREREQ (5,0) # define check_consistency() \ ({ int __res; \ __asm__ __volatile__ \