void-packages/srcpkgs/ladspa-sdk/patches/fix-pie.patch

35 lines
1.0 KiB
Diff

--- src/makefile.orig
+++ src/Makefile
@@ -15,7 +15,7 @@
INCLUDES = -I.
LIBRARIES = -ldl -lm
-CFLAGS = $(INCLUDES) -Wall -Werror -O2 -fPIC \
+CFLAGS += $(INCLUDES) -Wall -Werror -O2 -fPIC \
-DDEFAULT_LADSPA_PATH=$(INSTALL_PLUGINS_DIR)
BINFLAGS = -fPIE -pie
CXXFLAGS = $(CFLAGS)
@@ -83,17 +83,17 @@
../bin/applyplugin: applyplugin.o load.o default.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/applyplugin \
- applyplugin.o load.o default.o \
+ applyplugin.o load.o default.o $(LDFLAGS) \
$(LIBRARIES)
../bin/analyseplugin: analyseplugin.o load.o default.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/analyseplugin \
- analyseplugin.o load.o default.o \
+ analyseplugin.o load.o default.o $(LDFLAGS) \
$(LIBRARIES)
../bin/listplugins: listplugins.o search.o
$(CC) $(CFLAGS) $(BINFLAGS) \
-o ../bin/listplugins \
- listplugins.o search.o \
+ listplugins.o search.o $(LDFLAGS) \
$(LIBRARIES)
###############################################################################