mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-30 22:19:17 +02:00
do a little dance around older compilers
This commit is contained in:
parent
0d59fc7447
commit
33def7654a
c/meterpreter
@ -29,8 +29,8 @@ outputs += data/meterpreter/ext_server_sniffer.lso
|
|||||||
outputs += data/meterpreter/ext_server_networkpug.lso
|
outputs += data/meterpreter/ext_server_networkpug.lso
|
||||||
|
|
||||||
STD_CFLAGS = -Os -m32 -march=i386 -fno-stack-protector
|
STD_CFLAGS = -Os -m32 -march=i386 -fno-stack-protector
|
||||||
STD_CFLAGS += -Wl,--hash-style=sysv -fuse-ld=gold
|
STD_CFLAGS += -Wl,--hash-style=sysv
|
||||||
STD_CFLAGS += -lc -nostdinc -nostdlib -fno-builtin -fPIC -DPIC
|
STD_CFLAGS += -lc -lm -nostdinc -nostdlib -fno-builtin -fPIC -DPIC
|
||||||
STD_CFLAGS += -Dwchar_t='char' -D_SIZE_T_DECLARED -DElf_Size='u_int32_t'
|
STD_CFLAGS += -Dwchar_t='char' -D_SIZE_T_DECLARED -DElf_Size='u_int32_t'
|
||||||
STD_CFLAGS += -D_BYTE_ORDER=_LITTLE_ENDIAN -D_UNIX -D__linux__ -lgcc
|
STD_CFLAGS += -D_BYTE_ORDER=_LITTLE_ENDIAN -D_UNIX -D__linux__ -lgcc
|
||||||
STD_CFLAGS += -I$(LIBC)/include
|
STD_CFLAGS += -I$(LIBC)/include
|
||||||
@ -40,6 +40,11 @@ STD_CFLAGS += -I$(LIBC)/arch-x86/include/
|
|||||||
STD_CFLAGS += -I$(LIBC)/kernel/arch-x86/
|
STD_CFLAGS += -I$(LIBC)/kernel/arch-x86/
|
||||||
STD_CFLAGS += -L$(COMPILED)
|
STD_CFLAGS += -L$(COMPILED)
|
||||||
|
|
||||||
|
GCCGOLD = $(shell (echo "int main(){}" | gcc -fuse-ld=gold -o tmp -xc - && rm -f); echo $$?)
|
||||||
|
ifeq "$(GCCGOLD)" "0"
|
||||||
|
STD_CFLAGS += -fuse-ld=gold
|
||||||
|
endif
|
||||||
|
|
||||||
PCAP_CFLAGS = $(STD_CFLAGS)
|
PCAP_CFLAGS = $(STD_CFLAGS)
|
||||||
|
|
||||||
OSSL_CFLAGS = $(STD_CFLAGS) -I$(LIBC)/private -I$(LIBM)/include
|
OSSL_CFLAGS = $(STD_CFLAGS) -I$(LIBC)/private -I$(LIBM)/include
|
||||||
@ -143,11 +148,13 @@ depclean:
|
|||||||
rm -f source/bionic/lib*/*.o
|
rm -f source/bionic/lib*/*.o
|
||||||
find source/bionic/ -name '*.a' -print0 | xargs -0 rm -f 2>/dev/null
|
find source/bionic/ -name '*.a' -print0 | xargs -0 rm -f 2>/dev/null
|
||||||
find source/bionic/ -name '*.so' -print0 | xargs -0 rm -f 2>/dev/null
|
find source/bionic/ -name '*.so' -print0 | xargs -0 rm -f 2>/dev/null
|
||||||
|
find . -name 'build.log' | xargs rm -f
|
||||||
rm -f source/bionic/lib*/*.so
|
rm -f source/bionic/lib*/*.so
|
||||||
rm -rf source/openssl/lib/linux/i386/
|
rm -rf source/openssl/lib/linux/i386/
|
||||||
|
|
||||||
really-clean: clean clean-ssl clean-pcap depclean
|
really-clean: clean clean-ssl clean-pcap depclean
|
||||||
|
|
||||||
|
distclean: really-clean
|
||||||
|
|
||||||
.PHONY: clean clean-ssl clean-pcap really-clean debug
|
.PHONY: clean clean-ssl clean-pcap really-clean debug
|
||||||
|
|
||||||
|
@ -35,7 +35,10 @@ LDFLAGS += -Wl,--hash-style=sysv
|
|||||||
|
|
||||||
# Specify the gold linker because newer versions of the BFD linker strip
|
# Specify the gold linker because newer versions of the BFD linker strip
|
||||||
# important symbols from the shared libraries.
|
# important symbols from the shared libraries.
|
||||||
|
GCCGOLD = $(shell (echo "int main(){}" | gcc -fuse-ld=gold -o tmp -xc - && rm -f); echo $$?)
|
||||||
|
ifeq "$(GCCGOLD)" "0"
|
||||||
LDFLAGS += -fuse-ld=gold
|
LDFLAGS += -fuse-ld=gold
|
||||||
|
endif
|
||||||
|
|
||||||
%.o: %.c Makefile
|
%.o: %.c Makefile
|
||||||
@echo [CC] $@
|
@echo [CC] $@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user