From patchwork Wed Oct 10 06:07:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Holsgrove X-Patchwork-Id: 190553 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 035BA2C0081 for ; Wed, 10 Oct 2012 17:08:59 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sourceware.org; s=default; x=1350454140; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Content-Type:MIME-Version:Content-Transfer-Encoding: Subject:Message-Id:In-Reply-To:References:User-Agent:Date:From: To:Cc:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Subscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=qF6P6y4u+cC3RvouYNULhoL9i4g=; b=A6kP33AAzRd/VOK Nv2hdWgdTTbWw3WLQon7jRxsa45+c2Yubs9oeSadtLqHJodWavu9XZBBv+yWMhvj dNPJhum/YTEQZO4RPXuEdOphq0k6tPcq+5gbK7wRtD9GW0JwWfUCp2XUF4S6th2F StIilwjSbFp2EIvgsH0+UdT1vWYU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=sourceware.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Content-Type:MIME-Version:Content-Transfer-Encoding:Subject:X-Mercurial-Node:Message-Id:In-Reply-To:References:User-Agent:Date:From:To:Cc:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=cAy1g7pugEuxcmVtRfi8hPlEc4kEuC3ugsPviahKd54z64nx6YsOMebhIxNEap SWXXWef4htGahOc+a2m3SVU4Rw5B49z3aC8wOuSB23DxolSR8Rusfc6Jx0mXBzjN ezq9XuP4Q0/Z3s6d6VonC0YKE8pTFvM8B50dN+60rRBDA=; Received: (qmail 15596 invoked by alias); 10 Oct 2012 06:08:33 -0000 Received: (qmail 15578 invoked by uid 22791); 10 Oct 2012 06:08:31 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Oct 2012 06:08:20 +0000 Received: by mail-pa0-f41.google.com with SMTP id fa10so273060pad.0 for ; Tue, 09 Oct 2012 23:08:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to:cc:x-gm-message-state; bh=oJ+tfVjHlJmugQNHGQr+5q/warT5iCvxGdEcb94Z/7w=; b=pi27pQnBengSg4YS0whrz6nZOmtBmp4e3KIcX6zVvbJFKSLVH0sBUrQD6/HLkMehkz iW01cjN0D0lx4C0TPPFQVnWEwwkmaj3vUwlKo8e3p9VATEStV9azvgXLnjqP1QlYmoBJ xhjPGm/cFilrOqr4muLCaiIu+e+n3Z7x8IoVLtIHBNG4nZQWg3BBSZwSLl9RJ4nZNCeZ wjtNQs1oOQZULYWFPL2jGKRxn/tpN7CYfflibMp6bBRw9STnLCyTPfzXAKYE5+tYMChm JhILdCE92yTSOt/hw2R35Qshes4zU1O8WTDVfuhVcpIUX3w6rapcOTUAxrIaYLfmtED1 pReQ== Received: by 10.66.88.198 with SMTP id bi6mr59677911pab.23.1349849300507; Tue, 09 Oct 2012 23:08:20 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id oj1sm517791pbb.19.2012.10.09.23.08.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 23:08:19 -0700 (PDT) MIME-Version: 1.0 Subject: [PATCH 4 of 6] libc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom X-Mercurial-Node: e3e4a439914d0d206b08a7bed0245fc4854bc374 Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.3.1 Date: Wed, 10 Oct 2012 16:07:57 +1000 From: David Holsgrove To: bryanhundven@gmail.com, yann.morin.1998@free.fr Cc: crossgcc@sourceware.org X-Gm-Message-State: ALoCoQnArhbrsD05nDPQqwYUdyX7/OnWNgzLO3MfNtZyyEblTpL1Ci8ND4jhGJJ27W6cBUVV3DBe X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org # HG changeset patch # User David Holsgrove # Date 1349847854 -36000 # Node ID e3e4a439914d0d206b08a7bed0245fc4854bc374 # Parent 7748cfa416638a6d2b808628f6e9a84ed37a89e5 libc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom CUSTOM_LOCATION config options only presented in menuconfig if component CUSTOM version selected. --- For unsubscribe information see http://sourceware.org/lists.html#faq diff -r 7748cfa41663 -r e3e4a439914d config/libc/eglibc.in --- a/config/libc/eglibc.in Wed Oct 10 15:44:14 2012 +1000 +++ b/config/libc/eglibc.in Wed Oct 10 15:44:14 2012 +1000 @@ -85,6 +85,13 @@ help Selecting this will export the trunk of the eglibc subversion repository. +config LIBC_EGLIBC_CUSTOM + bool + prompt "Custom eglibc" + depends on EXPERIMENTAL + select LIBC_EGLIBC_2_16_or_later + select LIBC_CUSTOM + endchoice config LIBC_VERSION @@ -104,6 +111,7 @@ default "2_6" if LIBC_EGLIBC_V_2_6 default "2_5" if LIBC_EGLIBC_V_2_5 default "trunk" if LIBC_EGLIBC_V_TRUNK + default "custom" if LIBC_EGLIBC_CUSTOM config LIBC_EGLIBC_2_16_or_later bool @@ -140,6 +148,22 @@ config LIBC_EGLIBC_HAS_PKGVERSION_BUGURL bool +config LIBC_CUSTOM + bool + +if LIBC_EGLIBC_CUSTOM + +config LIBC_EGLIBC_CUSTOM_LOCATION + string + prompt "full path to custom eglibc source" + default "" + help + Enter the path to the directory (or tarball) of your source for eglibc, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/eglibc + +endif # LIBC_EGLIBC_CUSTOM +if ! LIBC_EGLIBC_CUSTOM + if CONFIGURE_has_svn config EGLIBC_REVISION @@ -189,6 +213,7 @@ comment "otherwise you won't be able to download eglibc" endif # ! CONFIGURE_has_svn +endif # ! LIBC_EGLIBC_CUSTOM config EGLIBC_OPT_SIZE bool diff -r 7748cfa41663 -r e3e4a439914d config/libc/glibc.in --- a/config/libc/glibc.in Wed Oct 10 15:44:14 2012 +1000 +++ b/config/libc/glibc.in Wed Oct 10 15:44:14 2012 +1000 @@ -9,34 +9,6 @@ choice bool - prompt "Retrieval method" - default LIBC_GLIBC_TARBALL - -config LIBC_GLIBC_TARBALL - bool - prompt "Released tarball" - help - Until end of Februrary 2009, there was no tarball for glibc releases - 2.8 and later. This was intentional. - - Then, all of a sudden, tarballs for those releases have appeared at the - traditional download place (ftp.gnu.org). - - Some of the glibc people argue that fixes are committed to the maintenance - branch, and thus it is the best plac e to retrieve the glibc from. - On the other hand, it might be preferable to always generate a toolchain - using a known code-base, so the toolchain can be reproducible. - - For version prior to 2.8, tarballs were readily available. - - If you want your toolchain to really be reproducible, say 'Y' here. - If you can live with a moving code-base, look at the other choice - entries, below. - -endchoice - -choice - bool prompt "glibc version" # Don't remove next line # CT_INSERT_VERSION_BELOW @@ -109,8 +81,60 @@ depends on OBSOLETE select LIBC_SUPPORT_LINUXTHREADS +config LIBC_GLIBC_CUSTOM + bool + prompt "Custom glibc" + depends on EXPERIMENTAL + select LIBC_CUSTOM + endchoice +config LIBC_CUSTOM + bool + +if LIBC_GLIBC_CUSTOM + +config LIBC_GLIBC_CUSTOM_LOCATION + string + prompt "full path to custom glibc source" + default "" + help + Enter the path to the directory (or tarball) of your source for glibc, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/glibc + +endif # LIBC_GLIBC_CUSTOM +if ! LIBC_GLIBC_CUSTOM + +choice + bool + prompt "Retrieval method" + default LIBC_GLIBC_TARBALL + +config LIBC_GLIBC_TARBALL + bool + prompt "Released tarball" + help + Until end of Februrary 2009, there was no tarball for glibc releases + 2.8 and later. This was intentional. + + Then, all of a sudden, tarballs for those releases have appeared at the + traditional download place (ftp.gnu.org). + + Some of the glibc people argue that fixes are committed to the maintenance + branch, and thus it is the best plac e to retrieve the glibc from. + On the other hand, it might be preferable to always generate a toolchain + using a known code-base, so the toolchain can be reproducible. + + For version prior to 2.8, tarballs were readily available. + + If you want your toolchain to really be reproducible, say 'Y' here. + If you can live with a moving code-base, look at the other choice + entries, below. + +endchoice + +endif # ! LIBC_GLIBC_CUSTOM + config LIBC_VERSION string # Don't remove next line @@ -130,3 +154,4 @@ default "2.6" if LIBC_GLIBC_V_2_6 default "2.5.1" if LIBC_GLIBC_V_2_5_1 default "2.5" if LIBC_GLIBC_V_2_5 + default "custom" if LIBC_GLIBC_CUSTOM diff -r 7748cfa41663 -r e3e4a439914d config/libc/newlib.in --- a/config/libc/newlib.in Wed Oct 10 15:44:14 2012 +1000 +++ b/config/libc/newlib.in Wed Oct 10 15:44:14 2012 +1000 @@ -52,8 +52,25 @@ In a word: use the CVS snapshot at your own risk! +config LIBC_NEWLIB_CUSTOM + bool + prompt "Custom newlib" + depends on EXPERIMENTAL + endchoice +if LIBC_NEWLIB_CUSTOM + +config LIBC_NEWLIB_CUSTOM_LOCATION + string + prompt "full path to custom newlib source" + default "" + help + Enter the path to the directory (or tarball) of your source for newlib, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/newlib + +endif # LIBC_NEWLIB_CUSTOM + config LIBC_VERSION string prompt "use CVS tag" if LIBC_NEWLIB_CVS @@ -63,6 +80,7 @@ default "1.19.0" if LIBC_NEWLIB_V_1_19_0 default "1.18.0" if LIBC_NEWLIB_V_1_18_0 default "1.17.0" if LIBC_NEWLIB_V_1_17_0 + default "custom" if LIBC_NEWLIB_CUSTOM help Enter the tag you want to use. Leave empty to use the 'head' of the repository. diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/eglibc.sh --- a/scripts/build/libc/eglibc.sh Wed Oct 10 15:44:14 2012 +1000 +++ b/scripts/build/libc/eglibc.sh Wed Oct 10 15:44:14 2012 +1000 @@ -28,9 +28,19 @@ *) svn_base+="/branches/eglibc-${CT_LIBC_VERSION}";; esac - CT_GetSVN "eglibc-${CT_LIBC_VERSION}" \ - "${svn_base}/libc" \ - "${CT_EGLIBC_REVISION:-HEAD}" + if [ "${CT_LIBC_CUSTOM}" = "y" ]; then + CT_TestAndAbort "Custom eglibc: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_EGLIBC_CUSTOM_LOCATION must be set." \ + -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_EGLIBC_CUSTOM_LOCATION}" + CT_LIBC_CUSTOM_LOCATION="${CT_LIBC_EGLIBC_CUSTOM_LOCATION}" + if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_EGLIBC_CUSTOM_LOCATION}" ]; then + CT_LIBC_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/eglibc" + fi + CT_GetCustom "eglibc-${CT_LIBC_VERSION}" "${CT_LIBC_CUSTOM_LOCATION}" + else + CT_GetSVN "eglibc-${CT_LIBC_VERSION}" \ + "${svn_base}/libc" \ + "${CT_EGLIBC_REVISION:-HEAD}" + fi if [ "${CT_LIBC_LOCALES}" = "y" ]; then extra_addons+=("localedef") diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Wed Oct 10 15:44:14 2012 +1000 +++ b/scripts/build/libc/glibc-eglibc.sh-common Wed Oct 10 15:44:14 2012 +1000 @@ -5,7 +5,10 @@ local addon # Extract the main tarball - CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" + if [ "${CT_LIBC_CUSTOM}" != "y" \ + -o ! -d "${CT_LIBC_CUSTOM_LOCATION}" ]; then + CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" + fi CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/glibc.sh --- a/scripts/build/libc/glibc.sh Wed Oct 10 15:44:14 2012 +1000 +++ b/scripts/build/libc/glibc.sh Wed Oct 10 15:44:14 2012 +1000 @@ -20,10 +20,20 @@ addons_list=($(do_libc_add_ons_list " ")) # Main source - CT_GetFile "glibc-${CT_LIBC_VERSION}" \ - {ftp,http}://ftp.gnu.org/gnu/glibc \ - ftp://gcc.gnu.org/pub/glibc/releases \ - ftp://gcc.gnu.org/pub/glibc/snapshots + if [ "${CT_LIBC_CUSTOM}" = "y" ]; then + CT_TestAndAbort "Custom glibc: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_GLIBC_CUSTOM_LOCATION must be set." \ + -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" + CT_LIBC_CUSTOM_LOCATION="${CT_LIBC_GLIBC_CUSTOM_LOCATION}" + if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" ]; then + CT_LIBC_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/glibc" + fi + CT_GetCustom "glibc-${CT_LIBC_VERSION}" "${CT_LIBC_CUSTOM_LOCATION}" + else + CT_GetFile "glibc-${CT_LIBC_VERSION}" \ + {ftp,http}://ftp.gnu.org/gnu/glibc \ + ftp://gcc.gnu.org/pub/glibc/releases \ + ftp://gcc.gnu.org/pub/glibc/snapshots + fi # C library addons for addon in "${addons_list[@]}"; do diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/newlib.sh --- a/scripts/build/libc/newlib.sh Wed Oct 10 15:44:14 2012 +1000 +++ b/scripts/build/libc/newlib.sh Wed Oct 10 15:44:14 2012 +1000 @@ -20,7 +20,14 @@ libc_src="ftp://sources.redhat.com/pub/newlib" avr32headers_src="http://dev.doredevelopment.dk/avr32-toolchain/sources" - if [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then + if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then + CT_TestAndAbort "Custom newlib: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_NEWLIB_CUSTOM_LOCATION must be set." \ + -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" + if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" ]; then + CT_LIBC_NEWLIB_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/newlib" + fi + CT_GetCustom "newlib-${CT_LIBC_VERSION}" "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" + elif [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} else CT_GetCVS "newlib-$(libc_newlib_version)" \ @@ -36,7 +43,10 @@ } do_libc_extract() { - CT_Extract "newlib-$(libc_newlib_version)" + if [ "${CT_LIBC_NEWLIB_CUSTOM}" != "y" \ + -o ! -d "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" ]; then + CT_Extract "newlib-$(libc_newlib_version)" + fi CT_Patch "newlib" "$(libc_newlib_version)" if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then