Skip to content

Commit

Permalink
Fix for dynamic library versions on lnx and mac (#2165)
Browse files Browse the repository at this point in the history
* add soname on lnx

* Move substs to function in makefile

* Add CI step to check SONAME

* Update mac dylib versions

* Revert "Move substs to function in makefile"

This reverts commit 69790ab.

* Revert "add soname on lnx"

This reverts commit 610eb8d.

* Reworked soname option passing

* Release check on mac

* Add soname for onedal_dpc lib

* Revert "Release check on mac"

This reverts commit eecfca3.

* Revert "Add CI step to check SONAME"

This reverts commit 289c5c0.
  • Loading branch information
Alexsandruss authored and napetrov committed Dec 15, 2022
1 parent 3c8c4f9 commit 10caf82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dev/make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ link.static.mac = libtool -V -static -o $@ $(1:%_link.txt=-filelist %_link.txt)
LINK.DYNAMIC = $(mkdir)$(call rm,$@)$(link.dynamic.cmd)
link.dynamic.cmd = $(call link.dynamic.$(_OS),$(secure.opts.link.$(_OS)) $(or $1,$(^.no-mkdeps)) $(LOPT))
link.dynamic.lnx = $(if $(link.dynamic.lnx.$(COMPILER)),$(link.dynamic.lnx.$(COMPILER)),$(error link.dynamic.lnx.$(COMPILER) must be defined)) \
-shared $(-sGRP) $(patsubst %_link.txt,@%_link.txt,$(patsubst %_link.def,@%_link.def,$1)) $(-eGRP) -o $@
-Wl,-soname,$(@F).$(MAJORBINARY) -shared $(-sGRP) $(patsubst %_link.txt,@%_link.txt,$(patsubst %_link.def,@%_link.def,$1)) $(-eGRP) -o $@
link.dynamic.win = link $(link.dynamic.win.$(COMPILER)) -WX -nologo -map -dll $(-DEBL) \
$(patsubst %_link.txt,@%_link.txt,$(patsubst %.def,-DEF:%.def,$1)) -out:$@
link.dynamic.mac = $(if $(link.dynamic.mac.$(COMPILER)),$(link.dynamic.mac.$(COMPILER)),$(error link.dynamic.mac.$(COMPILER) must be defined)) \
-undefined dynamic_lookup -dynamiclib -Wl,-flat_namespace -Wl,-install_name,@rpath/$(@F) \
-Wl,-current_version,$(MAJOR).$(MINOR).$(UPDATE) -Wl,-compatibility_version,1.0.0 \
-Wl,-current_version,$(MAJORBINARY).$(MINORBINARY).0 -Wl,-compatibility_version,$(MAJORBINARY).0.0 \
-Wl,-headerpad_max_install_names $(patsubst %_link.txt,-filelist %_link.txt,$(patsubst %_link.def,@%_link.def,$1)) -o $@
link.dynamic.fbsd = $(if $(link.dynamic.fbsd.$(COMPILER)),$(link.dynamic.fbsd.$(COMPILER)),$(error link.dynamic.fbsd.$(COMPILER) must be defined)) \
-shared $(-sGRP) $(patsubst %_link.txt,@%_link.txt,$(patsubst %_link.def,@%_link.def,$1)) $(-eGRP) -o $@
Expand All @@ -139,7 +139,7 @@ link.dynamic.fbsd = $(if $(link.dynamic.fbsd.$(COMPILER)),$(link.dynamic.fbsd.$(
# Link dynamic DPC++ lib
DPC.LINK.DYNAMIC = $(mkdir)$(call rm,$@)$(dpc.link.dynamic.cmd)
dpc.link.dynamic.cmd = $(call dpc.link.dynamic.$(_OS),$(or $1,$(^.no-mkdeps)) $(LOPT))
dpc.link.dynamic.lnx = $(if $(link.dynamic.lnx.dpcpp),$(link.dynamic.lnx.dpcpp),$(error link.dynamic.lnx.dpcpp must be defined)) \
dpc.link.dynamic.lnx = $(if $(link.dynamic.lnx.dpcpp),$(link.dynamic.lnx.dpcpp),$(error link.dynamic.lnx.dpcpp must be defined)) -Wl,-soname,$(@F).$(MAJORBINARY) \
$(secure.opts.link.lnx) -shared $(-sGRP) $(patsubst %_link.txt,@%_link.txt,$(patsubst %_link.def,@%_link.def,$1)) $(-eGRP) -o $@
dpc.link.dynamic.win = $(if $(link.dynamic.win.dpcpp),$(link.dynamic.win.dpcpp),$(error link.dynamic.win.dpcpp must be defined)) \
-LD $(patsubst %_link.txt,@%_link.txt,$(filter %_link.txt,$1)) $(filter-out -IMPLIB:%,$(filter %.lib,$1)) -o$@ \
Expand Down

0 comments on commit 10caf82

Please sign in to comment.