Changeset 14120


Ignore:
Timestamp:
2009-01-20T18:05:14+01:00 (9 years ago)
Author:
nico
Message:

[toolchain] move all arch fixups from Install to Prepare stage, so that fixed headers are available in $(BUILD_DIR_TOOLCHAIN)/linux-dev/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/toolchain/kernel-headers/Makefile

    r13995 r14120  
    6363        mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include 
    6464        cp -pLR \ 
    65                 $(BUILD_DIR_TOOLCHAIN)/linux/include/asm \ 
    66                 $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-generic \ 
    67                 $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-$(LINUX_KARCH) \ 
    68                 $(BUILD_DIR_TOOLCHAIN)/linux/include/linux \ 
     65                $(PKG_BUILD_DIR)/include/asm \ 
     66                $(PKG_BUILD_DIR)/include/asm-generic \ 
     67                $(PKG_BUILD_DIR)/include/asm-$(LINUX_KARCH) \ 
     68                $(PKG_BUILD_DIR)/include/linux \ 
    6969                $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/ 
    7070  endef 
    7171endif 
    7272 
     73# XXX: the following is needed to build lzma-loader 
     74define Build/Prepare/lzma 
     75        $(CP) \ 
     76                $(PKG_BUILD_DIR)/include/asm-mips/asm.h \ 
     77                $(PKG_BUILD_DIR)/include/asm-mips/regdef.h \ 
     78                $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/ 
     79endef 
     80 
     81# XXX: the following is needed to build final gcc on cris 
     82define Build/Prepare/post/cris 
     83        mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch 
     84        $(CP) \ 
     85                $(PKG_BUILD_DIR)/include/asm-cris/arch/ptrace.h \ 
     86                $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch/ 
     87endef 
     88 
     89define Build/Prepare/post/mips 
     90        $(call Build/Prepare/lzma) 
     91endef 
     92 
     93define Build/Prepare/post/mipsel 
     94        $(call Build/Prepare/lzma) 
     95endef 
     96 
    7397define Build/Prepare 
    7498        $(call Kernel/Prepare/Default) 
     99        ln -sf linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux 
    75100        $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile 
    76         ln -sf linux-$(LINUX_VERSION) $(LINUX_HEADERS_DIR) 
    77101        yes '' | $(KMAKE) oldconfig 
    78102        $(KMAKE) include/linux/version.h include/asm 
     
    84108        $(call Build/Prepare/pre/$(ARCH)) 
    85109        $(call Build/Prepare/all) 
     110        $(call Build/Prepare/post/$(ARCH)) 
    86111endef 
    87112 
     
    92117endef 
    93118 
    94 define Build/Install/all 
    95         mkdir -p $(TOOLCHAIN_DIR)/usr/include 
    96         $(CP) \ 
    97                 $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/* \ 
    98                 $(TOOLCHAIN_DIR)/usr/include/ 
    99 endef 
    100  
    101 # XXX: the following is needed to build lzma-loader 
    102 define Build/Install/post/lzma 
    103         $(CP) \ 
    104                 $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-mips/asm.h \ 
    105                 $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-mips/regdef.h \ 
    106                 $(TOOLCHAIN_DIR)/usr/include/asm/ 
    107 endef 
    108  
    109 # XXX: the following is needed to build final gcc on cris 
    110 define Build/Install/post/cris 
    111         mkdir -p $(TOOLCHAIN_DIR)/usr/include/asm/arch 
    112         $(CP) \ 
    113                 $(PKG_BUILD_DIR)/include/asm-cris/arch/ptrace.h \ 
    114                 $(TOOLCHAIN_DIR)/usr/include/asm/arch/ 
    115 endef 
    116  
    117 define Build/Install/post/mips 
    118         $(call Build/Install/post/lzma) 
    119 endef 
    120  
    121 define Build/Install/post/mipsel 
    122         $(call Build/Install/post/lzma) 
    123 endef 
    124  
    125119define Build/Install 
    126         $(call Build/Install/all) 
    127         $(call Build/Install/post/$(ARCH)) 
     120        $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(TOOLCHAIN_DIR)/ 
    128121endef 
    129122 
Note: See TracChangeset for help on using the changeset viewer.