Browse Source

LTO must not be used for building wine stuff (not just linking)

Signed-off-by: falkTX <falktx@falktx.com>
pull/1723/head
falkTX 2 years ago
parent
commit
a31246bc49
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 17 additions and 16 deletions
  1. +17
    -16
      source/jackbridge/Makefile

+ 17
- 16
source/jackbridge/Makefile View File

@@ -13,18 +13,19 @@ include ../modules/Makefile.mk
BUILD_CXX_FLAGS += $(JACKBRIDGE_FLAGS)
LINK_FLAGS += $(JACKBRIDGE_LIBS)

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

WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive
WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive
WINE_BUILD_FLAGS = $(filter-out -flto,$(BUILD_CXX_FLAGS))
WINE_LINK_FLAGS = $(filter-out -flto -static-libgcc -static-libstdc++,$(LINK_FLAGS))
WINE_LINK_FLAGS += $(LIBDL_LIBS)
WINE_LINK_FLAGS += -pthread
WINE_LINK_FLAGS += -lstdc++

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

ifneq ($(MACOS),true)
WINE_32BIT_FLAGS += -I/usr/include/wine/wine/windows
WINE_32BIT_FLAGS += -I/usr/include/wine-development/windows
@@ -200,61 +201,61 @@ $(MODULEDIR)/$(MODULENAME)-wine64.dll$(LIB_EXT): $(OBJS_wine64) JackBridgeExport
$(OBJDIR)/JackBridge1.cpp.o: JackBridge1.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling JackBridge1.cpp"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) -c -o $@

$(OBJDIR)/JackBridge2.cpp.o: JackBridge2.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling JackBridge2.cpp"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) -c -o $@

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

$(OBJDIR)/JackBridgeExport.cpp.%32e.o: JackBridgeExport.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -fpermissive -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(32BIT_FLAGS) -fpermissive -c -o $@

$(OBJDIR)/JackBridgeExport.cpp.%64e.o: JackBridgeExport.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -fpermissive -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(64BIT_FLAGS) -fpermissive -c -o $@

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

$(OBJDIR)/%.cpp.arm32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (arm32)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(ARM32_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.posix32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (posix32)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(32BIT_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.posix64.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (posix64)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.win32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (win32)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(32BIT_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.win64.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (win64)"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
$(SILENT)$(CXX) $< $(WINE_BUILD_FLAGS) $(64BIT_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.wine32.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (wine32)"
$(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_32BIT_FLAGS) -c -o $@
$(SILENT)$(WINECC) $< $(WINE_BUILD_FLAGS) $(WINE_32BIT_FLAGS) -c -o $@

$(OBJDIR)/%.cpp.wine64.o: %.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $< (wine64)"
$(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_64BIT_FLAGS) -c -o $@
$(SILENT)$(WINECC) $< $(WINE_BUILD_FLAGS) $(WINE_64BIT_FLAGS) -c -o $@

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



Loading…
Cancel
Save