Skip to content

Commit 821249f

Browse files
committed
add new --fat-binary-m2 option
this enables arm64e in the proxychains4 binary additionally to the injected library, which already did so with the -m1 option. closes #569
1 parent fffd253 commit 821249f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ usage() {
8787
echo " to preload from current dir (possibly insecure, but handy)"
8888
echo "--fat-binary : build for both i386 and x86_64 architectures on 64-bit Macs"
8989
echo "--fat-binary-m1 : build for both arm64e and x86_64 architectures on M1 Macs"
90+
echo "--fat-binary-m2 : build for arm64, arm64e and x86_64 architectures on M2+ Macs"
9091
echo "--hookmethod=dlsym|dyld hook method for osx. default: auto"
9192
echo " if OSX >= 12 is detected, dyld method will be used if auto."
9293
echo "--help : show this text"
@@ -102,6 +103,7 @@ spliteq() {
102103

103104
fat_binary=
104105
fat_binary_m1=
106+
fat_binary_m2=
105107
ignore_cve=no
106108
hookmethod=auto
107109

@@ -118,6 +120,7 @@ parsearg() {
118120
--hookmethod=*) hookmethod=`spliteq $1`;;
119121
--fat-binary) fat_binary=1;;
120122
--fat-binary-m1) fat_binary_m1=1;;
123+
--fat-binary-m2) fat_binary_m2=1;;
121124
--help) usage;;
122125
esac
123126
}
@@ -289,6 +292,12 @@ if ismac ; then
289292
echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
290293
echo "FAT_BIN_LDFLAGS=-arch arm64 -arch x86_64">>config.mak
291294
fi
295+
if [ "$fat_binary_m2" = 1 ] ; then
296+
echo "Configuring a fat binary for arm64[e] and x86_64"
297+
echo "MAC_CFLAGS+=-arch arm64 -arch arm64e -arch x86_64">>config.mak
298+
echo "FAT_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
299+
echo "FAT_BIN_LDFLAGS=-arch arm64 -arch arm64e -arch x86_64">>config.mak
300+
fi
292301
elif isbsd ; then
293302
echo LIBDL=>>config.mak
294303
echo "CFLAGS+=-DIS_BSD">>config.mak
@@ -302,3 +311,6 @@ elif ishaiku ; then
302311
fi
303312

304313
echo "Done, now run $make_cmd && $make_cmd install"
314+
if [ "$fat_binary_m2" = 1 ] ; then
315+
echo "Don't forget to run csrutil disable and sudo nvram boot-args=-arm64e_preview_abi"
316+
fi

0 commit comments

Comments
 (0)