From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24801 invoked by alias); 24 Apr 2019 17:42:36 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 24791 invoked by uid 89); 24 Apr 2019 17:42:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=probes, Major X-Spam-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Apr 2019 17:42:35 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 062D530B4A3A for ; Wed, 24 Apr 2019 17:42:34 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-68.ams2.redhat.com [10.36.116.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B517A10018E0 for ; Wed, 24 Apr 2019 17:42:33 +0000 (UTC) Received: by oldenburg2.str.redhat.com (Postfix, from userid 1000) id A597C83292BF; Wed, 24 Apr 2019 19:42:31 +0200 (CEST) Date: Tue, 01 Jan 2019 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.29 COMMITTED] memusagestat: use local glibc when linking [BZ #18465] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20190424174231.A597C83292BF@oldenburg2.str.redhat.com> From: Florian Weimer X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 24 Apr 2019 17:42:34 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00004.txt.bz2 From: Mike Frysinger The memusagestat is the only binary that has its own link line which causes it to be linked against the existing installed C library. It has been this way since it was originally committed in 1999, but I don't see any reason as to why. Since we want all the programs we build locally to be against the new copy of glibc, change the build to be like all other programs. (cherry picked from commit f9b645b4b0a10c43753296ce3fa40053fa44606a) 2019-04-24 Mike Frysinger [BZ #18465] * malloc/Makefile (others): Add memusagestat. ($(objpfx)memusagestat): Delete rule. (LDLIBS-memusagestat): New variable. diff --git a/NEWS b/NEWS index 117646df7b..07e099b5ec 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ Major new features: The following bugs are resolved with this release: [16573] malloc: Set and reset all hooks for tracing + [18465] memusagestat: use local glibc when linking [24155] x32 memcmp can treat positive length as 0 (if sign bit in RDX is set) (CVE-2019-7309) [24164] Systemtap probes need to use "nr" constraint on 32-bit Arm [24161] __run_fork_handlers self-deadlocks in malloc/tst-mallocfork2 diff --git a/malloc/Makefile b/malloc/Makefile index ab2eed09c6..aadf602dfd 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -131,6 +131,7 @@ ifneq ($(cross-compiling),yes) # If the gd library is available we build the `memusagestat' program. ifneq ($(LIBGD),no) others: $(objpfx)memusage +others += memusagestat install-bin = memusagestat install-bin-script += memusage generated += memusagestat memusage @@ -154,8 +155,7 @@ cpp-srcs-left := $(memusagestat-modules) lib := memusagestat include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left)) -$(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o) - $(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm +LDLIBS-memusagestat = $(libgd-LDFLAGS) -lgd -lpng -lz -lm ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared))