public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: Jakub Jelinek <jakub@redhat.com>,
	       Richard Biener <richard.guenther@gmail.com>
Cc: Andreas Schwab <schwab@suse.de>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	       Andrew Pinski <pinskia@gmail.com>,
	       Nicola Pero <nicola.pero@meta-innovation.com>,
	       Jeff Law <law@redhat.com>
Subject: Re: [patch] boehm-gc removal and libobjc changes to build with an external bdw-gc
Date: Wed, 30 Nov 2016 11:30:00 -0000	[thread overview]
Message-ID: <44251aa7-23b7-3e30-55fc-8c940d51ed23@ubuntu.com> (raw)
In-Reply-To: <20161130105256.GO3541@tucnak.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2691 bytes --]

On 30.11.2016 11:52, Jakub Jelinek wrote:
> On Wed, Nov 30, 2016 at 11:17:32AM +0100, Richard Biener wrote:
>> On Wed, Nov 30, 2016 at 11:06 AM, Matthias Klose <doko@ubuntu.com> wrote:
>>> On 30.11.2016 09:29, Andreas Schwab wrote:
>>>> configure: error: no --with-target-bdw-gc options and no bdw-gc pkg-config module found
>>>> make[1]: *** [Makefile:19775: configure-target-libobjc] Error 1
>>>>
>>>> Andreas.
>>>
>>> that's a bit terse. Could you send the complete output for the configuration of
>>> the libobjc subdir and the config.log?
>>>
>>> I assume that is a configuration with --enable-objc-gc and then the pkg-config
>>> module cannot be found.  Are gc/gc.h and libgc.so in standard paths without
>>> having the bdw-gc pkg-config module available? Which libgc version is installed?
>>
>> I see the same failure with just
>>
>>  ../configure --enable-languages=objc
>>
>> usually we disable languages (with a diagnostic) if requirements
>> cannot be fulfilled.
>>
>> But it seems the default chosen is bad somehow... (and breaks my bootstraps with
>> default languages).
> 
> I'm now testing the default (no --enable-objc-gc, --enable-objc-gc=*,
> --disable-objc-gc) with.  Ok for trunk if it succeeds?
> 
> 2016-11-30  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* configure.ac (--enable-objc-gc): If not given, default to
> 	enable_objc_gc=no.
> 	* configure: Regenerated.
> 
> --- libobjc/configure.ac.jj	2016-11-30 08:57:26.000000000 +0100
> +++ libobjc/configure.ac	2016-11-30 11:47:33.085828683 +0100
> @@ -203,7 +203,7 @@ gt_BITFIELD_TYPE_MATTERS
>  AC_ARG_ENABLE(objc-gc,
>  [AS_HELP_STRING([--enable-objc-gc],
>  		[enable use of Boehm's garbage collector with the
> -		 GNU Objective-C runtime])])
> +		 GNU Objective-C runtime])],,enable_objc_gc=no)
>  AC_ARG_WITH([target-bdw-gc],
>  [AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
>  		[specify prefix directory for installed bdw-gc package.
> --- libobjc/configure.jj	2016-11-30 08:57:26.000000000 +0100
> +++ libobjc/configure	2016-11-30 11:47:44.720680375 +0100
> @@ -11509,6 +11509,8 @@ $as_echo "#define HAVE_BITFIELD_TYPE_MAT
>  # Check whether --enable-objc-gc was given.
>  if test "${enable_objc_gc+set}" = set; then :
>    enableval=$enable_objc_gc;
> +else
> +  enable_objc_gc=no
>  fi

There's one more fix needed for the case of only having the pkg-config module
installed when configuring with --enable-objc-gc. We can't use PKG_CHECK_MODULES
directly because the pkg.m4 macros choke on the dash in the module name. Thus
setting the CFLAGS and LIBS directly. Ok to install?

	* configure.ac: Set BDW_GC_CFLAGS and BDW_GC_LIBS after checking
	for the existence of the pkg-config modules.
	* Regenerate.



[-- Attachment #2: bdw-gc.diff --]
[-- Type: text/x-diff, Size: 663 bytes --]

--- libobjc/configure.ac	(Revision 243006)
+++ libobjc/configure.ac	(Arbeitskopie)
@@ -225,7 +225,9 @@
   if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
     dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
     PKG_CHECK_EXISTS(bdw-gc,
-      AC_MSG_RESULT([using bdw-gc pkg-config module]),
+      [AC_MSG_RESULT([using bdw-gc pkg-config module])
+       BDW_GC_CFLAGS=`$PKG_CONFIG --cflags bdw-gc`
+       BDW_GC_LIBS=`$PKG_CONFIG --libs bdw-gc`],
       AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
   else
     dnl bdw-gw options passed by configure flags

  parent reply	other threads:[~2016-11-30 11:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 20:44 Matthias Klose
2016-11-30  8:30 ` Andreas Schwab
2016-11-30 10:06   ` Matthias Klose
2016-11-30 10:11     ` Andreas Schwab
2016-11-30 10:17     ` Richard Biener
2016-11-30 10:53       ` Jakub Jelinek
2016-11-30 11:13         ` Matthias Klose
2016-11-30 11:30         ` Matthias Klose [this message]
2016-11-30 11:38           ` Richard Biener
2016-11-30 12:08             ` Matthias Klose
2016-11-30 16:54             ` Matthias Klose
2016-11-30 17:27               ` Jeff Law
2016-12-01 12:32                 ` Matthias Klose
2016-11-30 11:37         ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44251aa7-23b7-3e30-55fc-8c940d51ed23@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=nicola.pero@meta-innovation.com \
    --cc=pinskia@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).