On Thu, Oct 30, 2014 at 09:33:08AM +0100, Thomas Schwinge wrote: > Here is a patch that I'm testing; OK? I didn't understand what the > conditions are that libcc1 might not be built as a shared library: is it > always built as one -- but is that really supported on all systems? If
It is not unconditionally supported, libcc1/configure.ac uses GCC_ENABLE_PLUGINS and doesn't compile anything if gcc doesn't support plugins (one of the several tests of that is that -fPIC -shared is supported. > that's indeed true, then this could be further simplified, and > --enable-shared passed to the host libiberty unconditionally. Your patch is ok with proper ChangeLog entry. > --- configure.ac > +++ configure.ac > @@ -1865,7 +1865,6 @@ if test -d ${srcdir}/gcc; then > new_enable_languages=,c, > > # If LTO is enabled, add the LTO front end. > - extra_host_libiberty_configure_flags= > if test "$enable_lto" = "yes" ; then > case ,${enable_languages}, in > *,lto,*) ;; > @@ -1873,10 +1872,8 @@ if test -d ${srcdir}/gcc; then > esac > if test "${build_lto_plugin}" = "yes" ; then > configdirs="$configdirs lto-plugin" > - extra_host_libiberty_configure_flags=--enable-shared > fi > fi > - AC_SUBST(extra_host_libiberty_configure_flags) > > missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e > s/,c,/,/ ` > potential_languages=,c, > @@ -2190,6 +2187,17 @@ then > esac > fi > > +# Sometimes we have special requirements for the host libiberty. > +extra_host_libiberty_configure_flags= > +case " $configdirs " in > + *" lto-plugin "* | *" libcc1 "*) > + # When these are to be built as shared libraries, the same applies to > + # libiberty. > + extra_host_libiberty_configure_flags=--enable-shared > + ;; > +esac > +AC_SUBST(extra_host_libiberty_configure_flags) > + > # Produce a warning message for the subdirs we can't configure. > # This isn't especially interesting in the Cygnus tree, but in the individual > # FSF releases, it's important to let people know when their machine isn't > > > Grüße, > Thomas Jakub