From 916d2d7da15f124446a7366b9d5a1ef8b6a4dcce Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 31 May 2022 23:53:23 +0000 Subject: [PATCH] fix --fat-binary-m1 option even though the preload library was built correctly, the LDFLAGS set weren't passed to the main proxychains4 binary, resulting in link errors against the fat object files. closes #452 --- Makefile | 8 ++++---- configure | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 52a2306..3cfee96 100644 --- a/Makefile +++ b/Makefile @@ -93,14 +93,14 @@ src/version.o: src/version.h $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $< $(LDSO_PATHNAME): $(LOBJS) - $(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \ - -shared -o $@ $^ $(SOCKET_LIBS) + $(CC) $(LDFLAGS) $(FAT_LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) \ + $(USER_LDFLAGS) -shared -o $@ $^ $(SOCKET_LIBS) $(PXCHAINS): $(OBJS) - $(CC) $^ $(USER_LDFLAGS) $(LIBDL) -o $@ + $(CC) $^ $(FAT_LDFLAGS) $(USER_LDFLAGS) $(LIBDL) -o $@ $(PXCHAINS_D): $(DOBJS) - $(CC) $^ $(USER_LDFLAGS) -o $@ + $(CC) $^ $(FAT_LDFLAGS) $(USER_LDFLAGS) -o $@ .PHONY: all clean install install-config install-libs install-tools install-zsh-completion diff --git a/configure b/configure index 10403f1..57124d5 100755 --- a/configure +++ b/configure @@ -278,12 +278,12 @@ if ismac ; then if ismac64 && [ "$fat_binary" = 1 ] ; then echo "Configuring a fat binary for i386 and x86_64" echo "MAC_CFLAGS+=-arch i386 -arch x86_64">>config.mak - echo "LDFLAGS+=-arch i386 -arch x86_64">>config.mak + echo "FAT_LDFLAGS=-arch i386 -arch x86_64">>config.mak fi if [ "$fat_binary_m1" = 1 ] ; then echo "Configuring a fat binary for arm64e and x86_64" echo "MAC_CFLAGS+=-arch arm64e -arch x86_64">>config.mak - echo "LDFLAGS+=-arch arm64e -arch x86_64">>config.mak + echo "FAT_LDFLAGS=-arch arm64e -arch x86_64">>config.mak fi elif isbsd ; then echo LIBDL=>>config.mak