Path: blob/main/python/py-numpy/src/patches/04-random-no-lm.patch
1067 views
--- native/numpy/random/setup.py 2022-09-09 06:36:30.000000000 -07001+++ wasm/numpy/random/setup.py 2022-09-19 21:32:55.000000000 -07002@@ -38,8 +38,11 @@3EXTRA_LINK_ARGS = []4EXTRA_LIBRARIES = ['npyrandom']5if os.name != 'nt':6+ # python-wasm -- because we're explicitly using "zig wasm-ld" including -lm breaks, and isn't needed anyways, due to how7+ # we load dynamic libraries.8+ pass9# Math lib10- EXTRA_LIBRARIES.append('m')11+ # EXTRA_LIBRARIES.append('m')12# Some bit generators exclude GCC inlining13EXTRA_COMPILE_ARGS = ['-U__GNUC_GNU_INLINE__']1415@@ -145,7 +148,11 @@16define_macros=defs,17)18config.add_data_files('_bounded_integers.pxd')19- mtrand_libs = ['m', 'npymath'] if os.name != 'nt' else ['npymath']20+ #mtrand_libs = ['m', 'npymath'] if os.name != 'nt' else ['npymath']21+22+ # python-wasm -- do not include -lm; see above comment.23+ mtrand_libs = ['npymath']24+25config.add_extension('mtrand',26sources=['mtrand.c',27'src/legacy/legacy-distributions.c',282930