Message ID | 20150313200654.GA32326@intel.com |
---|---|
State | New |
Headers | show |
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).
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.
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. It can be useful to build even GCC's target libraries when not building GCC (for example, rebuilding them with different optimization options using an installed compiler) - for libraries that don't use the host-side tm.h (all except libgcc and libobjc, I think), this is practical.
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.
diff --git a/configure b/configure index d075cf3..5caf82b 100755 --- a/configure +++ b/configure @@ -6614,6 +6614,9 @@ Supported languages are: ${potential_languages}" "$LINENO" 5 ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[^ ]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" ` +else + # Disable all target libraries if not building gcc. + target_configdirs= fi # Handle --disable-<component> generically. diff --git a/configure.ac b/configure.ac index 5ff56bf..34774d8 100644 --- a/configure.ac +++ b/configure.ac @@ -2039,6 +2039,9 @@ Supported languages are: ${potential_languages}]) AC_SUBST(stage1_languages) ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[[^ ]]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" ` +else + # Disable all target libraries if not building gcc. + target_configdirs= fi # Handle --disable-<component> generically.