From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32481 invoked by alias); 10 Sep 2010 10:15:45 -0000 Received: (qmail 32465 invoked by uid 22791); 10 Sep 2010 10:15:44 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Sep 2010 10:15:38 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8AAFbYY006984 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 Sep 2010 06:15:37 -0400 Received: from hase.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8AAFZIf001686 for ; Fri, 10 Sep 2010 06:15:36 -0400 From: Andreas Schwab To: libc-hacker@sourceware.org Subject: [PATCH] Work around shortest-stem feature in make 3.82+ X-Yow: I'm ZIPPY the PINHEAD and I'm totally committed to the festive mode. Date: Fri, 10 Sep 2010 10:15:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00001.txt.bz2 make 3.82+ no longer selects pattern rules by order, but by shortest stem, so we need to add more rules to make sure we still get the right matches. Andreas. 2010-09-09 Andreas Schwab * Makeconfig (sysd-rules-patterns): Add rtld-%:rtld-%. (sysd-rules-targets): Remove duplicates. * elf/rtld-Rules ($(objpfx)rtld-%.os): Add pattern rules with rtld-%.$o dependency. --- Makeconfig | 6 +++--- elf/rtld-Rules | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makeconfig b/Makeconfig index 9778998..807c1d1 100644 --- a/Makeconfig +++ b/Makeconfig @@ -966,7 +966,7 @@ endif # emitted into sysd-rules. A sysdeps Makeconfig fragment can # add its own special object file prefix to this list with e.g. foo-%:% # to have foo-*.? compiled from *.? using $(foo-CPPFLAGS). -sysd-rules-patterns := %:% rtld-%:% m_%:s_% +sysd-rules-patterns := %:% rtld-%:rtld-% rtld-%:% m_%:s_% # Let sysdeps/ subdirs contain a Makeconfig fragment for us to include here. sysdep-makeconfigs := $(wildcard $(+sysdep_dirs:=/Makeconfig)) @@ -975,8 +975,8 @@ include $(sysdep-makeconfigs) endif # Compute just the target patterns. Makeconfig has set sysd-rules-patterns. -sysd-rules-targets := $(foreach p,$(sysd-rules-patterns),\ - $(firstword $(subst :, ,$p))) +sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\ + $(firstword $(subst :, ,$p)))) endif # Makeconfig not yet included diff --git a/elf/rtld-Rules b/elf/rtld-Rules index 9f31a56..fc225f2 100644 --- a/elf/rtld-Rules +++ b/elf/rtld-Rules @@ -93,6 +93,12 @@ else # These are the basic compilation rules corresponding to the Makerules ones. # The sysd-rules generated makefile already defines pattern rules for rtld-% # targets built from sysdeps source files. +$(objpfx)rtld-%.os: rtld-%.S $(before-compile) + $(compile-command.S) $(rtld-CPPFLAGS) +$(objpfx)rtld-%.os: rtld-%.s $(before-compile) + $(compile-command.s) $(rtld-CPPFLAGS) +$(objpfx)rtld-%.os: rtld-%.c $(before-compile) + $(compile-command.c) $(rtld-CPPFLAGS) $(objpfx)rtld-%.os: %.S $(before-compile) $(compile-command.S) $(rtld-CPPFLAGS) $(objpfx)rtld-%.os: %.s $(before-compile) @@ -101,6 +107,9 @@ $(objpfx)rtld-%.os: %.c $(before-compile) $(compile-command.c) $(rtld-CPPFLAGS) # The rules for generated source files. +$(objpfx)rtld-%.os: $(objpfx)rtld-%.S $(before-compile); $(compile-command.S) +$(objpfx)rtld-%.os: $(objpfx)rtld-%.s $(before-compile); $(compile-command.s) +$(objpfx)rtld-%.os: $(objpfx)rtld-%.c $(before-compile); $(compile-command.c) $(objpfx)rtld-%.os: $(objpfx)%.S $(before-compile); $(compile-command.S) $(objpfx)rtld-%.os: $(objpfx)%.s $(before-compile); $(compile-command.s) $(objpfx)rtld-%.os: $(objpfx)%.c $(before-compile); $(compile-command.c) -- 1.7.2.2 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."