Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
	Binutils <binutils@sourceware.org>
Cc: GDB <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd
Date: Tue, 31 Mar 2015 18:55:00 -0000	[thread overview]
Message-ID: <CAMe9rOqO-Tk_HifdsF+BVOCjF4isTWfHJ=FsvhjgSDoPmvai0w@mail.gmail.com> (raw)
In-Reply-To: <551AD6EA.4070603@ericsson.com>

[-- Attachment #1: Type: text/plain, Size: 3581 bytes --]

On Tue, Mar 31, 2015 at 10:18 AM, Antoine Tremblay
<antoine.tremblay@ericsson.com> wrote:
>
>
> On 03/31/2015 01:16 PM, H.J. Lu wrote:
>>
>> On Tue, Mar 31, 2015 at 10:12 AM, Antoine Tremblay
>> <antoine.tremblay@ericsson.com> wrote:
>>>>
>>>> Also doing ./configure in binutils/zlib I get :
>>>>
>>>> config.status: creating Makefile
>>>> config.status: executing default-1 commands
>>>> ./config.status: line 1190: ./../../config-ml.in: No such file or
>>>> directory
>>>>
>>>> So configure does not exit cleanly...ideas?
>>>>
>>>>
>>>
>>> I did a bit more research on this issue and I get this if I build gdb
>>> from
>>> it's source directory
>>>
>>> in binutils-gdb
>>> ./configure
>>> make
>>>
>>> make fails with : while in zlib directory
>>>
>>> configure: creating ./config.status
>>> config.status: creating Makefile
>>> config.status: executing default-1 commands
>>> ./config.status: line 1190: ./../../config-ml.in: No such file or
>>> directory
>>>
>>> However if I build out of tree in like binutils-gdb/build for example I
>>> do
>>> not get this issue.
>>>
>>> Could this be related to 92c695a14f6a5a24b177e89624c13d7dbcbf9e1f ?
>>>
>>> Subject: [PATCH 09/76] A zlib to tarball
>>>
>>> I see this snippet there
>>>
>>> -    ./configure --target=i386-pc-linux-gnu
>>> +    ./configure --target=i386-pc-linux-gnu \
>>> +       --with-target-subdir=. \
>>> +       --disable-multilib
>>>
>>> With these options I get around the configure problem only to fail in gas
>>> with :
>>> make[4]: Entering directory `/home/x/src/binutils-gdb/gas'
>>> /bin/bash ./libtool --tag=CC   --mode=link gcc -W -Wall
>>> -Wstrict-prototypes
>>> -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2
>>> -static-libstdc++
>>> -static-libgcc  -o as-new app.o as.o atof-generic.o compress-debug.o
>>> cond.o
>>> depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o
>>> flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o
>>> listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o
>>> stabs.o subsegs.o symbols.o write.o tc-i386.o obj-elf.o atof-ieee.o
>>> ../opcodes/libopcodes.la ../bfd/libbfd.la ../libiberty/libiberty.a   -ldl
>>> libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes
>>> -Wshadow -Werror -I./../zlib -g -O2 -static-libstdc++ -static-libgcc -o
>>> as-new app.o as.o atof-generic.o compress-debug.o cond.o depend.o
>>> dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o
>>> flonum-konst.o
>>> flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o
>>> literal.o
>>> macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o
>>> symbols.o write.o tc-i386.o obj-elf.o atof-ieee.o
>>> ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a
>>> -L/home/x/src/binutils-gdb/zlib -lz ../libiberty/libiberty.a -ldl
>>> /usr/bin/ld: cannot find -lz
>>>
>>>
>>> This is with head as :  711a72d3d6f8cd3c3f408e718ff19aa4bfd2144e
>>>
>>> Did you try to compile directly in the src tree ?
>>>
>>
>> Yes, I did.  You need to add --disable-multilib,  and maybe
>> --with-target-subdir=.
>>
>
> As I said if I add  --disable-multilib, -with-target-subdir=.
>
> I get into the gas missing zlib error above ?
>
> Also I don't think it's a good idea that gdb would require options to
> compile in it's source tree ?
>
> Is there a good reason for this ?
>

config/multi.m4 doesn't support building a library for host.
These 3 patches fix it.  I am testing config/multi.m4 in GCC.
If it passes GCC multilib build, I will check them into
binutils-gdb and submit them to GCC.



-- 
H.J.

[-- Attachment #2: 0001-Add-multilib-support-code-only-for-target.patch --]
[-- Type: text/x-patch, Size: 1216 bytes --]

From 536b7827f475462828a6c7d33944f2e1d1fb2336 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 31 Mar 2015 11:34:01 -0700
Subject: [PATCH 1/3] Add multilib support code only for target

	* multi.m4 (AC_OUTPUT_COMMANDS): Don't add multilib support code
	if ${multi_basedir}/config-ml.in doesn't exist.
---
 config/multi.m4 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/config/multi.m4 b/config/multi.m4
index 5b62ecc..53993c3 100644
--- a/config/multi.m4
+++ b/config/multi.m4
@@ -46,12 +46,15 @@ fi
 
 AC_OUTPUT_COMMANDS([
 # Only add multilib support code if we just rebuilt the top-level
-# Makefile.
-case " $CONFIG_FILES " in
- *" ]m4_default([$1],Makefile)[ "*)
-   ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
-   ;;
-esac],
+# Makefile.  If ${multi_basedir}/config-ml.in doesn't exist, we aren't
+# building for target and we don't add multilib support code.
+if test -f ${multi_basedir}/config-ml.in; then
+  case " $CONFIG_FILES " in
+   *" ]m4_default([$1],Makefile)[ "*)
+     ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+     ;;
+  esac
+fi],
 		   [
 srcdir="$srcdir"
 host="$host"
-- 
1.9.3


[-- Attachment #3: 0002-Regerate-configure-in-zlib.patch --]
[-- Type: text/x-patch, Size: 1268 bytes --]

From 758ccd879f8d8680be26c3e654f54319f3f6a6c3 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 31 Mar 2015 11:35:30 -0700
Subject: [PATCH 2/3] Regerate configure in zlib

	* configure: Regenerated.
---
 zlib/configure | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/zlib/configure b/zlib/configure
index 1a9d854..e739ddd 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -12644,12 +12644,15 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   case $ac_file$ac_mode in
     "default-1":C)
 # Only add multilib support code if we just rebuilt the top-level
-# Makefile.
-case " $CONFIG_FILES " in
- *" Makefile "*)
-   ac_file=Makefile . ${multi_basedir}/config-ml.in
-   ;;
-esac ;;
+# Makefile.  If ${multi_basedir}/config-ml.in doesn't exist, we aren't
+# building for target, we don't add multilib support code.
+if test -f ${multi_basedir}/config-ml.in; then
+  case " $CONFIG_FILES " in
+   *" Makefile "*)
+     ac_file=Makefile . ${multi_basedir}/config-ml.in
+     ;;
+  esac
+fi ;;
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
   # Autoconf 2.62 quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
-- 
1.9.3


[-- Attachment #4: 0003-Remove-with-target-subdir-.-disable-multilib.patch --]
[-- Type: text/x-patch, Size: 939 bytes --]

From 988209efe245075f3f492e00193a9c2622f0b16e Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 31 Mar 2015 11:36:17 -0700
Subject: [PATCH 3/3] Remove --with-target-subdir=. --disable-multilib

zlib/configure is updated to properly handle in-tree build for host.

	* src-release.sh: Don't configure with  --with-target-subdir=.
	--disable-multilib.
---
 src-release.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src-release.sh b/src-release.sh
index 8229e15..9b985f0 100755
--- a/src-release.sh
+++ b/src-release.sh
@@ -83,9 +83,7 @@ do_proto_toplev()
 	<Makefile.in >tmp
     mv -f tmp Makefile.in
     #
-    ./configure --target=i386-pc-linux-gnu \
-	--with-target-subdir=. \
-	--disable-multilib
+    ./configure --target=i386-pc-linux-gnu
     $MAKE configure-host configure-target \
 	ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
 	CC_FOR_TARGET="$CC" CXX_FOR_TARGET="$CXX"
-- 
1.9.3


  reply	other threads:[~2015-03-31 18:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 15:57 H.J. Lu
2015-03-29 14:10 ` H.J. Lu
2015-03-30 15:52   ` Steve Ellcey
2015-03-30 16:32     ` H.J. Lu
2015-03-30 16:45       ` Luis Machado
2015-03-30 16:51         ` H.J. Lu
2015-03-30 17:13           ` Steve Ellcey
2015-03-30 17:21             ` H.J. Lu
2015-03-30 17:36               ` Steve Ellcey
2015-03-30 19:33                 ` Antoine Tremblay
2015-03-30 19:37                   ` Antoine Tremblay
2015-03-31 17:13                     ` Antoine Tremblay
2015-03-31 17:16                       ` H.J. Lu
2015-03-31 17:18                         ` Antoine Tremblay
2015-03-31 18:55                           ` H.J. Lu [this message]
2015-03-31 20:16                           ` H.J. Lu
2015-04-01 12:18                             ` Antoine Tremblay
2015-04-02  3:22                             ` Bin.Cheng
2015-04-02  3:53                               ` Bin.Cheng
2015-03-30 20:19                   ` H.J. Lu
2015-03-31 12:08                     ` Antoine Tremblay
2015-03-30 18:18           ` Luis Machado
2015-03-30 17:20       ` H.J. Lu
2015-03-31  6:13 ` Mike Frysinger
2015-03-31 10:10   ` H.J. Lu
2015-03-31 10:37     ` Pedro Alves
2015-03-31 10:46       ` H.J. Lu
2015-03-31 10:53         ` Pedro Alves
2015-03-31 11:33           ` H.J. Lu
2015-03-31 11:46             ` Pedro Alves
2015-03-31 12:01               ` H.J. Lu
2015-03-31 12:15                 ` Pedro Alves
2015-03-31 13:43                   ` H.J. Lu
2015-03-31 13:46                     ` Pedro Alves
2015-03-31 16:41     ` Mike Frysinger
2015-03-31 16:56       ` H.J. Lu
2015-03-31 17:01         ` Mike Frysinger
2015-03-31 17:04           ` H.J. Lu

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='CAMe9rOqO-Tk_HifdsF+BVOCjF4isTWfHJ=FsvhjgSDoPmvai0w@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=antoine.tremblay@ericsson.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /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