File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,15 @@ def _make_tool_impl(ctx):
8181 if os_name (ctx ) == "macos" :
8282 non_sysroot_ldflags += ["-undefined" , "error" ]
8383
84+ # On macOS, remove "-lm".
85+ # During compilation, the ./configure script disables USE_SYSTEM_GLOB,
86+ # and chooses its own glob implementation (lib/glob.h, lib/glob.c).
87+ # all source files in lib/* are compiled to ./lib/libgnu.a
88+ # However, at link time, "-lm" appears before "-lgnu".
89+ # This linker commandline is like this: LINKER ... -lm -L./lib -o xxx ... -lgnu
90+ # So the system glob is linked instead, causing ABI conflicts.
91+ non_sysroot_ldflags = [x for x in non_sysroot_ldflags if x != "-lm" ]
92+
8493 configure_options = [
8594 "--without-guile" ,
8695 "--with-guile=no" ,
You can’t perform that action at this time.
0 commit comments