From patchwork Thu Apr 20 13:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 68067 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C5B03385697A for ; Thu, 20 Apr 2023 13:43:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5B03385697A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681998188; bh=j6Fzj9xt7rD8/RgyucNJZ3Y9fRIWkflCt7B8MWv/QU4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=suNXAqG765ZawUDHNOmHLjNt6F4gEDaJ/GYQZq1VUR621W1G4MY7hwmGwIqMhz/wi Gwbcx23/QeG/FqLU6vdCH+q7MzS3oebDL3Rb3dHJqJ5wk77nxmKHZiWIZ761SfwUY+ uRDPGGRuYOAtCS3GMATXS26MRFifCSx4Moh8Z8h0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id 16EA7385840C for ; Thu, 20 Apr 2023 13:42:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16EA7385840C Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-54711bc097bso286426eaf.0 for ; Thu, 20 Apr 2023 06:42:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681998164; x=1684590164; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j6Fzj9xt7rD8/RgyucNJZ3Y9fRIWkflCt7B8MWv/QU4=; b=LKzGqjjB8+PRp1QQzjM4RhFNboWUCX2q/UeekGSzU+YFo95T6tWkNYtPjX9Kzt/NiH gb6ROorMvMFxW5pbYSJj1Q/0twbSgDcDb3DQtzd4D/TqAZa0Bm+F9XCQFypJEHrC8Jcn 5OHSGTTccTmy5pp3s57H7gfGrZcF59JSiC6G4W2FC5BED1N4j8R78a4MBn+vdCT1+Tj4 fcQ319r8QMxmjp1CykgdOXt51McVLnDADNkeNd6z5msf3AYgge63H0iPrU3ZgRmXd8e/ Nlwaj4A9rh4HRJCZHZwNL3Don4MD/xSr+qaLlRm3vyh+HdNA/ls4FM9fVOQu1N7OyxCt Yw9g== X-Gm-Message-State: AAQBX9fp6VrsI3z1QbEIuNeZNVscGJBWhrxrY5SyWVW4mYz3XHOF3Neu gv77gGPV2qmdz7qo+q4LoMu29vrjQf3zOxCxy9Veog== X-Google-Smtp-Source: AKy350YMFU96xzpw6usnW7xlWf0FX8CR0GxCaswtIxcT0P+Xeq/YuXE3RbdwZEB9K4iDUHfNrd2BZw== X-Received: by 2002:a05:6808:484:b0:38b:b27b:325e with SMTP id z4-20020a056808048400b0038bb27b325emr930060oid.30.1681998163619; Thu, 20 Apr 2023 06:42:43 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:333:c0e2:699e:18c9:eb96]) by smtp.gmail.com with ESMTPSA id m5-20020a4aab85000000b0053853156b5csm620965oon.8.2023.04.20.06.42.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 06:42:42 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [COMMITTED] linux: Re-flow and sort multiline Makefile definitions Date: Thu, 20 Apr 2023 10:42:38 -0300 Message-Id: <20230420134238.3405548-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- sysdeps/unix/sysv/linux/Makefile | 206 ++++++++++++++++++++++++------- 1 file changed, 158 insertions(+), 48 deletions(-) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index b4323b2604..aec7a94785 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -7,7 +7,8 @@ sysdeps-linux-python-cc = \ # Additional dependencies for Python scripts. sysdeps-linux-python-deps = \ $(..)sysdeps/unix/sysv/linux/glibcsyscalls.py \ - $(..)scripts/glibcextract.py + $(..)scripts/glibcextract.py \ + # sysdeps-linux-python-deps # Invocation of the Python interpreter with the Python search path. sysdeps-linux-python = \ @@ -41,7 +42,9 @@ update-syscall-lists: arch-syscall.h endif ifeq ($(subdir),csu) -sysdep_routines += errno-loc +sysdep_routines += \ + errno-loc \ + # sysdep_routines endif ifeq ($(subdir),assert) @@ -233,11 +236,15 @@ xtests += \ # xtests # For +depfiles in Makerules. -extra-test-objs += tst-sysconf-iov_max-uapi.o +extra-test-objs += \ + tst-sysconf-iov_max-uapi.o \ + # extra-test-objs # Test for the symbol version of fcntl that was replaced in glibc 2.28. ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes) -tests += tst-ofdlocks-compat +tests += \ + tst-ofdlocks-compat \ + # tests endif tests-internal += \ @@ -268,8 +275,12 @@ tests-clone-internal = \ tst-clone2-internal \ tst-clone3-internal \ tst-getpid1-internal -tests-internal += $(tests-clone-internal) -tests-static += $(tests-clone-internal) +tests-internal += \ + $(tests-clone-internal) \ + # tests-internal +tests-static += \ + $(tests-clone-internal) \ + # tests-static CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables @@ -308,7 +319,9 @@ $(objpfx)tst-syscall-list-sys.list: $(objpfx)tst-syscall-list-macros.list LC_ALL=C $(AWK) '/^#define SYS_/ { print substr($$2, 5) }' $< > $@-tmp $(move-if-change) $@-tmp $@ -tests-special += $(objpfx)tst-syscall-list.out +tests-special += \ + $(objpfx)tst-syscall-list.out + # tests-special $(objpfx)tst-syscall-list.out: \ ../sysdeps/unix/sysv/linux/tst-syscall-list.sh \ $(objpfx)tst-syscall-list-macros.list \ @@ -316,7 +329,9 @@ $(objpfx)tst-syscall-list.out: \ $(objpfx)tst-syscall-list-sys.list $(BASH) $^ $(AWK) > $@; $(evaluate-test) -tests-special += $(objpfx)tst-glibcsyscalls.out +tests-special += \ + $(objpfx)tst-glibcsyscalls.out + # tests-special # arch-syscall.h is located via the sysdeps override search path. $(objpfx)tst-glibcsyscalls.out: arch-syscall.h \ ../sysdeps/unix/sysv/linux/syscall-names.list @@ -332,7 +347,9 @@ $(objpfx)tst-glibcsyscalls.out: \ # Separate object file for access to the constant from the UAPI header. $(objpfx)tst-sysconf-iov_max: $(objpfx)tst-sysconf-iov_max-uapi.o -tests-special += $(objpfx)tst-mman-consts.out +tests-special += \ + $(objpfx)tst-mman-consts.out \ + # tests-special $(objpfx)tst-mman-consts.out: ../sysdeps/unix/sysv/linux/tst-mman-consts.py $(sysdeps-linux-python) \ ../sysdeps/unix/sysv/linux/tst-mman-consts.py \ @@ -340,7 +357,9 @@ $(objpfx)tst-mman-consts.out: ../sysdeps/unix/sysv/linux/tst-mman-consts.py < /dev/null > $@ 2>&1; $(evaluate-test) $(objpfx)tst-mman-consts.out: $(sysdeps-linux-python-deps) -tests-special += $(objpfx)tst-pidfd-consts.out +tests-special += \ + $(objpfx)tst-pidfd-consts.out \ + # tests-special $(objpfx)tst-pidfd-consts.out: ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py $(sysdeps-linux-python) \ ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py \ @@ -348,7 +367,9 @@ $(objpfx)tst-pidfd-consts.out: ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py < /dev/null > $@ 2>&1; $(evaluate-test) $(objpfx)tst-pidfd-consts.out: $(sysdeps-linux-python-deps) -tests-special += $(objpfx)tst-mount-consts.out +tests-special += \ + $(objpfx)tst-mount-consts.out \ + # tests-special $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py $(sysdeps-linux-python) \ ../sysdeps/unix/sysv/linux/tst-mount-consts.py \ @@ -356,7 +377,9 @@ $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py < /dev/null > $@ 2>&1; $(evaluate-test) $(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps) -tests-special += $(objpfx)tst-mount-compile.out +tests-special += \ + $(objpfx)tst-mount-compile.out \ + # tests-special $(objpfx)tst-mount-compile.out: ../sysdeps/unix/sysv/linux/tst-mount-compile.py $(sysdeps-linux-python) \ ../sysdeps/unix/sysv/linux/tst-mount-compile.py \ @@ -369,9 +392,15 @@ tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0 endif # $(subdir) == misc ifeq ($(subdir),time) -sysdep_headers += sys/timex.h bits/timex.h +sysdep_headers += \ + bits/timex.h \ + sys/timex.h \ + # sysdep_headers -sysdep_routines += ntp_gettime ntp_gettimex +sysdep_routines += \ + ntp_gettime \ + ntp_gettimex \ + # sysdep_routines tests += \ tst-clock_gettime-clobber \ @@ -381,7 +410,10 @@ tests += \ endif ifeq ($(subdir),signal) -tests-special += $(objpfx)tst-signal-numbers.out +tests-special += \ + $(objpfx)tst-signal-numbers.out \ + # tests-special + # Depending on signal.o* is a hack. What we actually want is a dependency # on signal.h and everything it includes. That's impractical to write # in this context, but signal.c includes signal.h and not much else so it'll @@ -397,11 +429,23 @@ $(objpfx)tst-signal-numbers.out: $(sysdeps-linux-python-deps) endif ifeq ($(subdir),socket) -sysdep_headers += net/if_ppp.h net/ppp-comp.h \ - net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \ - net/if_slip.h net/if_packet.h net/if_shaper.h \ - bits/socket-constants.h -sysdep_routines += cmsg_nxthdr +sysdep_headers += \ + bits/socket-constants.h \ + net/ethernet.h \ + net/if_arp.h \ + net/if_packet.h \ + net/if_ppp.h \ + net/if_shaper.h \ + net/if_slip.h \ + net/ppp-comp.h \ + net/ppp_defs.h \ + net/route.h \ + # sysdep_headers + +sysdep_routines += \ + cmsg_nxthdr \ + # sysdep_routines + CFLAGS-recvmmsg.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-sendmmsg.c = -fexceptions -fasynchronous-unwind-tables @@ -414,7 +458,9 @@ tests-time64 += \ tst-socket-timestamp-compat-time64 # tests-time64 -tests-special += $(objpfx)tst-socket-consts.out +tests-special += \ + $(objpfx)tst-socket-consts.out \ + # tests-special $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py PYTHONPATH=../scripts \ $(PYTHON) ../sysdeps/unix/sysv/linux/tst-socket-consts.py \ @@ -425,22 +471,40 @@ $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py endif # $(subdir) == socket ifeq ($(subdir),sunrpc) -sysdep_headers += nfs/nfs.h +sysdep_headers += \ + nfs/nfs.h \ + # sysdep_headers endif ifeq ($(subdir),termios) -sysdep_headers += termio.h +sysdep_headers += \ + termio.h \ + # sysdep_headers endif ifeq ($(subdir),posix) -sysdep_headers += bits/initspin.h +sysdep_headers += \ + bits/initspin.h \ + # sysdep_headers -sysdep_routines += sched_getcpu oldglob getcpu +sysdep_routines += \ + getcpu \ + oldglob \ + sched_getcpu \ + # sysdep_routines -tests += tst-affinity tst-affinity-pid +tests += \ + tst-affinity \ + tst-affinity-pid \ + # tests + +tests-static += \ + tst-affinity-static \ + # tests-static -tests-static := tst-affinity-static -tests += $(tests-static) +tests += \ + $(tests-static) \ + # tests CFLAGS-fork.c = $(libio-mtsafe) CFLAGS-getpid.o = -fomit-frame-pointer @@ -448,18 +512,34 @@ CFLAGS-getpid.os = -fomit-frame-pointer endif ifeq ($(subdir),inet) -sysdep_headers += netinet/if_fddi.h netinet/if_tr.h \ - netipx/ipx.h netash/ash.h netax25/ax25.h netatalk/at.h \ - netrom/netrom.h netpacket/packet.h netrose/rose.h \ - neteconet/ec.h netiucv/iucv.h -sysdep_routines += netlink_assert_response +sysdep_headers += \ + netash/ash.h \ + netatalk/at.h \ + netax25/ax25.h \ + neteconet/ec.h \ + netinet/if_fddi.h \ + netinet/if_tr.h \ + netipx/ipx.h \ + netiucv/iucv.h \ + netpacket/packet.h \ + netrom/netrom.h \ + netrose/rose.h \ + # sysdep_headers + +sysdep_routines += \ + netlink_assert_response \ + # sysdep_routines endif # Don't compile the ctype glue code, since there is no old non-GNU C library. inhibit-glue = yes ifeq ($(subdir),dirent) -sysdep_routines += getdirentries getdirentries64 +sysdep_routines += \ + getdirentries \ + getdirentries64 \ + # sysdep_routines + tests += \ tst-getdents64 \ tst-readdir64-compat \ @@ -471,29 +551,54 @@ CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1 endif ifeq ($(subdir),io) -sysdep_routines += xstatconv internal_statvfs \ - sync_file_range fallocate fallocate64 \ - close_nocancel fcntl_nocancel \ - open_nocancel open64_nocancel \ - openat_nocancel openat64_nocancel \ - read_nocancel pread64_nocancel \ - write_nocancel statx_cp stat_t64_cp +sysdep_routines += \ + close_nocancel \ + fallocate \ + fallocate64 \ + fcntl_nocancel \ + internal_statvfs \ + open64_nocancel \ + open_nocancel \ + openat64_nocancel \ + openat_nocancel \ + pread64_nocancel \ + read_nocancel \ + stat_t64_cp \ + statx_cp \ + sync_file_range \ + write_nocancel \ + xstatconv \ + # sysdep_routines -sysdep_headers += bits/fcntl-linux.h +sysdep_headers += \ + bits/fcntl-linux.h \ + # sysdep_headers tests += \ tst-fallocate \ tst-fallocate64 \ tst-getcwd-smallbuff \ tst-o_path-locks \ -# tests + # tests endif ifeq ($(subdir),elf) -sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir +sysdep-rtld-routines += \ + dl-brk \ + dl-getcwd \ + dl-openat64 \ + dl-opendir \ + dl-sbrk \ + # sysdep-rtld-routines + +others += \ + pldd \ + # others + +install-bin += \ + pldd \ + # install-bin -others += pldd -install-bin += pldd $(objpfx)pldd: $(objpfx)xmalloc.o endif @@ -508,9 +613,14 @@ CFLAGS-gai.c += -DNEED_NETLINK endif ifeq ($(subdir),nptl) -tests += tst-align-clone tst-getpid1 +tests += \ + tst-align-clone \ + tst-getpid1 \ + # tests # tst-rseq-nptl is an internal test because it requires a definition of # __NR_rseq from the internal system call list. -tests-internal += tst-rseq-nptl +tests-internal += \ + tst-rseq-nptl \ + # tests-internal endif