From patchwork Sun Jun 30 19:29:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 255943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 7DAA72C00A1 for ; Mon, 1 Jul 2013 07:20:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2C5773085F; Sun, 30 Jun 2013 21:19:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ovok3lRgreIM; Sun, 30 Jun 2013 21:19:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BBBF02645C; Sun, 30 Jun 2013 21:19:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9D5E08F79F for ; Sun, 30 Jun 2013 21:19:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 880A78B41C for ; Sun, 30 Jun 2013 21:19:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CGNahfU5cDak for ; Sun, 30 Jun 2013 21:18:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id 715BC909BA for ; Sun, 30 Jun 2013 19:29:36 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 9C7AF1C0E; Sun, 30 Jun 2013 21:29:36 +0200 (CEST) Received: from localhost (AToulouse-651-1-103-169.w109-222.abo.wanadoo.fr [109.222.70.169]) by mail.free-electrons.com (Postfix) with ESMTPSA id 50D8575A for ; Sun, 30 Jun 2013 21:29:36 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 30 Jun 2013 21:29:11 +0200 Message-Id: <1372620553-11416-22-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372620553-11416-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1372620553-11416-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCH 21/23] eglibc: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This commit adds a target 'eglibc' package. For now, there is no way to build this package, the next commit will add the integration of eglibc into the Buildroot toolchain backend. Signed-off-by: Thomas Petazzoni --- package/eglibc/eglibc.mk | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 package/eglibc/eglibc.mk diff --git a/package/eglibc/eglibc.mk b/package/eglibc/eglibc.mk new file mode 100644 index 0000000..ec80d5e --- /dev/null +++ b/package/eglibc/eglibc.mk @@ -0,0 +1,94 @@ +################################################################################ +# +# eglibc +# +################################################################################ + +EGLIBC_VERSION = 2.17-svnr22064 +EGLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/ +EGLIBC_SOURCE = eglibc-$(EGLIBC_VERSION).tar.bz2 + +# Before eglibc is configured, we must have the first stage +# cross-compiler and the kernel headers +EGLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk + +# Before eglibc is built, we must have the second stage cross-compiler +eglibc-build: host-gcc-intermediate + +EGLIBC_SUBDIR = build + +EGLIBC_INSTALL_STAGING = YES + ++EGLIBC_INSTALL_STAGING_OPT = install_root=$(STAGING_DIR) install + +# Even though we use the autotools-package infrastructure, we have to +# override the default configure commands for several reasons: +# +# 1. We have to build out-of-tree, but we can't use the same +# 'symbolic link to configure' used with the gcc packages. +# +# 2. We have to execute the configure script with bash and not sh. +# +define EGLIBC_CONFIGURE_CMDS + mkdir -p $(@D)/build + # Do the configuration + (cd $(@D)/build; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-O2" CPPFLAGS="" CXXFLAGS="-O2" \ + $(SHELL) $(@D)/libc/configure \ + ac_cv_path_BASH_SHELL=/bin/bash \ + libc_cv_forced_unwind=yes \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --enable-shared \ + $(if $(BR2_SOFT_FLOAT),--without-fp,--with-fp) \ + --with-pkgversion="Buildroot" \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --enable-obsolete-rpc \ + --with-headers=$(STAGING_DIR)/usr/include) + # Install headers and start files + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build \ + install_root=$(STAGING_DIR) \ + install-bootstrap-headers=yes \ + install-headers + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build csu/subdir_lib + cp $(@D)/build/csu/crt1.o $(STAGING_DIR)/usr/lib/ + cp $(@D)/build/csu/crti.o $(STAGING_DIR)/usr/lib/ + cp $(@D)/build/csu/crtn.o $(STAGING_DIR)/usr/lib/ + $(TARGET_CROSS)gcc -nostdlib $(REALLY_NOSTDLIB) \ + -nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libc.so +endef + + +# +# We also override the install to target commands since we only want +# to install the libraries, and nothing more. +# + +EGLIBC_LIBS_LIB = \ + ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so \ + libnsl.so libpthread.so libresolv.so librt.so libutil.so \ + libnss_files.so libnss_dns.so + +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +EGLIBC_LIBS_LIB += libthread_db.so +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +EGLIBC_LIBS_USR_LIB += libstdc++.so +endif + +define EGLIBC_INSTALL_TARGET_CMDS + for libs in $(EGLIBC_LIBS_LIB); do \ + $(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \ + done + for libs in $(EGLIBC_LIBS_USR_LIB); do \ + $(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/usr/lib) ; \ + done +endef + +$(eval $(autotools-package))