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):
81
81
if os_name (ctx ) == "macos" :
82
82
non_sysroot_ldflags += ["-undefined" , "error" ]
83
83
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
+
84
93
configure_options = [
85
94
"--without-guile" ,
86
95
"--with-guile=no" ,
You can’t perform that action at this time.
0 commit comments