From patchwork Tue Mar 31 20:12:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 5936 Received: (qmail 20652 invoked by alias); 31 Mar 2015 20:12:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20619 invoked by uid 89); 31 Mar 2015 20:12:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.8 required=5.0 tests=AWL, BAYES_40, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ob0-f173.google.com Received: from mail-ob0-f173.google.com (HELO mail-ob0-f173.google.com) (209.85.214.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 31 Mar 2015 20:12:40 +0000 Received: by obcjt1 with SMTP id jt1so45714012obc.2; Tue, 31 Mar 2015 13:12:38 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.103.234 with SMTP id fz10mr1768130oeb.11.1427832758394; Tue, 31 Mar 2015 13:12:38 -0700 (PDT) Received: by 10.76.134.102 with HTTP; Tue, 31 Mar 2015 13:12:38 -0700 (PDT) Date: Tue, 31 Mar 2015 13:12:38 -0700 Message-ID: Subject: [zlib] [PATH] Use AM_ENABLE_MULTILIB only if with_target_subdir isn't empty From: "H.J. Lu" To: Antoine Tremblay , Binutils , GDB , GCC Patches X-IsSubscribed: yes On Tue, Mar 31, 2015 at 11:55 AM, H.J. Lu wrote: > On Tue, Mar 31, 2015 at 10:18 AM, Antoine Tremblay > wrote: >> >> >> On 03/31/2015 01:16 PM, H.J. Lu wrote: >>> >>> On Tue, Mar 31, 2015 at 10:12 AM, Antoine Tremblay >>> 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 ? >> > zlib can be built as a host and a target library. We should use AM_ENABLE_MULTILIB only when building for target. This patch for zlib is borrowed from libbacktrace which is also built as a host and a target library. I will check it into binutils tree. From 4efdb2dba47fdf7eaa18db306686fef12986ecc3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 31 Mar 2015 11:36:17 -0700 Subject: [PATCH 2/2] 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() 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