From patchwork Wed Apr 13 20:04:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 52874 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 87581385840F for ; Wed, 13 Apr 2022 20:04:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87581385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649880273; bh=Ixp5BeZN2C6KCY/kGYMaXObAoZ+scTRSYMGMiYquem8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WXq7oJaEnKDcEeoIy3ZCFmI/YhPa92ukW+XxjJOkIh+1dae5VHDwKIGIapvkCd5I9 BpmPfKAu6/CAWbuhXODnBCksV7WHrtCF+/qoSWiD5OdvyOx16LdowHMxnlwpNU9i3B eF55vI8+JL2t3F/z+C90lo45ZYD3GfZvMbH32B2k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 5222F3858C53 for ; Wed, 13 Apr 2022 20:04:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5222F3858C53 Received: by mail-oi1-x236.google.com with SMTP id 12so3200564oix.12 for ; Wed, 13 Apr 2022 13:04:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ixp5BeZN2C6KCY/kGYMaXObAoZ+scTRSYMGMiYquem8=; b=xUrDw5tOi5y72f+ZrVZID0zewbDqLok0chkBMO5RVxiCrB3ytiNZiIvc7lWOZKVBU5 GIpiKdcZxIxdUu+RzW0UTysjWSUEA6Q/aR0spCoGdV7UtjFfloc3rQg3EnyVD0u824Te cP6Cs3DlH7hid0RNCfmPScHdctGNZ0tGhmU1gMeHxOzaveXbc3oNUcBJJ/JNFRbN4dAy sZ6v3G/jfHnprHeWAEFDiReD+PbS10ukKqHglnjoUofe040ee/wByBtIsONkRqho2Df5 HUTnDR8RrWd2Xdf+R4al1bdApQR40qgXZYGU5YeMjf2Y5hAicDiHxW2KdXWUj6kH0rwI U46g== X-Gm-Message-State: AOAM532kW0fI1NoANG+4I0OCoFcnFVuiHUoZLH2b3CFn9kZPo/Z65Vxg Gg7xAuYcyfZxDzPCfvZGmEq6cJT4JRn+rg== X-Google-Smtp-Source: ABdhPJzrs6dkTZBoJhqD79T1jwp226NlEZzQWbLnbvEWQUi31MuUiHMmtGfI4RLOX6lPjLk5iGrDLQ== X-Received: by 2002:a05:6808:3082:b0:320:b2d9:8376 with SMTP id bl2-20020a056808308200b00320b2d98376mr123790oib.209.1649880249971; Wed, 13 Apr 2022 13:04:09 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:431f:889f:8960:cca1:4a60]) by smtp.gmail.com with ESMTPSA id t143-20020acaaa95000000b002fa67efa995sm927oie.17.2022.04.13.13.04.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 13:04:09 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [COMMITTED] stdlib: Reflow and sort most variable assignments Date: Wed, 13 Apr 2022 17:04:05 -0300 Message-Id: <20220413200405.162143-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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" --- stdlib/Makefile | 290 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 227 insertions(+), 63 deletions(-) diff --git a/stdlib/Makefile b/stdlib/Makefile index 8236741984..60fc59c12c 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -22,49 +22,145 @@ subdir := stdlib include ../Makeconfig -headers := stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h \ - monetary.h bits/monetary-ldbl.h \ - inttypes.h stdint.h bits/wordsize.h bits/timesize.h \ - errno.h sys/errno.h bits/errno.h bits/types/error_t.h \ - ucontext.h sys/ucontext.h bits/indirect-return.h \ - alloca.h fmtmsg.h \ - bits/stdlib-bsearch.h sys/random.h bits/stdint-intn.h \ - bits/stdint-uintn.h bits/time64.h \ - -routines := \ - atof atoi atol atoll \ - abort \ - bsearch qsort msort \ - getenv putenv setenv secure-getenv \ - exit on_exit atexit cxa_atexit cxa_finalize old_atexit \ - quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \ - abs labs llabs \ - div ldiv lldiv \ - mblen mbstowcs mbtowc wcstombs wctomb \ - random random_r rand rand_r \ - drand48 erand48 lrand48 nrand48 mrand48 jrand48 \ - srand48 seed48 lcong48 \ - drand48_r erand48_r lrand48_r nrand48_r mrand48_r jrand48_r \ - srand48_r seed48_r lcong48_r \ - drand48-iter getrandom getentropy \ - strfromf strfromd strfroml \ - strtol strtoul strtoll strtoull \ - strtol_l strtoul_l strtoll_l strtoull_l \ - strtof strtod strtold \ - strtof_l strtod_l strtold_l \ - strtof_nan strtod_nan strtold_nan \ - system canonicalize \ - a64l l64a \ - rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \ - getcontext setcontext makecontext swapcontext -aux = grouping groupingwc tens_in_limb +headers := \ + alloca.h \ + bits/errno.h \ + bits/indirect-return.h \ + bits/monetary-ldbl.h \ + bits/stdint-intn.h \ + bits/stdint-uintn.h \ + bits/stdlib-bsearch.h \ + bits/stdlib-float.h \ + bits/stdlib.h \ + bits/stdlib-ldbl.h \ + bits/time64.h \ + bits/timesize.h \ + bits/types/error_t.h \ + bits/wordsize.h \ + errno.h \ + fmtmsg.h \ + inttypes.h \ + monetary.h \ + stdint.h \ + stdlib.h \ + sys/errno.h \ + sys/random.h \ + sys/ucontext.h \ + ucontext.h \ + # headers + +routines := \ + a64l \ + abort \ + abs \ + at_quick_exit \ + atof \ + atoi \ + atol\ + atoll \ + bsearch \ + canonicalize \ + cxa_at_quick_exit \ + cxa_atexit \ + cxa_finalize \ + cxa_thread_atexit_impl \ + div \ + drand48 \ + drand48-iter \ + drand48_r \ + erand48 \ + erand48_r \ + exit \ + fmtmsg \ + getcontext \ + getentropy \ + getenv \ + getrandom \ + getsubopt \ + jrand48 \ + jrand48_r \ + l64a \ + labs \ + lcong48 \ + lcong48_r \ + ldiv \ + llabs \ + lldiv \ + lrand48 \ + lrand48_r \ + makecontext \ + mblen \ + mbstowcs \ + mbtowc \ + mrand48 \ + mrand48_r \ + msort \ + nrand48 \ + nrand48_r \ + old_atexit \ + on_exit atexit \ + putenv \ + qsort \ + quick_exit \ + rand \ + rand_r \ + random \ + random_r \ + rpmatch \ + secure-getenv \ + seed48 \ + seed48_r \ + setcontext \ + setenv \ + srand48 \ + srand48_r \ + strfmon \ + strfmon_l \ + strfromd \ + strfromf \ + strfroml \ + strtod \ + strtod_l \ + strtod_nan \ + strtof \ + strtof_l \ + strtof_nan \ + strtol \ + strtol_l \ + strtold \ + strtold_l \ + strtold_nan \ + strtoll \ + strtoll_l \ + strtoul \ + strtoul_l \ + strtoull \ + strtoull_l \ + swapcontext \ + system \ + wcstombs \ + wctomb \ + xpg_basename \ + # routines + +aux = \ + grouping \ + groupingwc \ + tens_in_limb \ + # aux # These routines will be omitted from the libc shared object. # Instead the static object files will be included in a special archive # linked against when the shared library will be used. -static-only-routines = atexit at_quick_exit +static-only-routines = \ + atexit \ + at_quick_exit \ + # static-only-routines + +test-srcs := \ + tst-fmtmsg \ + #test-srcs -test-srcs := tst-fmtmsg tests := \ bug-fmtmsg1 \ bug-getcontext \ @@ -142,15 +238,29 @@ tests := \ tst-width \ tst-width-stdint \ tst-xpg-basename \ -# tests + # tests + +tests-internal := \ + tst-strtod1i \ + tst-strtod3 \ + tst-strtod4 \ + tst-strtod5i \ + tst-tls-atexit \ + tst-tls-atexit-nodelete \ + # tests-internal + +tests-static := \ + tst-secure-getenv \ + # tests-static -tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ - tst-tls-atexit tst-tls-atexit-nodelete -tests-static := tst-secure-getenv -tests-container := tst-system +tests-container := \ + tst-system \ + #tests-container ifeq ($(build-hardcoded-path-in-tests),yes) -tests += tst-empty-env +tests += \ + tst-empty-env \ + # tests endif LDLIBS-test-atexit-race = $(shared-thread-library) @@ -171,30 +281,76 @@ CFLAGS-tst-thread-quick_exit.o = -std=c++11 LDLIBS-tst-thread-quick_exit = -lstdc++ $(objpfx)tst-thread-quick_exit: $(shared-thread-library) else -tests-unsupported += tst-quick_exit tst-thread-quick_exit +tests-unsupported += \ + tst-quick_exit \ + tst-thread-quick_exit \ + # tests-unsupported endif -modules-names = tst-tls-atexit-lib test-dlclose-exit-race-helper +modules-names = \ + test-dlclose-exit-race-helper \ + tst-tls-atexit-lib \ + # modules-names extra-test-objs += $(addsuffix .os, $(modules-names)) ifeq ($(build-shared),yes) -tests += tst-putenv +tests += \ + tst-putenv \ + # tests endif # Several mpn functions from GNU MP are used by the strtod function. -mpn-routines := inlines add_n addmul_1 cmp divmod_1 divrem udiv_qrnnd \ - lshift rshift mod_1 mul mul_1 mul_n sub_n submul_1 -mpn-headers = longlong.h gmp.h gmp-impl.h gmp-mparam.h asm-syntax.h - -routines := $(strip $(routines) $(mpn-routines)) \ - dbl2mpn ldbl2mpn \ - mpn2flt mpn2dbl mpn2ldbl -aux += fpioconst mp_clz_tab - -tests-extras += tst-putenvmod -extra-test-objs += tst-putenvmod.os - -generated += isomac isomac.out tst-putenvmod.so +mpn-routines := \ + add_n \ + addmul_1 \ + cmp \ + divmod_1 \ + divrem \ + inlines \ + lshift \ + mod_1 \ + mul \ + mul_1 \ + mul_n \ + rshift \ + sub_n \ + submul_1 \ + udiv_qrnnd \ + # mpn-routines +mpn-headers = \ + asm-syntax.h \ + gmp-impl.h \ + gmp-mparam.h \ + gmp.h \ + longlong.h \ + # mpn-headers + +routines := \ + $(strip $(routines) $(mpn-routines)) \ + dbl2mpn \ + ldbl2mpn \ + mpn2dbl \ + mpn2flt \ + mpn2ldbl \ + # routines +aux += \ + fpioconst \ + mp_clz_tab \ + # aux + +tests-extras += \ + tst-putenvmod \ + # tests-extras + +extra-test-objs += \ + tst-putenvmod.os \ + # extra-test-objs + +generated += \ + isomac \ + isomac.out \ + tst-putenvmod.so \ + # generated CFLAGS-bsearch.c += $(uses-callbacks) CFLAGS-msort.c += $(uses-callbacks) @@ -227,9 +383,17 @@ endif include ../Rules ifeq ($(run-built-tests),yes) -LOCALES := cs_CZ.UTF-8 de_DE.UTF-8 en_US.ISO-8859-1 tr_TR.UTF-8 \ - tr_TR.ISO-8859-9 tg_TJ.UTF-8 hr_HR.UTF-8 hi_IN.UTF-8 \ - el_GR.UTF-8 +LOCALES := \ + cs_CZ.UTF-8 \ + de_DE.UTF-8 \ + el_GR.UTF-8 \ + en_US.ISO-8859-1 \ + hi_IN.UTF-8 \ + hr_HR.UTF-8 \ + tg_TJ.UTF-8 \ + tr_TR.ISO-8859-9 \ + tr_TR.UTF-8 \ + # LOCALES include ../gen-locales.mk $(objpfx)bug-strtod2.out: $(gen-locales)