You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
3.0 KiB

  1. From 4965b6d10b2f51f4b30a8c0a8f3a64cf48dea635 Mon Sep 17 00:00:00 2001
  2. From: Moritz Warning <moritzwarning@web.de>
  3. Date: Tue, 8 Mar 2022 19:09:47 +0100
  4. Subject: [PATCH 1/3] fix makefile
  5. ---
  6. make-linux.mk | 8 ++++----
  7. 1 file changed, 4 insertions(+), 4 deletions(-)
  8. --- a/make-linux.mk
  9. +++ b/make-linux.mk
  10. @@ -25,8 +25,8 @@ TIMESTAMP=$(shell date +"%Y%m%d%H%M")
  11. # otherwise build into binary as done on Mac and Windows.
  12. ONE_OBJS+=osdep/PortMapper.o
  13. override DEFS+=-DZT_USE_MINIUPNPC
  14. -MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1)
  15. -#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
  16. +MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
  17. +#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
  18. ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
  19. override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
  20. LDLIBS+=-lminiupnpc
  21. @@ -34,7 +34,7 @@ else
  22. override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
  23. ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o
  24. endif
  25. -ifeq ($(wildcard /usr/include/natpmp.h),)
  26. +ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
  27. ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
  28. else
  29. LDLIBS+=-lnatpmp
  30. @@ -66,11 +66,11 @@ ifeq ($(ZT_DEBUG),1)
  31. # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
  32. node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
  33. else
  34. - CFLAGS?=-O3 -fstack-protector -fPIE
  35. + CFLAGS?=-O3 -fstack-protector
  36. override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS)
  37. - CXXFLAGS?=-O3 -fstack-protector -fPIE
  38. + CXXFLAGS?=-O3 -fstack-protector
  39. override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
  40. - LDFLAGS=-pie -Wl,-z,relro,-z,now
  41. + LDFLAGS+=-Wl,-z,relro,-z,now
  42. RUSTFLAGS=--release
  43. endif
  44. @@ -300,7 +300,7 @@ ifeq ($(ZT_CONTROLLER),1)
  45. endif
  46. # ARM32 hell -- use conservative CFLAGS
  47. -ifeq ($(ZT_ARCHITECTURE),3)
  48. +ifeq (0,3)
  49. ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel)
  50. override CFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm
  51. override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm