diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/Makefile.in | 2 | ||||
-rw-r--r-- | toolchain/gcc/Config.in.2 | 1 | ||||
-rw-r--r-- | toolchain/uClibc/Config.in.2 | 6 | ||||
-rw-r--r-- | toolchain/uClibc/Makefile.in | 4 | ||||
-rw-r--r-- | toolchain/uClibc/uclibc.mk | 30 |
5 files changed, 41 insertions, 2 deletions
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in index 1a2c0f26f..45ee14a3b 100644 --- a/toolchain/Makefile.in +++ b/toolchain/Makefile.in @@ -16,3 +16,5 @@ OPTIMIZE_FOR_CPU=$(ARCH) # gcc has a bunch of needed stuff.... include toolchain/gcc/Makefile.in + +include toolchain/uClibc/Makefile.in diff --git a/toolchain/gcc/Config.in.2 b/toolchain/gcc/Config.in.2 index c523b9705..24b316307 100644 --- a/toolchain/gcc/Config.in.2 +++ b/toolchain/gcc/Config.in.2 @@ -1,6 +1,7 @@ config BR2_PACKAGE_GCC_TARGET bool "native toolchain in the target filesystem" default n + select BR2_PACKAGE_UCLIBC_TARGET_HEADERS help If you want the target system to be able to run binutils/gcc and compile native code, say Y here. diff --git a/toolchain/uClibc/Config.in.2 b/toolchain/uClibc/Config.in.2 new file mode 100644 index 000000000..90a065e6e --- /dev/null +++ b/toolchain/uClibc/Config.in.2 @@ -0,0 +1,6 @@ +config BR2_PACKAGE_UCLIBC_TARGET_HEADERS + bool "install uClibc headers in the target filesystem" + default n + help + Install the uClibc headers and kernel-headers in the + target filesystem. diff --git a/toolchain/uClibc/Makefile.in b/toolchain/uClibc/Makefile.in new file mode 100644 index 000000000..f83651ef0 --- /dev/null +++ b/toolchain/uClibc/Makefile.in @@ -0,0 +1,4 @@ + +ifeq ($(strip $(BR2_PACKAGE_UCLIBC_TARGET_HEADERS)),y) +TARGETS+=uclibc_target_headers +endif diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index 8d26a7f74..09ff16b62 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -315,11 +315,37 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a fi; touch -c $(TARGET_DIR)/usr/lib/libc.a +$(TARGET_DIR)/usr/include/libc-internal.h: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a + $(MAKE1) -C $(UCLIBC_DIR) \ + PREFIX=$(TARGET_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_headers + # Install the kernel headers to the target dir if necessary + if [ ! -f $(TARGET_DIR)/usr/include/linux/version.h ] ; then \ + cp -pLR $(LINUX_HEADERS_DIR)/include/asm $(TARGET_DIR)/usr/include/ ; \ + cp -pLR $(LINUX_HEADERS_DIR)/include/linux $(TARGET_DIR)/usr/include/ ; \ + if [ -d $(LINUX_HEADERS_DIR)/include/asm-generic ] ; then \ + cp -pLR $(LINUX_HEADERS_DIR)/include/asm-generic \ + $(TARGET_DIR)/usr/include/ ; \ + fi; \ + fi; + +ifeq ($(BR2_PACKAGE_UCLIBC_TARGET_HEADERS),y) +uclibc_target_headers: $(TARGET_DIR)/usr/include/libc-internal.h +uclibc_target_headers-clean: + rm -rf $(TARGET_DIR)/usr/include +uclibc_target_headers-dirclean: + rm -rf $(TARGET_DIR)/usr/include +else +uclibc_target_headers: ; +endif + uclibc_target: gcc uclibc $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd uclibc_target-clean: - rm -f $(TARGET_DIR)/include + rm -rf $(TARGET_DIR)/usr/include uclibc_target-dirclean: - rm -f $(TARGET_DIR)/include + rm -rf $(TARGET_DIR)/usr/include |