Remove existing old link before creating a new one
[lede.git] / toolchain / kernel-headers / Makefile
index ca8a78ff162ea36e4ebee6472d266184b9a1e7a6..fa7d349baadc7077543922b19c95abdbfa02b541 100644 (file)
@@ -36,6 +36,7 @@ HOST_EXTRACFLAGS=
 LINUX_HAS_HEADERS_INSTALL:=y
 
 KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
+       HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
        ARCH=$(LINUX_KARCH) \
        CC="$(KERNEL_CC)" \
        CFLAGS="$(TARGET_CFLAGS)" \
@@ -56,28 +57,11 @@ ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
        $(CP) \
                $(HOST_BUILD_DIR)/arch/mips/include/asm/asm.h \
                $(HOST_BUILD_DIR)/arch/mips/include/asm/regdef.h \
+               $(HOST_BUILD_DIR)/arch/mips/include/asm/asm-eva.h \
                $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
   endef
 endif
 
-define Host/Configure/post/cris
-       $(CP) \
-               $(HOST_BUILD_DIR)/include/linux/user.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/linux/
-       ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch-v10/arch \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch
-       $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/user.h
-endef
-
-define Host/Configure/post/ubicom32
-       $(CP) \
-               $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/elf.h \
-               $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/user.h \
-               $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page.h \
-               $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page_offset.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
-endef
-
 define Host/Configure/post/mips
        $(call Host/Configure/lzma)
 endef
@@ -88,7 +72,8 @@ endef
 
 define Host/Prepare
        $(call Kernel/Prepare/Default)
-       ln -sf linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux
+       rm -f $(BUILD_DIR_TOOLCHAIN)/linux
+       ln -s linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux
        $(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile
 endef