From patchwork Wed Feb 27 20:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 159293 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4882918jad; Wed, 27 Feb 2019 12:50:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IY2TG/SdNkdGbH9w29EbsI5lMqPGTEcoCIoD/ZptzB6vVUDb9CBqvda2GM67pgpCSVfKnfl X-Received: by 2002:a62:bd09:: with SMTP id a9mr3586248pff.61.1551300658481; Wed, 27 Feb 2019 12:50:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551300658; cv=none; d=google.com; s=arc-20160816; b=IiXZtpdRgHqN6mA5EWtgnDEAJ8LjkwSsVsNGuujNPgfk//I5lMVgwhKIPv+yEzqlND 5NJxjfIYZPAb8msxwhf1NGdmGmh0sbI+emAH/TEBScJnMu+c2z11kbSNv6Awcu1VtJlc V3vAL20agD1GHoB6XAcvcrI6/M9bhFkN2a8Ea1ApB4oHT66BhobYeZ7zrIS7qwPDj7nn hbNIp+LjW91WqAy2wV3z77rOYA3hYDbiBzq7H99n8oNOda+qCEV967PJc8yX5IFVdscI HPr9wvMnPelcItu+eomD2YOZxUt21mB3HbW2gUl0voPELZvZ2xVNskhZCZdO5Uj5R9wG ccWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=35dgskYio8U2dZWoSALFU2Q7HvTZv/SLQS5xPSFAbCw=; b=aezvLtfm+oKmmnEPkVKKyuwPHYHLV1xS1weDK13TohALO2UgPiYELKs9W+IjBwCi8K +RUzbGgJzakX+yTAI8XRN004MgINuWryjrJax9nud47m3kSsnN3hC2SzyLWtOLCcrvcN oBbfqaF++lMcn0N16je7cKefGDnsMfNSN4WwIxyYE6xcmiJ8smgmrZdfUyXgh/2IOTGc aIK4KRdEANTOXklEu+EGkfFAYX9CCqT/85MBwgO3Jn60WDeKMkQcU668g6D+TF5Mwa83 HGO3siIViKms5SgEHDBijcOwnjNrfyhRviix8R60UTRtczy88Ypq2yddzP6UoNtd70d5 OIJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TdzG+Htr; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id h3si16190571pfd.250.2019.02.27.12.50.58; Wed, 27 Feb 2019 12:50:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=TdzG+Htr; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C26687CC4E; Wed, 27 Feb 2019 20:50:53 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mail.openembedded.org (Postfix) with ESMTP id 19D016C197 for ; Wed, 27 Feb 2019 20:50:51 +0000 (UTC) Received: by mail-pf1-f173.google.com with SMTP id q17so8562107pfh.10 for ; Wed, 27 Feb 2019 12:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a6Ht2doan4wEB6xJCRQlZ0gT2BMTOs1Y4IndVGzKrlk=; b=TdzG+HtrM18u6Ghx/zy0aShVov2E2MKQzg/YP9ALUPRaQHxCo9Mg6GcRO6P/5IK0eJ 7AEfdXPWAk5569IvbrIAtPS17UZFNFiL+IeCxIDAErnqjiie8jM26rvKzpGGo8XLS2Nt FvGQUhrqpLRcBrtXBmADQkYR/TjP+5NXL0CG4Fcem8EcpJHMC+kNH9gFeyhiwO11Yj5f Qax4W3V8xofascHqhzgb1ND7RvxwDBJez32tRDJYO8PlShjU+hNxlQKh0nWq92gNo0PR BziYfwJvJ8O6SJxPDkd2iB0elEWQC+IJ1rML2vos6kJ8npwVQyHicx7Y8V4GS3K97r2q +TiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a6Ht2doan4wEB6xJCRQlZ0gT2BMTOs1Y4IndVGzKrlk=; b=V1bpwV7IVK76PMWdOlTMHH7egX9v45FvtQm7RRGyU30GcrciJlsa9B/KTpuwhevN3d vPsrqLNltScLNRQcAxMaTjVmDWQYQKyFJ0djAZNaMsKeiNHz3YGieRLdl92YPE2CDHbc PZVHZev276uZXCww03SkWx0kkscUVMr+gTWWzjGqFa63NxzuMmUGZPibxsZ9QIYqk4db gJPYWHz9dDwZYgLs/UUKylyUpkI9aU0q0EorenQIC1xCkAq9/P1R3W5RcKAAo/o5j+h3 7TUbvPGxspgRn4TK9E3UKBFSsj3A54nGLETBjkmSdioAYJ6LzjERfdEH+J/WLmzmPC7F p+lA== X-Gm-Message-State: AHQUAubYShG8ltSc71+fMKFhUJhseCgzf8IUyQbwssf40miXbG8Be0NC SMeRR6yDT3Z7Fm2Z8BghABElaTOE X-Received: by 2002:a63:b0b:: with SMTP id 11mr4878656pgl.187.1551300652590; Wed, 27 Feb 2019 12:50:52 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::5fa3]) by smtp.gmail.com with ESMTPSA id l12sm27913766pgn.83.2019.02.27.12.50.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 12:50:51 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 27 Feb 2019 12:50:41 -0800 Message-Id: <20190227205042.44813-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH V2 1/2] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org -Og is for optimized debugging experience. this makes this consistent across different compilers especially gcc and clang, -O in clang is equal to -O2 where as in gcc its similar to -O1 so it was not giving consistent debugging experience across compilers Signed-off-by: Khem Raj --- v2: Change documentation to reflect the change and also build host flags meta/conf/bitbake.conf | 4 ++-- meta/conf/documentation.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 1c5369ec98..85aab98462 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -610,10 +610,10 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}" # Disabled until the option works properly -feliminate-dwarf2-dups FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" -DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" +DEBUG_OPTIMIZATION = "-Og -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}" SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD" -BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-O -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe" +BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe" BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD" ################################################################## diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf index 4d2a707563..c2c96ecf1e 100644 --- a/meta/conf/documentation.conf +++ b/meta/conf/documentation.conf @@ -125,7 +125,7 @@ D[doc] = "The destination directory." DATE[doc] = "The date the build was started using YMD format." DATETIME[doc] = "The date and time the build was started." DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable." -DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe'." +DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe'." DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority." DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)." DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system." From patchwork Wed Feb 27 20:50:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 159294 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4883275jad; Wed, 27 Feb 2019 12:51:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IYYx69ytbN68UxnRdqKlaVRrTbw34LFe6o9gCYyk/r88XSH9tsnzJaB/h3zCY/Zewla5MP4 X-Received: by 2002:a17:902:834b:: with SMTP id z11mr4179034pln.257.1551300683099; Wed, 27 Feb 2019 12:51:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551300683; cv=none; d=google.com; s=arc-20160816; b=k8HNQnUdfL026ruUVy5uOehaBZH1IjQEvesNHL3ynx45gbHB9yAnxInuiKsW8+HXo/ mCfIC9oZiUXyNTuETn9Ko2ybztzqmzUelyGjazJd/bVyYT8IVHx4KKtlY5VaJqdhUkSr CNlyXVNWY4iurQetH+tX2UjS24ADoPwvCl1VqgmUyLrUilst3wiqRYVSZ6/g8zWxjIxn Ro4ZAYY042mR4KC8VtZKnhikk3q3i6NfoKJnZ6//AA51g49le7cbWgKaUOc8OJn5H2NG vOwctrKK4r4SADRX68WGmZkK0mNQTaL/t2UtFOZBhBwZT+9f/3B6Z9ZhpaROIK3H5eOu hfSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=XpC/jKFYXFxk0/JDHXJPJYrDGJPHq2hB5KFpvH38UOI=; b=AoTViWVYnK0R/pOVc2B5dQ93h06EDt2k90vFu/G6usFQThWMEwJeVhLWyod8kvBO7U Q8lRyGRbKpham3PeOTrbXe/c9auTpbMxJalE6KbUDyHUA7MTppeeY471rBdLTvvDHQ74 1LFF1+HhhMpVgqXviUPWZ2gbcUiwILPfB+CLStAZpQf2pdO1G0qqANzQ5MbpRXUDigFk tTiclDmFL3wEOJcFXR/FuZPRgi7AH8jAatduYy4sBJWOzowrRROzo4hWjRUdrdkGWFfb VknumgzdibW07q241K5aA3RgQZ/KmhNvbT+O6784b/fO5P/b7DiS4ztcGWnWKSjrJI34 heIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="ff/BLfIN"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g10si15979090pgk.395.2019.02.27.12.51.22; Wed, 27 Feb 2019 12:51:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="ff/BLfIN"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D00A37CC82; Wed, 27 Feb 2019 20:51:20 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mail.openembedded.org (Postfix) with ESMTP id C5D4D7CC65 for ; Wed, 27 Feb 2019 20:50:52 +0000 (UTC) Received: by mail-pf1-f170.google.com with SMTP id n74so8569245pfi.9 for ; Wed, 27 Feb 2019 12:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GNmRaIK0EjY32gNOmGfs8t7hykX+x1YPGOxn29vdqjA=; b=ff/BLfINiuV1rPEgN1K6ov8NEEgR5VYaXQkrBMC5HrXmxDzGr7if26j7aZgEdb/uJj DMXkmMbGhel+rACL9Ny4pTKDIZLM+3zfxieMzK8ll6nrev7K4QzdAU8DTk1qlDjdOwdN nXItMfj5QyEi6QMJveD8XmyRLegb78gND9UATTZnOdkqcy+7dZo6TM59jwrgu0z9vuXq bN+MPodl999c0FfpQi6QKYAgTWf+qTCIB3nXgulE9M5IEUNRKcekimsLEH/uq8yz/M5/ jAf91H7XkQEA6QZw/SSU46LDsfi4+KpXTimqGnbQCo2yD9lkhBXmylTJffcfWJK7BULB 4vGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GNmRaIK0EjY32gNOmGfs8t7hykX+x1YPGOxn29vdqjA=; b=CboJsAggLs6D6DwuzjriZxERRJ/HjIE7Q+/8wjh2vUOcjt/XhLtmudEUoreefans5N 1eV2rlSLAr97+F8aTcBqGeWqSG2/Abh+Xy7J3n391bQocvbuhslXzrt7Ek5RuTGFHc8h pUV2XuGqcve7L34/V/hIEKPabD9rJJYPupV87Js6OspxecN6E7rEwX3Mw7LTUopXFQnB CAw5ViCxNINVdngOl1R/ANbPwVL3nnKfCsnJoBMxHDn5gp+j446NF4SOMOoK9NBQGsWe kSvCgeIGm//j4l1nuq3Sj/gwQf9yYB41l3MD2TH+DjtuGb3LuxFUgKQV+bXm9eGK5aaC xivw== X-Gm-Message-State: AHQUAuacjDfc6KRCYO0Xb0+d6tQnDWdBDatRDkh+WbczWa9CY2OWZ5dq MDu56vFsc7AQHyHIa05/ydVbdB76 X-Received: by 2002:a65:6154:: with SMTP id o20mr4792533pgv.205.1551300653313; Wed, 27 Feb 2019 12:50:53 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::5fa3]) by smtp.gmail.com with ESMTPSA id l12sm27913766pgn.83.2019.02.27.12.50.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 12:50:52 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 27 Feb 2019 12:50:42 -0800 Message-Id: <20190227205042.44813-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190227205042.44813-1-raj.khem@gmail.com> References: <20190227205042.44813-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/2] glibc: Disable Werror when building with debug options X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Since compiler does not optimize away a lot of stuff we end up with Werrors e.g. ./sysdeps/ieee754/flt-32/s_log1pf.c: In function '__log1pf': ../sysdeps/ieee754/flt-32/s_log1pf.c:114:22: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized] 114 | + (k * ln2_lo + c))) - f); | ~~~~~~~~~~~~^~~~ which otherwise wont happen, so lets build with warnings-as-errors disabled in debug mode given we disable werror, now we don't have to restrict user to compile without -O0 Signed-off-by: Khem Raj --- meta/recipes-core/glibc/glibc.inc | 9 --------- meta/recipes-core/glibc/glibc_2.29.bb | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 67af396133..a382a22b73 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -2,15 +2,6 @@ require glibc-common.inc require glibc-ld.inc require glibc-testing.inc -python () { - opt_effective = "-O" - for opt in d.getVar('SELECTED_OPTIMIZATION').split(): - if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"): - opt_effective = opt - if opt_effective == "-O0": - bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective)) -} - DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" PROVIDES = "virtual/libc" diff --git a/meta/recipes-core/glibc/glibc_2.29.bb b/meta/recipes-core/glibc/glibc_2.29.bb index bd8aa6d503..9b6fab066b 100644 --- a/meta/recipes-core/glibc/glibc_2.29.bb +++ b/meta/recipes-core/glibc/glibc_2.29.bb @@ -90,6 +90,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ --disable-crypt \ --with-default-link \ --enable-nscd \ + ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \ ${GLIBCPIE} \ ${GLIBC_EXTRA_OECONF}"