From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 224473858425 for ; Wed, 22 Feb 2023 16:04:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 224473858425 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62d.google.com with SMTP id ko13so9906391plb.13 for ; Wed, 22 Feb 2023 08:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=afgJQ7uZW+MKQUQye8V1ynvrNMgU5vGZeE5mWp+uygQ=; b=O5ZbiddZr0s2rUQKJZouPCeZ1EymUsG7lz9ws4jOZ3/lxa31G7CdiboZpI9ER4mAxI sJZVm4LMl1kwNoHB4fR37ETf+IhxhCM5k3IrxruivilpKIN070oVoowep4JrsjqGotXU 7kylqR7mmNCbsmo4q3kynihbWd5LmFqrlrFNKoOP6fPkFqFae8JS/2SO+t5Vl9Fa3U0t UjnW91vyW6czQ/vbJbsIgkcQlbd2Vm3KrDxHIfwWiRocBASGtuIeoTjLEt4mk4dlOtXZ y5TFRrVV5MdSgxNXvtc7gM98CT7CoohyRyjX1ebCLnp1sKdCnT3h3PFvOlfsOMMXp9pa fVHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=afgJQ7uZW+MKQUQye8V1ynvrNMgU5vGZeE5mWp+uygQ=; b=xducvVH3zGrJrhFlKYfwfelb3idCZ7VzwOUhQmQNGwu5UdF6/17IyF8LIvlbW3LzEj BR7OlzqpOF7N7CHmzLERQxLqAyg96k2TZv6bSBSuf1rhrHUdVuPOy2Ty5eFnBkUPlTIs 9BeO3uWwlqIn1B4RZZDv9JmGLidapbioge8NWzcdqPjjOne+QmIw8HPj0ZydFJdgF01/ xbXPfCsOUQvs7WIjXY5jFXx46fuWS+s1sLXiRcVd7DBeK/bxfwG1mChuilsrb5FcEzo+ 5x3fwfFOC9425ugwyJbIZEaHhpv1a6aHam4uUzGfIAlmlyjEkQ5s1b1OLbW8AayWKWVR NmFw== X-Gm-Message-State: AO0yUKXlscMLe5yJd67TFMVkK2wGB0x58QdRm+BOnJJrCvVLCBNax3t9 4xHnIwqH1ZW/XLcpy3Acrh3BxcSzbD/QB7ntTNc= X-Google-Smtp-Source: AK7set8+kdjUq/301qAgEGg1WzsaedyxUwrcplpgYhAJah13ZL35PDPRYqPwJkEyRn6ilYIV15Ks3o47QzA2GY6vhXA= X-Received: by 2002:a17:903:3251:b0:198:f1d0:f9fc with SMTP id ji17-20020a170903325100b00198f1d0f9fcmr1326079plb.11.1677081893807; Wed, 22 Feb 2023 08:04:53 -0800 (PST) MIME-Version: 1.0 References: <20230222121904.4087522-1-Yash.Shinde@windriver.com> In-Reply-To: <20230222121904.4087522-1-Yash.Shinde@windriver.com> From: Andrew Pinski Date: Wed, 22 Feb 2023 08:04:42 -0800 Message-ID: Subject: Re: [PATCH] Share work directories To: Yash Shinde Cc: gcc-patches@gcc.gnu.org, raj.khem@gmail.com, Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Feb 22, 2023 at 4:22 AM Yash Shinde wrote: > > From: Khem Raj > > Fix configure and Makefile files to read the defaults.hand t-oe from build directory, > so that the source can be shared between gcc-cross-initial, gcc-cross-intermediate, gcc-cross, gcc-runtime, > and also the sdk build which use a separate build directory compared to source directory. > > While compiling gcc-crosssdk-initial-x86_64 on some host, there is > occasionally failure that test the existance of default.h doesn't work, > the reason is tm_include_list='** defaults.h' rather than tm_include_list='** ./defaults.h'. > So we add the test condition for this situation. This patch does not make sense because $(srcdir)/defaults.h will always exist. I build all the time with different object directories and I know of many people who build with a read only source directory; explicitly so they can test that way. You are going to have to expand on why you need defaults.h from the build directory and not the source directory? As far as I Know there is no defaults.h in the build directory even. Do you have another patch which changes that? Thanks, Andrew Pinski > > gcc/ChangeLog: > > * configure > * configure.ac > * mkconfig.sh > > Signed-off-by: Khem Raj > Signed-off-by: Hongxu Jia > --- > gcc/configure | 4 ++-- > gcc/configure.ac | 4 ++-- > gcc/mkconfig.sh | 4 ++-- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/gcc/configure b/gcc/configure > index 254f9b6c943..ff2a3e26049 100755 > --- a/gcc/configure > +++ b/gcc/configure > @@ -13471,8 +13471,8 @@ for f in $tm_file; do > tm_include_list="${tm_include_list} $f" > ;; > defaults.h ) > - tm_file_list="${tm_file_list} \$(srcdir)/$f" > - tm_include_list="${tm_include_list} $f" > + tm_file_list="${tm_file_list} ./$f" > + tm_include_list="${tm_include_list} ./$f" > ;; > * ) > tm_file_list="${tm_file_list} \$(srcdir)/config/$f" > diff --git a/gcc/configure.ac b/gcc/configure.ac > index 62bc908b991..d36830cf2fb 100644 > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > @@ -2336,8 +2336,8 @@ for f in $tm_file; do > tm_include_list="${tm_include_list} $f" > ;; > defaults.h ) > - tm_file_list="${tm_file_list} \$(srcdir)/$f" > - tm_include_list="${tm_include_list} $f" > + tm_file_list="${tm_file_list} ./$f" > + tm_include_list="${tm_include_list} ./$f" > ;; > * ) > tm_file_list="${tm_file_list} \$(srcdir)/config/$f" > diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh > index 054ede89647..3b2c2b9df37 100644 > --- a/gcc/mkconfig.sh > +++ b/gcc/mkconfig.sh > @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then > if [ $# -ge 1 ]; then > echo '#ifdef IN_GCC' >> ${output}T > for file in "$@"; do > - if test x"$file" = x"defaults.h"; then > + if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then > postpone_defaults_h="yes" > else > echo "# include \"$file\"" >> ${output}T > @@ -106,7 +106,7 @@ esac > > # If we postponed including defaults.h, add the #include now. > if test x"$postpone_defaults_h" = x"yes"; then > - echo "# include \"defaults.h\"" >> ${output}T > + echo "# include \"./defaults.h\"" >> ${output}T > fi > > # Add multiple inclusion protection guard, part two. > -- > 2.39.0 >