From patchwork Thu Sep 4 23:20:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Hundven X-Patchwork-Id: 386047 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D2A6A140088 for ; Fri, 5 Sep 2014 09:21:25 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=NWLdLIJNMWg7lb7uwQtLioO8vf5JUb+ u8JfYpiZyXhPfCl737gKp9D85RL/o8IY/aqgi0iHYIxvCHCeJDuOLFSWdOkYZfSa Y4abCpcd4aofkXDID3FYScOAuBBnZUhLjVgigwXE7KQD7jUNcss8gBOT/fZpieRb xYVS3/WiV7Ko= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=Oz0FP2ffr+r4blM90MeBpC27fWE=; b=MA61a TpecDDJZyIsXZE+hLDqaOO9HrwR5/8h2JiVVT4BvnqZLGeafYbCnBhIh4PwibOvr WXMv/MFLHc4HT/9xAC4uWq9Yk2fLvQouwKDeNQkisr+Biu00y/FgiYUT+GEiJ9BL Ojyom5NTZkcIMATT3DKpbLnzfurUmaarTEyDtE= Received: (qmail 30017 invoked by alias); 4 Sep 2014 23:20:37 -0000 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 Received: (qmail 29862 invoked by uid 89); 4 Sep 2014 23:20:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f170.google.com Received: from mail-pd0-f170.google.com (HELO mail-pd0-f170.google.com) (209.85.192.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 04 Sep 2014 23:20:34 +0000 Received: by mail-pd0-f170.google.com with SMTP id r10so14592022pdi.15 for ; Thu, 04 Sep 2014 16:20:32 -0700 (PDT) X-Received: by 10.66.225.141 with SMTP id rk13mr13907670pac.112.1409872832259; Thu, 04 Sep 2014 16:20:32 -0700 (PDT) Received: from fuzzy.hsd1.wa.comcast.net (c-50-135-131-187.hsd1.wa.comcast.net. [50.135.131.187]) by mx.google.com with ESMTPSA id pd7sm186326pdb.78.2014.09.04.16.20.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Sep 2014 16:20:31 -0700 (PDT) From: Bryan Hundven To: "Yann E. MORIN" Cc: crossgcc@sourceware.org, Bryan Hundven Subject: [PATCH 4/4] libc/musl: Add config option for extra developer warnings Date: Thu, 4 Sep 2014 16:20:26 -0700 Message-Id: <1409872826-19507-4-git-send-email-bryanhundven@gmail.com> In-Reply-To: <1409872826-19507-1-git-send-email-bryanhundven@gmail.com> References: <1409872826-19507-1-git-send-email-bryanhundven@gmail.com> X-IsSubscribed: yes This commit adds a configuration knob for enabling extra developer warnings to be enabled during the musl-libc build. Signed-off-by: Bryan Hundven --- config/libc/musl.in.2 | 6 ++++++ scripts/build/libc/musl.sh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2 index 33a653c..9c35836 100644 --- a/config/libc/musl.in.2 +++ b/config/libc/musl.in.2 @@ -7,6 +7,12 @@ config LIBC_MUSL_DEBUG This option enables debugging information, this will increase the size of the resulting library. +config LIBC_MUSL_WARNINGS + bool + prompt "Build with recommended warnings flags" + help + Build musl-libc with extra warnings, useful for musl-libc development. + choice prompt "How to optimize musl-libc" default LIBC_MUSL_OPTIMIZE_AUTO diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh index 0b5b7da..e96efe1 100644 --- a/scripts/build/libc/musl.sh +++ b/scripts/build/libc/musl.sh @@ -50,6 +50,10 @@ do_libc_configure() { extra_config+=("--enable-debug") fi + if [ "${CT_LIBC_MUSL_WARNINGS}" = "y" ]; then + extra_config+=("--enable-warnings") + fi + extra_config+=( "--optimize=${CT_LIBC_MUSL_OPTIMIZE}" ) # NOTE: musl handles the build/host/target a little bit differently