mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 12:18:47 +00:00
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.
This commit is contained in:
parent
993dfc059d
commit
635ded3393
4
Makefile
4
Makefile
@ -25,7 +25,7 @@ GENH = src/version.h
|
|||||||
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
|
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
|
||||||
NO_AS_NEEDED = -Wl,--no-as-needed
|
NO_AS_NEEDED = -Wl,--no-as-needed
|
||||||
LIBDL = -ldl
|
LIBDL = -ldl
|
||||||
LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
|
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
|
||||||
INC =
|
INC =
|
||||||
PIC = -fPIC
|
PIC = -fPIC
|
||||||
AR = $(CROSS_COMPILE)ar
|
AR = $(CROSS_COMPILE)ar
|
||||||
@ -82,7 +82,7 @@ src/version.o: src/version.h
|
|||||||
|
|
||||||
$(LDSO_PATHNAME): $(LOBJS)
|
$(LDSO_PATHNAME): $(LOBJS)
|
||||||
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
|
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
|
||||||
-o $@ $(LOBJS)
|
-shared -o $@ $(LOBJS)
|
||||||
|
|
||||||
$(ALL_TOOLS): $(OBJS)
|
$(ALL_TOOLS): $(OBJS)
|
||||||
$(CC) src/main.o src/common.o $(USER_LDFLAGS) -o $(PXCHAINS)
|
$(CC) src/main.o src/common.o $(USER_LDFLAGS) -o $(PXCHAINS)
|
||||||
|
Loading…
Reference in New Issue
Block a user