Hi, Pls find the 2nd patch of the series: - [PATCH V2 2/3] - Cygwin: math: split math sources into 2 groups
In-Lined patch 2/3: >From 9bdf88e17c7b47675eff455bf35cce9ac0a33b4c Mon Sep 17 00:00:00 2001 From: Thirumalai Nagalingam <[email protected]> Date: Wed, 27 Aug 2025 01:28:05 +0530 Subject: [PATCH 2/3] Cygwin: math: split math sources into 2 groups Refactor `Makefile.am` to separate math sources into two groups: - `COMMON_MATH_FILES`: sources always built on all architectures. - `LONG_DOUBLE_MATH_FILES`: sources only needed when `long double` is distinct from `double`. `MATH_FILES` is now selected based on the target architecture: - On AArch64: only common files are built. - On other architectures: both common and long double files are built. This avoids duplicating nearly identical file lists and prepares for excluding redundant long double implementations on AArch64. Signed-off-by: Thirumalai Nagalingam <[email protected]> --- winsup/cygwin/Makefile.am | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am index 90a7332a8..ade1f19a9 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am @@ -153,7 +153,7 @@ LIBC_FILES= \ libc/tss.c \ libc/xsique.cc -MATH_FILES= \ +COMMON_MATH_FILES = \ math/acoshl.c \ math/acosl.c \ math/asinhl.c \ @@ -243,12 +243,31 @@ MATH_FILES= \ math/sinhl.c \ math/sinl.c \ math/sinl_internal.S \ - math/sqrtl.c \ math/tanhl.c \ math/tanl.S \ math/tgammal.c \ math/truncl.c +# +# The below MATH_FILES are excluded on AArch64 platform, as long double == double +# So aliasing via cygwin.din them instead of duplicating it in cygwin/math +# + +LONG_DOUBLE_MATH_FILES = \ + math/sqrtl.c + +# +# Select the math sources depending on the target architecture. +# On AArch64: only common files are built. +# On other architectures: build common files + long double math files. +# + +if TARGET_AARCH64 +MATH_FILES = $(COMMON_MATH_FILES) +else +MATH_FILES = $(COMMON_MATH_FILES) $(LONG_DOUBLE_MATH_FILES) +endif + MM_FILES = \ mm/cygheap.cc \ mm/heap.cc \ -- 2.50.1.windows.1 Thanks & regardsĀ Thirumalai N
0002-Cygwin-math-split-math-sources-into-2-groups.patch
Description: 0002-Cygwin-math-split-math-sources-into-2-groups.patch
