public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules
@ 2022-09-11 17:18 psmith at gnu dot org
  2022-09-11 19:04 ` [Bug build/29564] " toralf.foerster at gmx dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: psmith at gnu dot org @ 2022-09-11 17:18 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

            Bug ID: 29564
           Summary: Incorrect way to change MAKEFLAGS in Makerules
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: psmith at gnu dot org
                CC: carlos at redhat dot com
  Target Milestone: ---

The glibc Makerules file contains this:

  # Don't define any builtin rules.
  MAKEFLAGS := $(MAKEFLAGS)r

This is not a valid way to modify the MAKEFLAGS variable.  GNU make always
ensures that all options which have single-letter forms are used as the first
argument, however there are options to GNU make which do NOT have single-letter
forms and those are added after the single-letter forms in MAKEFLAGS.

If you use the above structure, the "r" is just appended to the end of whatever
the last option happens to be, which will result in an error if the person
invoking make provided a long option without a single-letter form.

This should be:

  MAKEFLAGS := $(MAKEFLAGS) -r

or probably even better:

  MAKEFLAGS += -r

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
@ 2022-09-11 19:04 ` toralf.foerster at gmx dot de
  2022-09-11 22:15 ` sam at gentoo dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: toralf.foerster at gmx dot de @ 2022-09-11 19:04 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

Toralf Förster <toralf.foerster at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |toralf.foerster at gmx dot de

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
  2022-09-11 19:04 ` [Bug build/29564] " toralf.foerster at gmx dot de
@ 2022-09-11 22:15 ` sam at gentoo dot org
  2022-09-12 20:35 ` slyich at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2022-09-11 22:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
  2022-09-11 19:04 ` [Bug build/29564] " toralf.foerster at gmx dot de
  2022-09-11 22:15 ` sam at gentoo dot org
@ 2022-09-12 20:35 ` slyich at gmail dot com
  2022-09-12 20:38 ` siddhesh at sourceware dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: slyich at gmail dot com @ 2022-09-12 20:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

Sergei Trofimovich <slyich at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |siddhesh at sourceware dot org,
                   |                            |slyich at gmail dot com

--- Comment #1 from Sergei Trofimovich <slyich at gmail dot com> ---
Completely agree. I proposed very similar patch in
https://sourceware.org/pipermail/libc-alpha/2022-September/141926.html.

I'll try to submit a form of it with a few changes proposed to handle other
places introspecting $(MAKEFLAGS) by using $(firstword $(MAKEFLAGS)) instead or
similar.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
                   ` (2 preceding siblings ...)
  2022-09-12 20:35 ` slyich at gmail dot com
@ 2022-09-12 20:38 ` siddhesh at sourceware dot org
  2022-09-13 17:59 ` siddhesh at sourceware dot org
  2024-02-07 22:10 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: siddhesh at sourceware dot org @ 2022-09-12 20:38 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

--- Comment #2 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
Thanks for working on this!  Please also quote this bug number in the patch
when you submit the updated one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
                   ` (3 preceding siblings ...)
  2022-09-12 20:38 ` siddhesh at sourceware dot org
@ 2022-09-13 17:59 ` siddhesh at sourceware dot org
  2024-02-07 22:10 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: siddhesh at sourceware dot org @ 2022-09-13 17:59 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.37
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
Fixed.

https://sourceware.org/git/?p=glibc.git;a=commit;h=2d7ed98add14f75041499ac189696c9bd3d757fe

author  Sergei Trofimovich <slyich@gmail.com>   
        Tue, 13 Sep 2022 17:39:13 +0000 (13:39 -0400)
committer       Siddhesh Poyarekar <siddhesh@sourceware.org>    
        Tue, 13 Sep 2022 17:45:32 +0000 (13:45 -0400)
commit  2d7ed98add14f75041499ac189696c9bd3d757fe
tree    2f9d6695d288f31666f7aaad5c52add48b8a6470        tree
parent  a30e960328fc60e066967d1224ecd5b6e173cda3        commit | diff
Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]

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 <psmith@gnu.org>
CC: Siddhesh Poyarekar <siddhesh@gotplt.org>
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/29564] Incorrect way to change MAKEFLAGS in Makerules
  2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
                   ` (4 preceding siblings ...)
  2022-09-13 17:59 ` siddhesh at sourceware dot org
@ 2024-02-07 22:10 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-02-07 22:10 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29564

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31330

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-07 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 17:18 [Bug build/29564] New: Incorrect way to change MAKEFLAGS in Makerules psmith at gnu dot org
2022-09-11 19:04 ` [Bug build/29564] " toralf.foerster at gmx dot de
2022-09-11 22:15 ` sam at gentoo dot org
2022-09-12 20:35 ` slyich at gmail dot com
2022-09-12 20:38 ` siddhesh at sourceware dot org
2022-09-13 17:59 ` siddhesh at sourceware dot org
2024-02-07 22:10 ` sam at gentoo dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).