This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/5] add libcc1


Hi!

On Thu, 30 Oct 2014 09:51:59 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> 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.

Ah, now I see.  Conceptually, as I understand it, that should be done in
the top-level build system, so that libcc1 (and, in case, the shared host
libiberty) isn't even attempted to be built if not supported.  But then,
I don't personally have to deal with hosts that don't support plugins.

> Your patch is ok with proper ChangeLog entry.

Committed in r216912:

commit 944792ef24b74c2b6f5e5d0763b7e5a4a361c3d4
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Oct 30 10:06:37 2014 +0000

    Build a shared host libiberty also for libcc1's benefit.
    
    	* configure.ac (extra_host_libiberty_configure_flags): Add
    	--enable-shared also for libcc1's benefit.
    	* configure: Regenerate.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216912 138bc75d-0d04-0410-961f-82ee72b054a4
---
 ChangeLog    |  6 ++++++
 configure    | 16 ++++++++++++----
 configure.ac | 14 +++++++++++---
 3 files changed, 29 insertions(+), 7 deletions(-)

diff --git ChangeLog ChangeLog
index e3636c6..ebcae80 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,9 @@
+2014-10-30  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* configure.ac (extra_host_libiberty_configure_flags): Add
+	--enable-shared also for libcc1's benefit.
+	* configure: Regenerate.
+
 2014-10-29  Tristan Gingold  <gingold@adacore.com>
 
 	* MAINTAINERS: Change my email address.
diff --git configure configure
index 149acf6..3eab122 100755
--- configure
+++ configure
@@ -642,8 +642,8 @@ CXXFLAGS_FOR_TARGET
 CFLAGS_FOR_TARGET
 DEBUG_PREFIX_CFLAGS_FOR_TARGET
 SYSROOT_CFLAGS_FOR_TARGET
-stage1_languages
 extra_host_libiberty_configure_flags
+stage1_languages
 extra_linker_plugin_flags
 extra_linker_plugin_configure_flags
 clooginc
@@ -6259,7 +6259,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,*) ;;
@@ -6267,11 +6266,9 @@ 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
 
-
   missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
   potential_languages=,c,
 
@@ -6584,6 +6581,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
+
+
 # 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
diff --git configure.ac configure.ac
index b62af38..d8262f8 100644
--- configure.ac
+++ configure.ac
@@ -1852,7 +1852,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,*) ;;
@@ -1860,10 +1859,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,
@@ -2177,6 +2174,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

Attachment: pgpLm0GLnAwAi.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]