1commit 2c1fb491120a150743c7a1d4a5e08301361f0ec92Author: Francesco Colista <fcolista@alpinelinux.org>3Date: Fri Nov 21 14:26:09 2025 +000045 Added musl compatibility layer67diff --git a/simde/musl-roundeven-compat.h b/simde/musl-roundeven-compat.h8new file mode 1006449index 0000000..d3b31f610--- /dev/null11+++ b/simde/musl-roundeven-compat.h12@@ -0,0 +1,19 @@13+#if defined(__musl__)14+/* musl does not provide roundeven()/roundevenf(), and GCC may generate calls15+ to them during LTO even when SIMDe tries to avoid it.16+ Provide lightweight wrappers to ensure linking succeeds. */17+18+#include <math.h>19+20+static inline float simde_musl_roundevenf(float x) {21+ return nearbyintf(x); /* nearbyintf implements ties-to-even */22+}23+24+static inline double simde_musl_roundeven(double x) {25+ return nearbyint(x);26+}27+28+#define roundevenf simde_musl_roundevenf29+#define roundeven simde_musl_roundeven30+#endif31+32diff --git a/simde/simde-common.h b/simde/simde-common.h33index 5a755cc..2719642 10064434--- a/simde/simde-common.h35+++ b/simde/simde-common.h36@@ -1,3 +1,6 @@37+/* musl compatibility shim: ensure roundevenf()/roundeven() exist */38+#include "musl-roundeven-compat.h"39+40 /* SPDX-License-Identifier: MIT41 *42 * Permission is hereby granted, free of charge, to any person