From patchwork Sun Jan 24 00:07:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 572213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C5A79140B0E for ; Sun, 24 Jan 2016 11:08:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=Wai5cIK9; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=EWYVyPOpFcLppbg1s7BYnmoVIPqBx PGsj85mn6e3eziFx+DbE5opt8al7hjrQkpXcxP1rM6Zqz89e0UWvWNi7aJdPKch4 zHkCaIKmNFXF1tpzhNTWq6LApI4KlKlnsWQstUulTN0yObhh7qG+5309LuJs4bfQ JAF7x83dSLSJ6I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=XVNGSLVz4nJx5HMex/aUfvpKDu0=; b=Wai 5cIK9N72OqAtBS18TxojY7xgkyxnU+QxNJefbXOyD2nZu5h38k4tCQoZRU/T9YBz CDedsiAk8frPFKSU7A6uEN8RKTLalMbqAVwyu1GPMSLApoVzyu/+o/qt6Aw7Toet 5+Ecf94PTfMa1uFFccj+Oc0urxTHU6+ESEDpzO+Q= Received: (qmail 46623 invoked by alias); 24 Jan 2016 00:07:59 -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 46606 invoked by uid 89); 24 Jan 2016 00:07:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*r:508, 407, reintroduce X-HELO: pegasus3.altlinux.org Date: Sun, 24 Jan 2016 03:07:54 +0300 From: "Dmitry V. Levin" To: libc-alpha@sourceware.org Subject: [PATCH] intl: reintroduce unintentionally disabled optimization Message-ID: <20160124000754.GA27321@altlinux.org> Mail-Followup-To: libc-alpha@sourceware.org Mime-Version: 1.0 Content-Disposition: inline HAVE_BUILTIN_EXPECT macro was removed by commit glibc-2.14-280-g3ce1f29, but then unintentionally reintroduced during merge with GNU gettext 0.19.3 by commit glibc-2.20-324-g6d24885, effectively disabling all optimization based on __builtin_expect. As intl files are also part of GNU gettext, HAVE_BUILTIN_EXPECT macro cannot be removed, so guard its use with _LIBC macro. [BZ #19512] * intl/gettextP.h (__builtin_expect): Define only if [!_LIBC && !HAVE_BUILTIN_EXPECT]. * intl/loadinfo.h (__builtin_expect): Likewise. --- intl/gettextP.h | 2 +- intl/loadinfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/gettextP.h b/intl/gettextP.h index 8c74bc5..83d9395 100644 --- a/intl/gettextP.h +++ b/intl/gettextP.h @@ -99,7 +99,7 @@ extern char *libintl_dcigettext (const char *__domainname, /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ -#ifndef HAVE_BUILTIN_EXPECT +#if !defined _LIBC && !defined HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif diff --git a/intl/loadinfo.h b/intl/loadinfo.h index 2e15f93..025fc3a 100644 --- a/intl/loadinfo.h +++ b/intl/loadinfo.h @@ -40,7 +40,7 @@ /* Tell the compiler when a conditional or integer expression is almost always true or almost always false. */ -#ifndef HAVE_BUILTIN_EXPECT +#if !defined _LIBC && !defined HAVE_BUILTIN_EXPECT # define __builtin_expect(expr, val) (expr) #endif