Browse Source

Replace -lpthread with -pthread

According to Stack Overflow and GCC doc, -pthread is the correct way to use pthread.
This fix build error on riscv64.
tags/v2.4.1
Xeonacid Filipe Coelho <falktx@falktx.com> 9 months ago
parent
commit
67e38d1247
8 changed files with 37 additions and 37 deletions
  1. +1
    -1
      data/linux/build-deps.sh
  2. +18
    -18
      source/Makefile.mk
  3. +1
    -1
      source/backend/utils/Makefile
  4. +1
    -1
      source/bridges-ui/Makefile
  5. +1
    -1
      source/jackbridge/Makefile
  6. +1
    -1
      source/libjack/Makefile
  7. +1
    -1
      source/rest/Makefile
  8. +13
    -13
      source/tests.old/Makefile

+ 1
- 1
data/linux/build-deps.sh View File

@@ -310,7 +310,7 @@ if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
-Denable-floats=ON
make ${MAKE_ARGS}
make install
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" ${PREFIX}/lib/pkgconfig/fluidsynth.pc
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -pthread -lm|" ${PREFIX}/lib/pkgconfig/fluidsynth.pc
touch build-done
cd ..
fi


+ 18
- 18
source/Makefile.mk View File

@@ -609,7 +609,7 @@ endif
ifeq ($(LINUX),true)
ifeq ($(HAVE_ALSA),true)
RTAUDIO_FLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa) -lpthread
RTAUDIO_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa) -pthread
RTMIDI_FLAGS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags alsa) -D__LINUX_ALSA__
RTMIDI_LIBS += $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa)
endif
@@ -639,35 +639,35 @@ endif
endif # USING_JUCE_AUDIO_DEVICES

ifeq ($(BSD),true)
JACKBRIDGE_LIBS = -lpthread -lrt
JACKBRIDGE_LIBS = -pthread -lrt
LILV_LIBS = -lm -lrt
RTMEMPOOL_LIBS = -lpthread
WATER_LIBS = -lpthread -lrt
RTMEMPOOL_LIBS = -pthread
WATER_LIBS = -pthread -lrt
endif

ifeq ($(HAIKU),true)
JACKBRIDGE_LIBS = -lpthread
JACKBRIDGE_LIBS = -pthread
LILV_LIBS = -lm
RTMEMPOOL_LIBS = -lpthread
WATER_LIBS = -lpthread
RTMEMPOOL_LIBS = -pthread
WATER_LIBS = -pthread
endif

ifeq ($(HURD),true)
JACKBRIDGE_LIBS = -ldl -lpthread -lrt
JACKBRIDGE_LIBS = -ldl -pthread -lrt
LILV_LIBS = -ldl -lm -lrt
RTMEMPOOL_LIBS = -lpthread -lrt
WATER_LIBS = -ldl -lpthread -lrt
RTMEMPOOL_LIBS = -pthread -lrt
WATER_LIBS = -ldl -pthread -lrt
endif

ifeq ($(LINUX),true)
HYLIA_FLAGS = -DLINK_PLATFORM_LINUX=1
JACKBRIDGE_LIBS = -ldl -lpthread -lrt
JACKBRIDGE_LIBS = -ldl -pthread -lrt
LILV_LIBS = -ldl -lm -lrt
RTMEMPOOL_LIBS = -lpthread -lrt
WATER_LIBS = -ldl -lpthread -lrt
RTMEMPOOL_LIBS = -pthread -lrt
WATER_LIBS = -ldl -pthread -lrt
ifeq ($(USING_JUCE),true)
JUCE_AUDIO_DEVICES_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs alsa)
JUCE_CORE_LIBS = -ldl -lpthread -lrt
JUCE_CORE_LIBS = -ldl -pthread -lrt
JUCE_EVENTS_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs x11)
JUCE_GRAPHICS_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs freetype2)
JUCE_GUI_BASICS_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs x11 xext)
@@ -676,9 +676,9 @@ endif # LINUX

