Skip to content

Commit

Permalink
Fix a problem with kernel extensions on macOS
Browse files Browse the repository at this point in the history
On macOS, kernel extensions built against non-installed GAP could
not be loaded into an executable built using libgap, such as
`tst/testlibgap/basic`. Resolve this by building kernel extensions
again with flat namespace (thus matching the behavior of the Linux
dynamic linker more closely), as we used to when we were still
using libtool for kernel extensions

This problem was only relevant for non-installed GAP builds.
For GAP installed via `make install` and kernel extensions built
against that, all was and is fine.
  • Loading branch information
fingolfin committed Dec 10, 2022
1 parent f62271f commit aed43ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ ifneq (,$(findstring cygwin,$(host_os)))
else
ifneq (,$(findstring darwin,$(host_os)))
GAC_CFLAGS = -fno-common
GAC_LDFLAGS = -bundle -bundle_loader $(SYSINFO_GAP)
GAC_LDFLAGS = -bundle -flat_namespace -bundle_loader $(SYSINFO_GAP)
GAC_LDFLAGS_FOR_INSTALL = -bundle -L$(libdir) -lgap
else
GAC_CFLAGS = -fPIC
Expand Down

0 comments on commit aed43ee

Please sign in to comment.