From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 0ACDC384CB97; Thu, 9 May 2024 21:22:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0ACDC384CB97 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0ACDC384CB97 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715289756; cv=none; b=LlTKx4nMBcamc6a2AkQ29KL4sWPaKIvPVA/hTRjAxx5ctoQDSzE+vO/Qz1HHeGOJrveNxiRZVZOZQ3Svo8wdsqF3Ih4Ps9a0WR+AFBwOq/3pef0YuhZ9k5t2pgNe3kQteHV1F57XWzpuK91KZFQmgudnC/UMmWxXsd5JfgOvIq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715289756; c=relaxed/simple; bh=tm82N026mFlQiqUFE3+OiMBeH8r75q0HglMFrJbSbI8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ohUWKKHtrDiQGVLGFLqHwqbDFzhX2PxLnRZCB4+LIAhJTBe155yxlRLMDQiYt54HY57nqyHZKGOnek+H5CWAKgxg7mPdj8qPJB5aQYTDhfKGeJhD3L0IhE4qP2GjMkS4Qt+9GZxQmnCzOOCrb/IsKCuLkyraJtLky18DClKqE5Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1ed41eb3382so9772355ad.0; Thu, 09 May 2024 14:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715289753; x=1715894553; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CoofHacbAwA+lVVicalv3r3f56O5l/pa5LHMpXQ4VZE=; b=N0hnRM+/Vjl3/gzVyviOE5Cpn/FNyo80Rxs9VufliuvAELEpttYAe62xWbDX68Iq2C 30rYLaPGWyJ5jCeHAmz2lmDvatsC2hMBVboG5LHaZanbPDpYqZv4CEotBxsyHeUscsTT QzT9ZQYuHQtuD76cLDpJTdPPKC5zZfx4TNuvBjVaCV75TDHph469O65zHLdEc/fQNGHh JBM0Fjalujemk35+2zos06WQMCRKYTBa+4hPMkBDlk95va1TX5emkpCmmv+ei2SlfjkS 7oDJvRPl4B8ORMlLSLhZCnrOdi6+7g5KuLHA6gGRiBUoAsDA+PP9MN6HWCmElewXV1nX ohIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715289753; x=1715894553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CoofHacbAwA+lVVicalv3r3f56O5l/pa5LHMpXQ4VZE=; b=AiES9Z8WdBEzTcuaEwmzvVFjuKUHU/OXotNAqcFmiuYxbvVo9QeTktC63yZhX75GYl wAKfIAJOQvmpQ7MQzW+rVZZZqyQ7RViv/giRxJ4+TAktemJ5sMD1WD9CqKaElB5BbAHx IPbiRiCEOvAwTayZgF4tSdIEkyVu43Pp/c84YaLYPFwyLUALrqNTJ8K7xBOG27rB4lla IyTupskbBZKq50YocpHVYu//3+dMD6bhH4kpAhEUGuYtJw0yvv8FwyXoKotLFfmv8m7b x8LYdQb5XyjXyNA9l1ZDGJKFfyhr1tNNXwuCcKE0o3xI/lUxtRJWabjxbjwAsYrMdd8y pWTQ== X-Forwarded-Encrypted: i=1; AJvYcCVoVv4mG2SrgL6fgsgGEAjUuVF9faA+5ATRd3nmi8IaWFVhVu8oehmT9k8/PIH/Pi+2Iw/P8GpnnV0qvZPDTevJ24xOlISLcg== X-Gm-Message-State: AOJu0Yx/7BkWL44iSVUd2uEy8IPFqUx3DK6s6RypcdqhQSgqArXdYyPL l5PorIn/EF0S7n1tcm/BjOqGfCegMUhNFrJrH6ZbvLOuiHa1rDwuQEeAEQ== X-Google-Smtp-Source: AGHT+IHGEQRnSMQm9NBoxuiadv5OBL2ctrpIll0CvPmJhbLecSr4Lmb/WOv0Zjz6iHc+w3PJmdt5qA== X-Received: by 2002:a17:902:7888:b0:1e4:2b90:758e with SMTP id d9443c01a7336-1ef43e27badmr8680095ad.39.1715289752920; Thu, 09 May 2024 14:22:32 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.56.168.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c136838sm18796925ad.232.2024.05.09.14.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:22:32 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 96C1E740430; Thu, 9 May 2024 14:22:31 -0700 (PDT) From: "H.J. Lu" To: libc-stable@sourceware.org Cc: skpgkp2@gmail.com, Sergei Trofimovich , Paul Smith , Siddhesh Poyarekar , Siddhesh Poyarekar Subject: [PATCH 1/2] Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564] Date: Thu, 9 May 2024 14:22:27 -0700 Message-ID: <20240509212228.2518737-2-hjl.tools@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240509212228.2518737-1-hjl.tools@gmail.com> References: <20240509212228.2518737-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3020.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Sergei Trofimovich make-4.4 will add long flags to MAKEFLAGS variable: * WARNING: Backward-incompatibility! Previously only simple (one-letter) options were added to the MAKEFLAGS variable that was visible while parsing makefiles. Now, all options are available in MAKEFLAGS. This causes locale builds to fail when long options are used: $ make --shuffle ... make -C localedata install-locales make: invalid shuffle mode: '1662724426r' The change fixes it by passing eash option via whitespace and dashes. That way option is appended to both single-word form and whitespace separated form. While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering out --long-options. Otherwise options like --shuffle flag enable silent mode unintentionally. $(silent-make) variable consolidates the checks. Resolves: BZ# 29564 CC: Paul Smith CC: Siddhesh Poyarekar Signed-off-by: Sergei Trofimovich Reviewed-by: Siddhesh Poyarekar (cherry picked from commit 2d7ed98add14f75041499ac189696c9bd3d757fe) --- Makeconfig | 18 +++++++++++++++++- Makerules | 4 ++-- elf/rtld-Rules | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Makeconfig b/Makeconfig index f252842979..6adb65fca4 100644 --- a/Makeconfig +++ b/Makeconfig @@ -42,6 +42,22 @@ else objdir must be defined by the build-directory Makefile. endif +# Did we request 'make -s' run? "yes" or "no". +# Starting from make-4.4 MAKEFLAGS now contains long +# options like '--shuffle'. To detect presence of 's' +# we pick first word with short options. Long options +# are guaranteed to come after whitespace. We use '-' +# prefix to always have a word before long options +# even if no short options were passed. +# Typical MAKEFLAGS values to watch for: +# "rs --shuffle=42" (silent) +# " --shuffle" (not silent) +ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),) +silent-make := no +else +silent-make := yes +endif + # Root of the sysdeps tree. sysdep_dir := $(..)sysdeps export sysdep_dir := $(sysdep_dir) @@ -892,7 +908,7 @@ endif # umpteen zillion filenames along with it (we use `...' instead) # but we don't want this echoing done when the user has said # he doesn't want to see commands echoed by using -s. -ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s +ifeq ($(silent-make),yes) # if -s +cmdecho := echo >/dev/null else # not -s +cmdecho := echo diff --git a/Makerules b/Makerules index 1e9c18f0d8..e07a42e20c 100644 --- a/Makerules +++ b/Makerules @@ -805,7 +805,7 @@ endif # Maximize efficiency by minimizing the number of rules. .SUFFIXES: # Clear the suffix list. We don't use suffix rules. # Don't define any builtin rules. -MAKEFLAGS := $(MAKEFLAGS)r +MAKEFLAGS := $(MAKEFLAGS) -r # Generic rule for making directories. %/: @@ -822,7 +822,7 @@ MAKEFLAGS := $(MAKEFLAGS)r .PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c)) # Use the verbose option of ar and tar when not running silently. -ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s +ifeq ($(silent-make),no) # if not -s verbose := v else # -s verbose := diff --git a/elf/rtld-Rules b/elf/rtld-Rules index 7e0254cc41..3b73937d4d 100644 --- a/elf/rtld-Rules +++ b/elf/rtld-Rules @@ -52,7 +52,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\ mv -f $@T $@ # Use the verbose option of ar and tar when not running silently. -ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s +ifeq ($(silent-make),no) # if not -s verbose := v else # -s verbose := -- 2.45.0