ifeq ($(MACOS),true)
HYLIA_FLAGS = -DLINK_PLATFORM_MACOSX=1
JACKBRIDGE_LIBS = -ldl -lpthread
JACKBRIDGE_LIBS = -ldl -pthread
LILV_LIBS = -ldl -lm
RTMEMPOOL_LIBS = -lpthread
RTMEMPOOL_LIBS = -pthread
WATER_LIBS = -framework AppKit
ifeq ($(USING_JUCE),true)
JUCE_AUDIO_BASICS_LIBS = -framework Accelerate
@@ -696,9 +696,9 @@ endif # MACOS
ifeq ($(WIN32),true)
HYLIA_FLAGS = -DLINK_PLATFORM_WINDOWS=1
HYLIA_LIBS = -liphlpapi
JACKBRIDGE_LIBS = -lpthread
JACKBRIDGE_LIBS = -pthread
LILV_LIBS = -lm
RTMEMPOOL_LIBS = -lpthread
RTMEMPOOL_LIBS = -pthread
WATER_LIBS = -luuid -lwsock32 -lwininet -lversion -lole32 -lws2_32 -loleaut32 -limm32 -lcomdlg32 -lshlwapi -lrpcrt4 -lwinmm
ifeq ($(USING_JUCE),true)
JUCE_AUDIO_DEVICES_LIBS = -lwinmm -lole32


+ 1
- 1
source/backend/utils/Makefile View File

@@ -49,7 +49,7 @@ LINK_FLAGS += $(X11_LIBS)
endif

ifneq ($(HAIKU),true)
LINK_FLAGS += -lpthread
LINK_FLAGS += -pthread
endif

ifeq ($(USING_JUCE),true)


+ 1
- 1
source/bridges-ui/Makefile View File

@@ -23,7 +23,7 @@ endif
# ---------------------------------------------------------------------------------------------------------------------

BUILD_CXX_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_UI -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -I$(CWD)/modules
LINK_FLAGS += $(WATER_LIBS) -lpthread
LINK_FLAGS += $(WATER_LIBS) -pthread

# ---------------------------------------------------------------------------------------------------------------------



+ 1
- 1
source/jackbridge/Makefile View File

@@ -15,7 +15,7 @@ LINK_FLAGS += $(JACKBRIDGE_LIBS)

WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive
WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive
WINE_LINK_FLAGS = $(LINK_FLAGS) $(LIBDL_LIBS) -lpthread -lstdc++
WINE_LINK_FLAGS = $(LINK_FLAGS) $(LIBDL_LIBS) -pthread -lstdc++

ifeq ($(JACKBRIDGE_DIRECT),true)
BUILD_CXX_FLAGS += $(JACK_FLAGS) -DJACKBRIDGE_DIRECT


+ 1
- 1
source/libjack/Makefile View File

@@ -23,7 +23,7 @@ endif

BUILD_C_FLAGS += -I$(CWD) -I$(CWD)/includes
BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils
LINK_FLAGS += -lpthread -lrt
LINK_FLAGS += -pthread -lrt

# ---------------------------------------------------------------------------------------------------------------------



+ 1
- 1
source/rest/Makefile View File

@@ -26,7 +26,7 @@ BUILD_CXX_FLAGS += -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules
LINK_FLAGS += -Wl,-rpath=$(shell realpath $(CWD)/../bin)
LINK_FLAGS += -L$(BINDIR) -lcarla_standalone2 -lcarla_utils
LINK_FLAGS += -lrestbed -lssl -lcrypto
LINK_FLAGS += -lpthread
LINK_FLAGS += -pthread

# ----------------------------------------------------------------------------------------------------------------------



+ 13
- 13
source/tests.old/Makefile View File

@@ -128,7 +128,7 @@ ctypes-test.so: ctypes-test.c .FORCED
# ---------------------------------------------------------------------------------------------------------------------

CachedPlugins: CachedPlugins.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/juce_core.a $(MODULEDIR)/lilv.a -ldl -lpthread
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/juce_core.a $(MODULEDIR)/lilv.a -ldl -pthread
ifneq ($(WIN32),true)
set -e; ./$@ && valgrind --leak-check=full ./$@
endif
@@ -146,14 +146,14 @@ ifneq ($(WIN32),true)
endif

CarlaPipeUtils: CarlaPipeUtils.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/juce_core.a -ldl -lpthread
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/juce_core.a -ldl -pthread
ifneq ($(WIN32),true)
set -e; valgrind --leak-check=full ./$@
# ./$@ &&
endif

