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
This commit is contained in:
rofl0r 2022-05-31 23:53:23 +00:00
parent 4b531806b2
commit 916d2d7da1
2 changed files with 6 additions and 6 deletions

View File

@ -93,14 +93,14 @@ src/version.o: src/version.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $< $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
$(LDSO_PATHNAME): $(LOBJS) $(LDSO_PATHNAME): $(LOBJS)
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \ $(CC) $(LDFLAGS) $(FAT_LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) \
-shared -o $@ $^ $(SOCKET_LIBS) $(USER_LDFLAGS) -shared -o $@ $^ $(SOCKET_LIBS)
$(PXCHAINS): $(OBJS) $(PXCHAINS): $(OBJS)
$(CC) $^ $(USER_LDFLAGS) $(LIBDL) -o $@ $(CC) $^ $(FAT_LDFLAGS) $(USER_LDFLAGS) $(LIBDL) -o $@
$(PXCHAINS_D): $(DOBJS) $(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 .PHONY: all clean install install-config install-libs install-tools install-zsh-completion

4
configure vendored
View File

@ -278,12 +278,12 @@ if ismac ; then
if ismac64 && [ "$fat_binary" = 1 ] ; then if ismac64 && [ "$fat_binary" = 1 ] ; then
echo "Configuring a fat binary for i386 and x86_64" echo "Configuring a fat binary for i386 and x86_64"
echo "MAC_CFLAGS+=-arch i386 -arch x86_64">>config.mak 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 fi
if [ "$fat_binary_m1" = 1 ] ; then if [ "$fat_binary_m1" = 1 ] ; then
echo "Configuring a fat binary for arm64e and x86_64" echo "Configuring a fat binary for arm64e and x86_64"
echo "MAC_CFLAGS+=-arch arm64e -arch x86_64">>config.mak 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 fi
elif isbsd ; then elif isbsd ; then
echo LIBDL=>>config.mak echo LIBDL=>>config.mak