zardus / preeny

Some helpful preload libraries for pwning stuff.
BSD 2-Clause "Simplified" License
1.56k stars 171 forks source link

Better support for cross-compiling to 32 bit #50

Closed bennofs closed 5 years ago

bennofs commented 5 years ago

After these changes, all of the following now work correctly and produce a different target triple (in particular, compiling 32 bit on 64 bit host will put outputs into i386-pc-linux-gnu):

$ make # compiles normally
$ make -i ARCH=i386 # compiles for 32 bit x86, uses -m32 if host is x86_64
$ make -i CC=aarch64-linux-gnu-gcc # compiles for aarch64
$ make -i MACHINE=aarch64-linux-gnu # same as above
zardus commented 5 years ago

Sweet, thanks!