Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	 simark@simark.ca,  gdb-patches@sourceware.org,  tom@tromey.com
Subject: Re: [RFA/gdb-9-branch] Abort configure immediately if building GDB in tree
Date: Sat, 01 Feb 2020 20:38:00 -0000	[thread overview]
Message-ID: <87k156hwm6.fsf@redhat.com> (raw)
In-Reply-To: <20200201102647.GC19442@adacore.com> (Joel Brobecker's message of	"Sat, 1 Feb 2020 14:26:47 +0400")

On Saturday, February 01 2020, Joel Brobecker wrote:

>> > >>> I'm wondering what to do here.  I think I found a hacky and ugly
>> > >>> solution here, but I'm trying to see if there's a better approach.
>> > >>
>> > >> A special command-line switch to 'configure', to be used by
>> > >> src-release.sh?
>> > >
>> > > A quick attempt here didn't really work.  The script is able to finish
>> > > the build and create a tarball, but for some reason the gdb directory is
>> > > not configured/built.
>> > 
>> > OK, I think I have something that works.  When 'configure' is invoked
>> > with '--enable-src-release-build', a tarball is generated and, as far as
>> > I have checked, contains the correct snapshot.
>> > 
>> > WDYT?
>> 
>> Thanks! I didn't realize that this would impact source packaging
>> like that.
>> 
>> Let's go with your patch. I'm about to start working on the release,
>> so I'll apply it for you.
>
> Or not. Jonah just reported another blocking issue :-(, so I won't
> be creating this release this weekend.
>
> So the "good" news is that you can push the patch yourself!

Thanks for the quick review, Joel :-).

Below is what I pushed.

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

From 1aa93c3a9b9a216703aaf882b3af541f3bc3042a Mon Sep 17 00:00:00 2001
From: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Sat, 1 Feb 2020 15:33:31 -0500
Subject: [PATCH] Implement '--enable-src-release-build' option and make
 src-release.sh use it

The generation of snapshots has been broken since we've disable
in-tree builds for GDB.  Given that src-release.sh performs a build
before creating the release tarball, and that this build is performed
in-tree, the solution we found is to implement a new top-level
configure flag called '--enable-src-release-build' which disables the
in-tree build restriction, and then make src-release.sh use it.

ChangeLog:
2020-02-01  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Eli Zaretskii  <eliz@gnu.org>

	* configure.ac: Don't abort the build if trying to build GDB in tree
	_and_ invoking with '--enable-src-release-build'.
	* configure: Regenerate.
	* src-release.sh (do_proto_toplev): Invoke 'configure' using

Change-Id: Ic6dd55accd9a03e62fe498f7fd704fb67f44bfa9
---
 ChangeLog      | 8 ++++++++
 configure      | 2 +-
 configure.ac   | 2 +-
 src-release.sh | 4 ++--
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0bfe989885..211451345e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-01  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* configure.ac: Don't abort the build if trying to build GDB in tree
+	_and_ invoking with '--enable-src-release-build'.
+	* configure: Regenerate.
+	* src-release.sh (do_proto_toplev): Invoke 'configure' using
+	'--enable-src-release-build'.
+
 2020-01-17  Joel Brobecker  <brobecker@adacore.com>
 
 	* configure.ac: Abort the build with an error if trying to build
diff --git a/configure b/configure
index 7168a4e90e..276f33fee3 100755
--- a/configure
+++ b/configure
@@ -2279,7 +2279,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-if test x"${enable_gdb}" != x"no"; then
+if test x"${enable_gdb}" != x"no" -a x"${enable_src_release_build}" != x"yes"; then
   # For this branch, we do not support building GDB in-tree.
   # Try to detect whether we are in this situation or not by
   # searching for a couple of known files in the source directory.
diff --git a/configure.ac b/configure.ac
index e5ca1eaa57..cd0867dd76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ m4_include([config/isl.m4])
 AC_INIT(move-if-change)
 AC_DISABLE_OPTION_CHECKING
 
-if test x"${enable_gdb}" != x"no"; then
+if test x"${enable_gdb}" != x"no" -a x"${enable_src_release_build}" != x"yes"; then
   # For this branch, we do not support building GDB in-tree.
   # Try to detect whether we are in this situation or not by
   # searching for a couple of known files in the source directory.
diff --git a/src-release.sh b/src-release.sh
index 275f0f24b5..68e824c749 100755
--- a/src-release.sh
+++ b/src-release.sh
@@ -99,8 +99,8 @@ do_proto_toplev()
 	    *) disables="$disables --disable-$dir" ;;
 	esac
     done
-    echo "==> configure --target=i386-pc-linux-gnu $disables $enables"
-    ./configure --target=i386-pc-linux-gnu $disables $enables
+    echo "==> configure --target=i386-pc-linux-gnu --enable-src-release-build=yes $disables $enables"
+    ./configure --target=i386-pc-linux-gnu --enable-src-release-build=yes $disables $enables
     $MAKE configure-host configure-target \
 	ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
 	CC_FOR_TARGET="$CC" CXX_FOR_TARGET="$CXX"
-- 
2.21.0


  reply	other threads:[~2020-02-01 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05  7:30 Joel Brobecker
2020-01-06  3:06 ` Simon Marchi
2020-01-17 18:24   ` Joel Brobecker
2020-01-17 18:24     ` Simon Marchi
2020-01-17 18:43       ` Joel Brobecker
2020-01-30 22:56         ` Sergio Durigan Junior
2020-01-31  8:55           ` Eli Zaretskii
2020-01-31 21:02             ` Sergio Durigan Junior
2020-01-31 22:52               ` Sergio Durigan Junior
2020-02-01  7:24                 ` Eli Zaretskii
2020-02-01 10:19                 ` Joel Brobecker
2020-02-01 10:26                   ` Joel Brobecker
2020-02-01 20:38                     ` Sergio Durigan Junior [this message]
2020-01-17 18:26     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k156hwm6.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox