From patchwork Mon Dec 12 10:00:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 87644 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1549968qgi; Mon, 12 Dec 2016 02:00:46 -0800 (PST) X-Received: by 10.84.179.67 with SMTP id a61mr181005328plc.98.1481536846313; Mon, 12 Dec 2016 02:00:46 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i27si42738111pgn.68.2016.12.12.02.00.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Dec 2016 02:00:46 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-75729-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-75729-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-75729-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=qYlf vGvFXi8/xM/DIQGkLTH2LfHQd57nYRT2VDmU1IkdBp0uhusVxRowntzl4iHgXWAo zpYOoC+dY8n57XjBq14FTB91GSV2V6rx2tF+7TGJLXRDCDRwp4fUEo/px3fzojMt Jl6tgBE0NpfZ9ecRgh8LQrpFJ7f0OWE5w7fDPN4= 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:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=z+mz9XpGnR LSQy+mE/GlOFuF1zM=; b=grw7A6VjOWR6byGTJ1ax/kt6vLdisYEUnNmyXd4pnY uoAfkmA7WGThp7uc20SEqZukJPRZjtz9qDv+b7PtEOOwPMZi6mcB9HSONLvo4Nu5 s7ABZKBRAaRs+bL4Z9jE4Gls/dOGixiKZrNKIrOqgKx8yPB5RunBYLDscsGiq7Fi s= Received: (qmail 53417 invoked by alias); 12 Dec 2016 10:00:34 -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 53129 invoked by uid 89); 12 Dec 2016 10:00:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=libsupport*.a, libsupport*a, relinked, UD:libsupport*.a X-HELO: mx1.redhat.com Subject: Re: [PATCH] support: Introduce new subdirectory for test infrastructure To: Andreas Schwab References: <425c6518-69f7-e68d-9599-d81c8c137c96@redhat.com> <14a1be0f-2b7b-56ce-ec18-dabc55c7f0d9@redhat.com> <87d1hfp5z4.fsf@linux-m68k.org> <1a112b98-f3e2-c3eb-e4e6-e0298f04aa59@redhat.com> <3a26a56b-46f3-0c45-cb01-80867d2fa610@redhat.com> <87y3znhldw.fsf@linux-m68k.org> <87inqrh8v8.fsf@linux-m68k.org> Cc: "Carlos O'Donell" , GNU C Library From: Florian Weimer Message-ID: <4839ff08-b363-cc7f-cdb8-2353fe139cba@redhat.com> Date: Mon, 12 Dec 2016 11:00:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <87inqrh8v8.fsf@linux-m68k.org> On 12/10/2016 08:39 PM, Andreas Schwab wrote: > On Dez 10 2016, Florian Weimer wrote: > >> Even before, not all test dependencies were properly encoded. > > Which ones? I don't remember. I assumed it was expected. I'll report it the next time I see it. >> I don't want to avoid doing the work. I just don't know what make >> behavior is expected here. > > If libsupport*.a changes, then all tests need to be relinked. I came up with the attached patch to implement this. Is it what you had in mind? Thanks, Florian Expose linking against libsupport as make dependency This ensures that tests are rebuilt when libsupport changes. 2016-12-12 Florian Weimer * Rules (binaries-shared-tests, binaries-pie-tests) (binaries-static-tests): Link with $(link-extra-libs-tests). * Makeconfig (+link-pie-tests, +link-static-tests, +link-tests): Remove $(link-extra-libs-tests). diff --git a/Makeconfig b/Makeconfig index be45c3a..2d316ac 100644 --- a/Makeconfig +++ b/Makeconfig @@ -415,8 +415,8 @@ $(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-pie-after-libc) $(call after-link,$@) endef define +link-pie-tests -$(+link-pie-before-libc) $(link-extra-libs-tests) \ - $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-pie-after-libc) +$(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \ + $(+link-pie-after-libc) $(call after-link,$@) endef define +link-pie-printers-tests @@ -442,8 +442,7 @@ $(+link-static-before-libc) $(link-libc-static) $(+link-static-after-libc) $(call after-link,$@) endef define +link-static-tests -$(+link-static-before-libc) $(link-extra-libs-tests) \ - $(link-libc-static-tests) $(+link-static-after-libc) +$(+link-static-before-libc) $(link-libc-static-tests) $(+link-static-after-libc) $(call after-link,$@) endef endif @@ -472,8 +471,8 @@ $(+link-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-after-libc) $(call after-link,$@) endef define +link-tests -$(+link-before-libc) $(link-extra-libs-tests) \ - $(rtld-tests-LDFLAGS) $(link-libc-tests) $(+link-after-libc) +$(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \ + $(+link-after-libc) $(call after-link,$@) endef define +link-printers-tests diff --git a/Rules b/Rules index de58a64..9e02eb7 100644 --- a/Rules +++ b/Rules @@ -189,6 +189,7 @@ endif ifneq "$(strip $(binaries-shared-tests))" "" $(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \ + $(link-extra-libs-tests) \ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) $(+link-tests) @@ -196,6 +197,7 @@ endif ifneq "$(strip $(binaries-pie-tests))" "" $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \ + $(link-extra-libs-tests) \ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) $(+link-pie-tests) @@ -217,6 +219,7 @@ endif ifneq "$(strip $(binaries-static-tests))" "" $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \ + $(link-extra-libs-tests) \ $(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) $(+link-static-tests)