There are many Makefile variable names with _: sysdeps/aarch64/Makefile:sysdep_headers += sys/ifunc.h sysdeps/aarch64/Makefile:sysdep_routines += \ sysdeps/aarch64/Makefile:sysdep_malloc_debug_routines = __mtag_tag_zero_region __mtag_tag_region ... But sort-makefile-lines.py doesn't include _ in # Build a list of all start markers (tuple includes name). startmarks = [] for i in range(len(lines)): # Look for things like "var = \", "var := \" or "var += \" # to start the sorted list. var = re.search(r'^([a-zA-Z0-9-]*) [\+:]?\= \\$', lines[i])
Also many Makefiles have sysdep_routines += \ strcasecmp_l-nonascii \ strcspn-generic \ strncase_l-nonascii \ strpbrk-generic \ strspn-generic \ varshift \ # sysdep_routines But sort-makefile-lines.py expects # sysdep_routines
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6a2512bf1605a4208dd94ef67408488d8acb2409 commit 6a2512bf1605a4208dd94ef67408488d8acb2409 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu Feb 15 03:22:55 2024 -0800 sort-makefile-lines.py: Allow '_' in name and "^# name" '_' is used in Makefile variable names and many variables end with "^# name". Relax sort-makefile-lines.py to allow '_' in name and "^# name" as variable end. This fixes BZ #31385.
Fixed.