CarlaPipeUtils.exe: CarlaPipeUtils.cpp ../utils/CarlaPipeUtils.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/water.a -lole32 -lshlwapi -lversion -lwsock32 -lwininet -lwinmm -lws2_32 -lpthread -static
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/water.a -lole32 -lshlwapi -lversion -lwsock32 -lwininet -lwinmm -lws2_32 -pthread -static

CarlaUtils1: CarlaUtils1.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
@@ -163,7 +163,7 @@ endif

CarlaUtils2: CarlaUtils2.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
$(MODULEDIR)/juce_core.a $(MODULEDIR)/lilv.a -ldl -lpthread -lrt
$(MODULEDIR)/juce_core.a $(MODULEDIR)/lilv.a -ldl -pthread -lrt
set -e; ./$@ && valgrind --leak-check=full ./$@

CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp
@@ -174,7 +174,7 @@ endif

CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
$(MODULEDIR)/juce_core.a -ldl -lpthread -lrt
$(MODULEDIR)/juce_core.a -ldl -pthread -lrt
ifneq ($(WIN32),true)
set -e; ./$@ && valgrind --leak-check=full ./$@
endif
@@ -198,7 +198,7 @@ ifneq ($(WIN32),true)
endif

WineJack: WineJack.cpp
$(WINECXX) $< $(BASE_FLAGS) -m32 -ljack -lpthread -o $@
$(WINECXX) $< $(BASE_FLAGS) -m32 -ljack -pthread -o $@
set -e; ./$@.exe

# ---------------------------------------------------------------------------------------------------------------------
@@ -214,11 +214,11 @@ sem: sem.cpp $(MODULEDIR)/jackbridge/*
# ---------------------------------------------------------------------------------------------------------------------

ChildProcess: ChildProcess.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) $(MODULEDIR)/juce_core.a -ldl -lpthread -lrt -o $@
$(CXX) $< $(PEDANTIC_CXX_FLAGS) $(MODULEDIR)/juce_core.a -ldl -pthread -lrt -o $@
valgrind --leak-check=full ./$@

CarlaMutex: CarlaMutex.cpp ../utils/CarlaMutex.hpp
$(CXX) $< -lpthread -o $@
$(CXX) $< -pthread -o $@
valgrind --leak-check=full ./$@

# ifneq ($(MACOS_OR_WIN32),true)
@@ -241,15 +241,15 @@ EngineEvents: EngineEvents.cpp
env LD_LIBRARY_PATH=../backend valgrind ./$@

PipeServer: PipeServer.cpp ../utils/CarlaPipeUtils.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -pthread -o $@
valgrind --leak-check=full ./$@

RtLinkedList: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp $(MODULEDIR)/rtmempool.a
$(CXX) $< $(MODULEDIR)/rtmempool.a $(PEDANTIC_CXX_FLAGS) -lpthread -o $@
$(CXX) $< $(MODULEDIR)/rtmempool.a $(PEDANTIC_CXX_FLAGS) -pthread -o $@
valgrind --leak-check=full ./$@

RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.hpp $(MODULEDIR)/rtmempool.a
$(CXX) $< $(MODULEDIR)/rtmempool.a $(GNU_CXX_FLAGS) -lpthread -o $@
$(CXX) $< $(MODULEDIR)/rtmempool.a $(GNU_CXX_FLAGS) -pthread -o $@
valgrind --leak-check=full ./$@

# ---------------------------------------------------------------------------------------------------------------------
@@ -263,11 +263,11 @@ debug:
# ---------------------------------------------------------------------------------------------------------------------

DISTRHO: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
$(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -lpthread -o $@
$(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi $(LINK_FLAGS) $(DGL_LIBS) -pthread -o $@
./DISTRHO

DISTRHO.so: DISTRHO.cpp ../modules/distrho/*.hpp ../modules/distrho/src/*.cpp
$(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi -DSHARED_DLL $(LINK_FLAGS) $(DGL_LIBS) -lpthread -shared -Wl,--no-undefined -o $@
$(CXX) $< ../modules/dgl.a $(PEDANTIC_CXX_FLAGS) -I../modules/distrho -I../modules/native-plugins/nekobi -DSHARED_DLL $(LINK_FLAGS) $(DGL_LIBS) -pthread -shared -Wl,--no-undefined -o $@

DGL: DGL.cpp ../modules/distrho/dgl/src/Window.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@


Loading…
Cancel
Save