This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disable all target libraries if not building gcc
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 Jul 2015 08:31:09 -0700
- Subject: Re: [PATCH] Disable all target libraries if not building gcc
- Authentication-results: sourceware.org; auth=none
- References: <20150313200654 dot GA32326 at intel dot com> <alpine dot DEB dot 2 dot 10 dot 1503162247470 dot 30120 at digraph dot polyomino dot org dot uk> <CAMe9rOquPr5VeJKQhyLX32JmBxj1bW1ub49m6-M-Rbruaj=XXg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1503162339500 dot 30120 at digraph dot polyomino dot org dot uk> <CAMe9rOq+-0-uP0645RjVvaAF7xaURe0DkEgi9+HFM007rcML4w at mail dot gmail dot com> <CAMe9rOout4iOCA9P55VEf-=YOBJ5n=TsSLeiVgo98hQ6Af=i6g at mail dot gmail dot com> <CAMe9rOphwC0F_qvusMF5qequjKrvvTicCNOmbDj22beS+acn2g at mail dot gmail dot com> <CAMe9rOoZXN4wT19VtPYNvcWRN2dMO600XFU8o-OeGuMBDp8Eow at mail dot gmail dot com>
On Tue, Mar 17, 2015 at 5:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Mar 16, 2015 at 8:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Mon, Mar 16, 2015 at 7:26 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Mon, Mar 16, 2015 at 4:43 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> On Mon, Mar 16, 2015 at 4:41 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>>>>> On Mon, 16 Mar 2015, H.J. Lu wrote:
>>>>>
>>>>>> On Mon, Mar 16, 2015 at 3:50 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>>>>>> > On Fri, 13 Mar 2015, H.J. Lu wrote:
>>>>>> >
>>>>>> >> I am working on SHF_COMPRESSED support:
>>>>>> >>
>>>>>> >> http://www.sco.com/developers/gabi/latest/ch4.sheader.html
>>>>>> >>
>>>>>> >> I will import zlib from GCC source tree into binutils-gdb tree. But zlib
>>>>>> >> failed to build as a target library in binutils-gdb. There is no need to
>>>>>> >> build target libraries if not building gcc. OK for master?
>>>>>> >
>>>>>> > This is definitely wrong. newlib / libgloss is a target library that
>>>>>> > certainly makes sense to build separately from GCC, and the toplevel
>>>>>> > configure / build code should be identical in all three repositories (GCC,
>>>>>> > binutils-gdb, newlib-cygwin).
>>>>>>
>>>>>> We need to work out something to avoid building target libraries
>>>>>> in binutils.
>>>>>
>>>>> I suggest not building zlib as a target library unless libgcj is also
>>>>> being built as a target library, given that there should be no need to
>>>>> built it as a target library in isolation.
>>>>>
>>>>
>>>> The logic is there. But somehow it doesn't work for binutils.
>>>> I will take another look.
>>>>
>>>
>>> Here is a patch. It excludes target-zlib if target-libjava isn't built.
>>> Tested in binutils and GCC with java.
>>>
>>
>> This version is more flexible to support future target libraries
>> which depend on target zlib.
>>
>
> I reverted my previous commit and checked in this one.
>
I am checking this into GCC.
--
H.J.
From e8c4c38a1cbbaa6105dab86c2c7a3f597c498632 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 14 Jul 2015 08:29:32 -0700
Subject: [PATCH] Sync toplevel configure with binutils-gdb
Sync with binutils-gdb:
2015-03-17 H.J. Lu <hongjiu.lu@intel.com>
* configure.ac (target_configdirs): Exclude target-zlib if
target-libjava isn't built.
* configure: Regenerated.
---
ChangeLog | 9 +++++++++
configure | 9 +++++++++
configure.ac | 9 +++++++++
3 files changed, 27 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 27edb46..c1582b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
Sync with binutils-gdb:
+ 2015-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.ac (target_configdirs): Exclude target-zlib if
+ target-libjava isn't built.
+ * configure: Regenerated.
+
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with binutils-gdb:
2015-05-13 John David Anglin <dave.anglin@bell.net>
* configure.ac: Disable configuration of GDB for HPUX targets.
diff --git a/configure b/configure
index f060986..5ba9489 100755
--- a/configure
+++ b/configure
@@ -6575,6 +6575,15 @@ for i in ${target_configdirs_all} ; do
fi
done
+# Exclude target-zlib if target-libjava isn't built.
+case ${target_configdirs} in
+*target-libjava*)
+ ;;
+*)
+ target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
+ ;;
+esac
+
# libiberty-linker-plugin is special: it doesn't have its own source directory,
# so we have to add it after the preceding checks.
if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
diff --git a/configure.ac b/configure.ac
index 603bdf6..2ff9be0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2265,6 +2265,15 @@ for i in ${target_configdirs_all} ; do
fi
done
+# Exclude target-zlib if target-libjava isn't built.
+case ${target_configdirs} in
+*target-libjava*)
+ ;;
+*)
+ target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
+ ;;
+esac
+
# libiberty-linker-plugin is special: it doesn't have its own source directory,
# so we have to add it after the preceding checks.
if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
--
2.4.3