diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-27 22:14:21 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-27 22:14:21 +0200 |
commit | bbd610f15a71b27c955175cb98392b114717fd47 (patch) | |
tree | 13d196e0e70c15c119336f59fa8f7183884590d5 /package | |
parent | bad63eb735b13e1f009a19af1dd810f7279c2ba1 (diff) |
native build support
- just use native gcc and binutils to compile a system
- can be used to chroot into it
- maybe useful later on lemote book to build packages natively
Diffstat (limited to 'package')
-rw-r--r-- | package/Config.in | 3 | ||||
-rw-r--r-- | package/Makefile | 5 | ||||
-rw-r--r-- | package/busybox/Makefile | 17 | ||||
-rw-r--r-- | package/libc/Config.in | 9 | ||||
-rw-r--r-- | package/libc/Makefile | 31 | ||||
-rw-r--r-- | package/libc/ipkg/libc.control | 4 |
6 files changed, 68 insertions, 1 deletions
diff --git a/package/Config.in b/package/Config.in index 343386dd8..25badd5d0 100644 --- a/package/Config.in +++ b/package/Config.in @@ -10,9 +10,10 @@ menu "Applications" menu "Basesystem" source "package/base-files/Config.in" source "package/busybox/Config.in" -source "package/uclibc/Config.in" source "package/cfgfs/Config.in" +source "package/uclibc/Config.in" source "package/glibc/Config.in" +source "package/libc/Config.in" endmenu menu "Bluetooth" diff --git a/package/Makefile b/package/Makefile index 2cecd6d2d..512b6ebb5 100644 --- a/package/Makefile +++ b/package/Makefile @@ -111,6 +111,9 @@ package-$(ADK_PACKAGE_GLIB2) += glib2 ifeq (${ADK_TARGET_LIB_GLIBC},y) package-$(ADK_PACKAGE_GLIBC) += glibc endif +ifeq (${ADK_NATIVE},y) +package-$(ADK_PACKAGE_LIBC) += libc +endif package-$(ADK_PACKAGE_GMEDIASERVER) += gmediaserver package-$(ADK_COMPILE_GMP) += gmp package-$(ADK_COMPILE_GNUTLS) += gnutls @@ -360,7 +363,9 @@ package-$(ADK_PACKAGE_TOR) += tor package-$(ADK_PACKAGE_TRAFSHOW) += trafshow package-$(ADK_PACKAGE_TTCP) += ttcp ifneq (${ADK_TARGET_LIB_GLIBC},y) +ifneq (${ADK_NATIVE},y) package-$(ADK_PACKAGE_UCLIBC) += uclibc +endif package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++ endif package-$(ADK_PACKAGE_UDEV) += udev diff --git a/package/busybox/Makefile b/package/busybox/Makefile index cf0a9ba0e..e8edcd12b 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -22,18 +22,35 @@ do-configure: grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \ ${WRKBUILD}/.config $(SED) 's@IDIR@${WRKINST}' ${WRKBUILD}/.config +ifeq ($(ADK_NATIVE),y) + yes '' | \ + $(MAKE) V=1 \ + IPKG_ARCH="$(ARCH)" \ + ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig +else yes '' | \ $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" IPKG_ARCH="$(ARCH)" \ ARCH="$(ARCH)" -C $(WRKBUILD) oldconfig +endif do-build: +ifeq ($(ADK_NATIVE),y) + $(MAKE) V=1 \ + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) +else $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) +endif do-install: ${TOPDIR}/.config +ifeq ($(ADK_NATIVE),y) + $(MAKE) V=1 \ + IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install +else $(MAKE) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ IPKG_ARCH="$(ARCH)" ARCH="$(ARCH)" -C $(WRKBUILD) install +endif ifeq ($(DEBUG),1) ${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \ $(IDIR_BUSYBOX)/bin/busybox diff --git a/package/libc/Config.in b/package/libc/Config.in new file mode 100644 index 000000000..d8956f1d7 --- /dev/null +++ b/package/libc/Config.in @@ -0,0 +1,9 @@ +config ADK_PACKAGE_LIBC + prompt "libc............................... native C library" + tristate + default y if ADK_NATIVE + default n + depends on ADK_NATIVE + help + C library. + diff --git a/package/libc/Makefile b/package/libc/Makefile new file mode 100644 index 000000000..8ee90ff82 --- /dev/null +++ b/package/libc/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= libc +PKG_VERSION:= 1.0 +PKG_RELEASE:= 1 +NO_DISTFILES:= 1 + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBC,libc,$(PKG_VERSION)-$(PKG_RELEASE))) + +# do nothing, use native c library +do-install: + ${INSTALL_DIR} $(IDIR_LIBC)/lib $(IDIR_LIBC)/etc + # install /etc/localtime from host system (FIXME) + ${CP} /etc/localtime $(IDIR_LIBC)/etc + $(CP) /lib/libgcc_s.so.* $(IDIR_LIBC)/lib/ + $(CP) /lib/ld-*.so* $(IDIR_LIBC)/lib/ + -for file in libc libcrypt libdl libm libnsl libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ + $(CP) /lib/$$file.so.* $(IDIR_LIBC)/lib/; \ + $(CP) /lib/$$file-*.so $(IDIR_LIBC)/lib/; \ + done + # create ld.so link for ldd + cd $(IDIR_LIBC)/lib && ln -sf ld-linux.so.2 ld.so + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libc/ipkg/libc.control b/package/libc/ipkg/libc.control new file mode 100644 index 000000000..a522be5d5 --- /dev/null +++ b/package/libc/ipkg/libc.control @@ -0,0 +1,4 @@ +Package: libc +Priority: optional +Section: libs +Description: native standard C library |