Skip to content

Commit

Permalink
create symlinks without ldconfig to avoid segfault on qemu/aarch64 sy…
Browse files Browse the repository at this point in the history
…stem
  • Loading branch information
gisogrimm committed Jul 7, 2024
1 parent de05629 commit 946fcf7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions libtascar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ else
ifeq ($(UNAME_S),Linux)

lib: $(BUILD_OBJECTS) build/lib$(PLUGINPREFIX)tascar.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascargui.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascardmx.so.$(LIBVERSION)
ldconfig -niv build

symlink: build/lib$(PLUGINPREFIX)tascar.so build/lib$(PLUGINPREFIX)tascargui.so build/lib$(PLUGINPREFIX)tascardmx.so
#ldconfig -niv build

symlink:
#build/lib$(PLUGINPREFIX)tascar.so build/lib$(PLUGINPREFIX)tascargui.so build/lib$(PLUGINPREFIX)tascardmx.so
else
# probably on MacOS
lib: $(BUILD_OBJECTS) build/lib$(PLUGINPREFIX)tascar.0.dylib build/lib$(PLUGINPREFIX)tascargui.0.dylib build/lib$(PLUGINPREFIX)tascardmx.0.dylib
Expand All @@ -109,17 +111,23 @@ endif
endif

build/lib$(PLUGINPREFIX)tascar.so.%: $(BUILD_OBJECTS)
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascar.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS}
rm -f build/lib$(PLUGINPREFIX)tascar.so
rm -f build/lib$(PLUGINPREFIX)tascar.so* && \
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascar.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS} && \
ln -s lib$(PLUGINPREFIX)tascar.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascar.so && \
ln -s lib$(PLUGINPREFIX)tascar.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascar.so.$(SOVERSION)

build/lib$(PLUGINPREFIX)tascargui.so.%: EXTERNALS += gtkmm-3.0
build/lib$(PLUGINPREFIX)tascargui.so.%: $(BUILD_GUIOBJECTS)
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascargui.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS}
rm -f build/lib$(PLUGINPREFIX)tascargui.so
rm -f build/lib$(PLUGINPREFIX)tascargui.so* && \
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascargui.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS} && \
ln -s lib$(PLUGINPREFIX)tascargui.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascargui.so && \
ln -s lib$(PLUGINPREFIX)tascargui.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascargui.so.$(SOVERSION)

build/lib$(PLUGINPREFIX)tascardmx.so.%: $(BUILD_DMXOBJECTS)
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascardmx.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS}
rm -f build/lib$(PLUGINPREFIX)tascardmx.so
rm -f build/lib$(PLUGINPREFIX)tascardmx.so* && \
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascardmx.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS} && \
ln -s lib$(PLUGINPREFIX)tascardmx.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascardmx.so && \
ln -s lib$(PLUGINPREFIX)tascardmx.so.$(LIBVERSION) build/lib$(PLUGINPREFIX)tascardmx.so.$(SOVERSION)

build/lib$(PLUGINPREFIX)tascar-$(LIBVERSION).dll: $(BUILD_OBJECTS)
$(CXX) -shared -Wl,-soname,lib$(PLUGINPREFIX)tascar.so.$(SOVERSION) -o $@ $^ ${LDFLAGS} ${LDLIBS}
Expand Down

0 comments on commit 946fcf7

Please sign in to comment.