Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Maddela <e7appew@gmail.com>2016-06-08 03:33:06 +0300
committerrofl0r <retnyg@gmx.net>2016-06-09 23:07:33 +0300
commit635ded3393bef00fa1b3875a839e7e841ef3385b (patch)
treeb03a8f558757c10292f183c0ad8a54cf8d1cded0
parent993dfc059d8ded26e7e965eb2be743f7e0c1d7ef (diff)
Fix build failure with -pie in user LDFLAGS
When hardening flags are set by Debian's auto build system, the project fails to build due to usage of -pie, which tells the linker to build a PIE binary, and since the user LDFLAGS are deliberately put later in the command line to override things, this overrides -shared. work around by putting it directly in the last position of the linker command line. closes #124 Commit message authored by commiter.
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e2f3e23..28169ab 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ GENH = src/version.h
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
NO_AS_NEEDED = -Wl,--no-as-needed
LIBDL = -ldl
-LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
+LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
INC =
PIC = -fPIC
AR = $(CROSS_COMPILE)ar
@@ -82,7 +82,7 @@ src/version.o: src/version.h
$(LDSO_PATHNAME): $(LOBJS)
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
- -o $@ $(LOBJS)
+ -shared -o $@ $(LOBJS)
$(ALL_TOOLS): $(OBJS)
$(CC) src/main.o src/common.o $(USER_LDFLAGS) -o $(PXCHAINS)