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.

31 lines
1.2 KiB

  1. From cb16c9b1be1a0d11a26a3027af8168bd314c4114 Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Mon, 16 Mar 2020 15:18:16 +0800
  4. Subject: [PATCH] datapath: unexport LDFLAGS
  5. OpenWrt build system will put "-specs=.../hardened-pie-ld.specs" into
  6. LDFLAGS when building PIE binaries. However the "-specs" argument is
  7. inteneded for "gcc" the driver while "ld" the linker when presented will
  8. complain it as unrecognized error.
  9. This can cause Kbuild error when building datapath kernel modules. The
  10. issue should only happen when compiling against upstream kernel 4.14 and
  11. earlier. Later ones should have been fixed with kernel upstream commit
  12. d503ac531a5 ("kbuild: rename LDFLAGS to KBUILD_LDFLAGS")
  13. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  14. ---
  15. datapath/linux/Makefile.in | 1 +
  16. 1 file changed, 1 insertion(+)
  17. diff --git a/datapath/linux/Makefile.in b/datapath/linux/Makefile.in
  18. index efc1663e4..61fcaa67e 100644
  19. --- a/datapath/linux/Makefile.in
  20. +++ b/datapath/linux/Makefile.in
  21. @@ -1,5 +1,6 @@
  22. ifeq ($(KERNELRELEASE),)
  23. # We're being called directly by running make in this directory.
  24. +unexport LDFLAGS
  25. include Makefile.main
  26. else
  27. # We're being included by the Linux kernel build system