From: abushwang <abushwangs@gmail.com>
To: libc-alpha@sourceware.org
Cc: adhemerval.zanella@linaro.org, Shuo Wang <abushwang@tencent.com>
Subject: [PATCH] stdlib: reorganize stdlib Makefile routines by functionality
Date: Mon, 1 Apr 2024 19:44:16 +0800 [thread overview]
Message-ID: <20240401114416.2389227-1-abushwangs@gmail.com> (raw)
From: Shuo Wang <abushwang@tencent.com>
Commit d275970ab sort all functions by lexicographic Order,
which potentially impacts performance (such as 'lrand48')
due to increased distance in the compiled output
Signed-off-by: Shuo Wang <abushwang@tencent.com>
---
stdlib/Makefile | 215 ++++++++++++------------------------------------
1 file changed, 51 insertions(+), 164 deletions(-)
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8b0ac63ddb..d2d912db27 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -51,170 +51,57 @@ headers := \
ucontext.h \
# headers
-routines := \
- a64l \
- abort \
- abs \
- arc4random \
- arc4random_uniform \
- 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 \
- 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 \
- stdc_bit_ceil_uc \
- stdc_bit_ceil_ui \
- stdc_bit_ceil_ul \
- stdc_bit_ceil_ull \
- stdc_bit_ceil_us \
- stdc_bit_floor_uc \
- stdc_bit_floor_ui \
- stdc_bit_floor_ul \
- stdc_bit_floor_ull \
- stdc_bit_floor_us \
- stdc_bit_width_uc \
- stdc_bit_width_ui \
- stdc_bit_width_ul \
- stdc_bit_width_ull \
- stdc_bit_width_us \
- stdc_count_ones_uc \
- stdc_count_ones_ui \
- stdc_count_ones_ul \
- stdc_count_ones_ull \
- stdc_count_ones_us \
- stdc_count_zeros_uc \
- stdc_count_zeros_ui \
- stdc_count_zeros_ul \
- stdc_count_zeros_ull \
- stdc_count_zeros_us \
- stdc_first_leading_one_uc \
- stdc_first_leading_one_ui \
- stdc_first_leading_one_ul \
- stdc_first_leading_one_ull \
- stdc_first_leading_one_us \
- stdc_first_leading_zero_uc \
- stdc_first_leading_zero_ui \
- stdc_first_leading_zero_ul \
- stdc_first_leading_zero_ull \
- stdc_first_leading_zero_us \
- stdc_first_trailing_one_uc \
- stdc_first_trailing_one_ui \
- stdc_first_trailing_one_ul \
- stdc_first_trailing_one_ull \
- stdc_first_trailing_one_us \
- stdc_first_trailing_zero_uc \
- stdc_first_trailing_zero_ui \
- stdc_first_trailing_zero_ul \
- stdc_first_trailing_zero_ull \
- stdc_first_trailing_zero_us \
- stdc_has_single_bit_uc \
- stdc_has_single_bit_ui \
- stdc_has_single_bit_ul \
- stdc_has_single_bit_ull \
- stdc_has_single_bit_us \
- stdc_leading_ones_uc \
- stdc_leading_ones_ui \
- stdc_leading_ones_ul \
- stdc_leading_ones_ull \
- stdc_leading_ones_us \
- stdc_leading_zeros_uc \
- stdc_leading_zeros_ui \
- stdc_leading_zeros_ul \
- stdc_leading_zeros_ull \
- stdc_leading_zeros_us \
- stdc_trailing_ones_uc \
- stdc_trailing_ones_ui \
- stdc_trailing_ones_ul \
- stdc_trailing_ones_ull \
- stdc_trailing_ones_us \
- stdc_trailing_zeros_uc \
- stdc_trailing_zeros_ui \
- stdc_trailing_zeros_ul \
- stdc_trailing_zeros_ull \
- stdc_trailing_zeros_us \
- 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
+routines := \
+ atof atoi atol atoll \
+ abort \
+ bsearch qsort \
+ 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 \
+ arc4random arc4random_uniform \
+ 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 \
+ stdc_bit_ceil_uc stdc_bit_ceil_ui stdc_bit_ceil_ul \
+ stdc_bit_ceil_ull stdc_bit_ceil_us stdc_bit_floor_uc \
+ stdc_bit_floor_ui stdc_bit_floor_ul stdc_bit_floor_ull \
+ stdc_bit_floor_us stdc_bit_width_uc stdc_bit_width_ui \
+ stdc_bit_width_ul stdc_bit_width_ull stdc_bit_width_us \
+ stdc_count_ones_uc stdc_count_ones_ui stdc_count_ones_ul \
+ stdc_count_ones_ull stdc_count_ones_us stdc_count_zeros_uc \
+ stdc_count_zeros_ui stdc_count_zeros_ul stdc_count_zeros_ull \
+ stdc_count_zeros_us stdc_first_leading_one_uc stdc_first_leading_one_ui \
+ stdc_first_leading_one_ul stdc_first_leading_one_ull stdc_first_leading_one_us \
+ stdc_first_leading_zero_uc stdc_first_leading_zero_ui stdc_first_leading_zero_ul \
+ stdc_first_leading_zero_ull stdc_first_leading_zero_us stdc_first_trailing_one_uc \
+ stdc_first_trailing_one_ui stdc_first_trailing_one_ul stdc_first_trailing_one_ull \
+ stdc_first_trailing_one_us stdc_first_trailing_zero_uc stdc_first_trailing_zero_ui \
+ stdc_first_trailing_zero_ul stdc_first_trailing_zero_ull stdc_first_trailing_zero_us \
+ stdc_has_single_bit_uc stdc_has_single_bit_ui stdc_has_single_bit_ul \
+ stdc_has_single_bit_ull stdc_has_single_bit_us stdc_leading_ones_uc \
+ stdc_leading_ones_ui stdc_leading_ones_ul stdc_leading_ones_ull \
+ stdc_leading_ones_us stdc_leading_zeros_uc stdc_leading_zeros_ui \
+ stdc_leading_zeros_ul stdc_leading_zeros_ull stdc_leading_zeros_us \
+ stdc_trailing_ones_uc stdc_trailing_ones_ui stdc_trailing_ones_ul \
+ stdc_trailing_ones_ull stdc_trailing_ones_us stdc_trailing_zeros_uc \
+ stdc_trailing_zeros_ui stdc_trailing_zeros_ul stdc_trailing_zeros_ull \
+ stdc_trailing_zeros_us \
+ a64l l64a \
+ rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
+ getcontext setcontext makecontext swapcontext
# Exclude fortified routines from being built with _FORTIFY_SOURCE
routines_no_fortify += \
--
2.37.3
next reply other threads:[~2024-04-01 11:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 11:44 abushwang [this message]
2024-04-01 12:03 ` Xi Ruoyao
2024-04-01 11:47 abush wang
2024-04-01 13:12 ` Florian Weimer
2024-04-01 13:17 ` H.J. Lu
2024-04-01 13:46 ` Adhemerval Zanella Netto
2024-04-02 3:54 ` abush wang
2024-04-08 2:48 ` abush wang
2024-04-02 2:17 ` abush wang
2024-04-02 2:28 ` abush wang
2024-04-02 3:13 ` H.J. Lu
2024-04-02 6:18 ` abush wang
2024-04-02 14:15 ` Adhemerval Zanella Netto
2024-04-03 1:57 ` abush wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240401114416.2389227-1-abushwangs@gmail.com \
--to=abushwangs@gmail.com \
--cc=abushwang@tencent.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).