From patchwork Sun Nov 20 20:42:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 83164 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1155678qge; Sun, 20 Nov 2016 12:43:36 -0800 (PST) X-Received: by 10.129.82.214 with SMTP id g205mr9837800ywb.73.1479674616345; Sun, 20 Nov 2016 12:43:36 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id g203si1717092ybg.325.2016.11.20.12.43.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Nov 2016 12:43:36 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-442083-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-442083-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-442083-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=JFb2OejTsrdO+5er7 j9jyHjYlcjCf48VuVWhV8mZ/QtvtUhncnxRkCYTaM1NzkE+i6TGdG1A67kZ1qFFM 6tgv1kf2J3WnVSA+il+U7Qu3sUnAGxguFyeydYQJ9a1ArOeLTBY1bs/MkFHCgD99 0hJhATLKYbMG4VUI2Daz8q7uEQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=RD01XiZ5e8oKKcsaMhorq5n 2sGw=; b=g9wFuvL+woEFjAAi5TT/lGYR0GswVFwlVL0kq91sw5EZFtUaLmH9ich Skt3GdWvdoJukx3LMwQkF31dcIAU3vNhsd7SPUlGuH/kLWigBXYCZs/zX8ztB6jh 219PwHfZUAKB0XvkrXQDejRXL9ZLIeLsLIrKbxQIhifPLD7lSTmc= Received: (qmail 14089 invoked by alias); 20 Nov 2016 20:42:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13777 invoked by uid 89); 20 Nov 2016 20:42:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=rda, runtimeh, runtime.h, UD:runtime.h X-Spam-User: qpsmtpd, 2 recipients X-HELO: einhorn.in-berlin.de Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 Nov 2016 20:42:25 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.178.26] (ip5f5af460.dynamic.kabel-deutschland.de [95.90.244.96]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u1) with ESMTP id uAKKgHil027179 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 20 Nov 2016 21:42:17 +0100 Subject: Re: [PATCH] Delete GCJ To: Iain Sandoe References: <78f841e7-808b-58d0-7913-3ec0d19630a0@redhat.com> <4deb7e45-e428-d819-aabc-748abe8f7686@redhat.com> <0E421C5A-7EF5-4182-A13B-BF9AEAF90215@comcast.net> <6DA7C7D0-314E-4A5E-8B35-5A8EA2F74CD8@mentor.com> <2b5de569-1efd-f407-49c2-c9fa84cc5315@ubuntu.com> <4964955d-4de1-618c-de41-835ca19f9932@ubuntu.com> <4FBA6B16-460A-4EBB-8809-0883A84ABEB7@mentor.com> <0bf14402-d4e6-5fb0-8a63-479903ed2141@ubuntu.com> <01B885DF-4340-43C6-A784-21326A9CA8CF@comcast.net> <10704c8f-fd72-8d13-17a1-f522e88345b2@ubuntu.com> <31916070-ce2d-423a-e942-33f0b3ebc227@ubuntu.com> <6747724B-4128-4C55-8625-91AA559A0D98@mentor.com> Cc: Mike Stump , Rainer Orth , Jeff Law , Andrew Haley , GCC Patches , GCJ-patches From: Matthias Klose Message-ID: <885027a6-080b-ec6f-89df-533be4132b36@ubuntu.com> Date: Sun, 20 Nov 2016 21:42:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <6747724B-4128-4C55-8625-91AA559A0D98@mentor.com> On 10.10.2016 09:58, Iain Sandoe wrote: > >> On 10 Oct 2016, at 05:03, Matthias Klose wrote: >> >> On 07.10.2016 10:30, Iain Sandoe wrote: >>> >>>> On 7 Oct 2016, at 00:58, Matthias Klose wrote: >>>> >>>> On 06.10.2016 20:00, Mike Stump wrote: >>>>> On Oct 6, 2016, at 9:56 AM, Rainer Orth wrote: >>>>>> I wouldn't hard-fail, but completely disable objc-gc with an appropriate >>>>>> warning. The Objective-C maintainers may have other preferences, though. >>>> >>>> I think I can't do that in the top level make file very well (currently I only >>>> have the pkg-config check there for an early failure, but that check doesn't >>>> tell me if the library is present for all multilib variants). And I can't check >>>> for multilibs because I don't know if the bootstrap compiler is multilib aware. >>> >>> hrm, so perhaps we need a —with-target-boehm-gc= type arrangement, and it’s the configurer’s responsibility to provide a path with appropriate headers/libs for the multi-lib configuration being attempted. >> >> I don't understand what you are proposing here. > > given that: > auto-detection of the capabilities could be quite difficult (or, in the general case, unachievable) for the reasons you gave. > the chosen target libraries might be in a non-standard place. > > making it an explicit requirement to point to them, and to ensure that the versions/multi-libs provided are suitable, (by putting —with-target-boehm-gc=/path/to/suitable/) would mean that the dependent configury (for objc-gc) could be just conditional upon the presence of the "with-target-boehm-gc”. > > I suppose that one could make "—with-target-boehm-gc” (no attached path) declare that the library (and requisite mult-lib versions) will be found in the sysroot without any additional work. > > The point here was to simplify the dependent configury so that it only needs to test something that the configuring user specifies (i.e. if they specify objc-gc, then they need also to specify the place that the gc lib can be found). So here is the next proposal, I hope the added documentation in install.texi makes the usage clear. 2016-11-19 Matthias Klose * Makefile.def: Remove reference to boehm-gc target module. * configure.ac: Include pkg.m4, check for --with-target-bdw-gc options and for the bdw-gc pkg-config module. * configure: Regenerate. * Makefile.in: Regenerate. gcc/ 2016-11-19 Matthias Klose * doc/install.texi: Document configure options --enable-objc-gc and --with-target-bdw-gc. config/ 2016-11-19 Matthias Klose * pkg.m4: New file. libobjc/ 2016-11-19 Matthias Klose * configure.ac (--enable-objc-gc): Allow to configure with a system provided boehm-gc. * configure: Regenerate. * Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure. * gc.c: Include system bdw-gc headers. * memory.c: Likewise * objects.c: Likewise boehm-gc/ 2016-11-19 Matthias Klose Remove 2016-11-19 Matthias Klose * Makefile.def: Remove reference to boehm-gc target module. * configure.ac: Include pkg.m4, check for --with-target-bdw-gc options and for the bdw-gc pkg-config module. * configure: Regenerate. * Makefile.in: Regenerate. gcc/ 2016-11-19 Matthias Klose * doc/install.texi: Document configure options --enable-objc-gc and --with-target-bdw-gc. config/ 2016-11-19 Matthias Klose * pkg.m4: New file. libobjc/ 2016-11-19 Matthias Klose * configure.ac (--enable-objc-gc): Allow to configure with a system provided boehm-gc. * configure: Regenerate. * Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure. * gc.c: Include system bdw-gc headers. * memory.c: Likewise * objects.c: Likewise boehm-gc/ 2016-11-19 Matthias Klose Remove Index: Makefile.def =================================================================== --- Makefile.def (revision 242638) +++ Makefile.def (working copy) @@ -166,7 +166,6 @@ target_modules = { module= libgloss; no_check=true; }; target_modules = { module= libffi; no_install=true; }; target_modules = { module= zlib; }; -target_modules = { module= boehm-gc; }; target_modules = { module= rda; }; target_modules = { module= libada; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; @@ -543,7 +542,6 @@ // a dependency on libgcc for native targets to configure. lang_env_dependencies = { module=libiberty; no_c=true; }; -dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; }; dependencies = { module=configure-target-fastjar; on=configure-target-zlib; }; dependencies = { module=all-target-fastjar; on=all-target-zlib; }; dependencies = { module=configure-target-libgo; on=configure-target-libffi; }; @@ -551,8 +549,6 @@ dependencies = { module=all-target-libgo; on=all-target-libbacktrace; }; dependencies = { module=all-target-libgo; on=all-target-libffi; }; dependencies = { module=all-target-libgo; on=all-target-libatomic; }; -dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; }; -dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; }; dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; }; dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; }; dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; }; Index: configure.ac =================================================================== --- configure.ac (revision 242638) +++ configure.ac (working copy) @@ -29,6 +29,7 @@ m4_include([ltversion.m4]) m4_include([lt~obsolete.m4]) m4_include([config/isl.m4]) +m4_include([config/pkg.m4]) AC_INIT(move-if-change) AC_PREREQ(2.64) @@ -161,7 +162,6 @@ target-libssp \ target-libquadmath \ target-libgfortran \ - target-boehm-gc \ target-libffi \ target-libobjc \ target-libada \ @@ -2060,22 +2060,36 @@ AC_ARG_ENABLE(objc-gc, [AS_HELP_STRING([--enable-objc-gc], [enable use of Boehm's garbage collector with the - GNU Objective-C runtime])], -[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in - *,objc,*:*:yes:*target-boehm-gc*) - AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration]) - ;; -esac]) - -# Make sure we only build Boehm's garbage collector if required. -case ,${enable_languages},:${enable_objc_gc} in - *,objc,*:yes) - # Keep target-boehm-gc if requested for Objective-C. - ;; - *) - # Otherwise remove target-boehm-gc. - noconfigdirs="$noconfigdirs target-boehm-gc" - ;; + GNU Objective-C runtime])]) +AC_ARG_WITH([target-bdw-gc], +[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST], + [specify prefix directory for installed bdw-gc package. + Equivalent to --with-bdw-gc-include=PATH/include + plus --with-bdw-gc-lib=PATH/lib])]) +AC_ARG_WITH([target-bdw-gc-include], +[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST], + [specify directories for installed bdw-gc include files])]) +AC_ARG_WITH([target-bdw-gc-lib], +[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST], + [specify directories for installed bdw-gc library])]) + +case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto) + AC_MSG_CHECKING([for bdw garbage collector]) + 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_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found])) + else + dnl bdw-gw options, first error checking, complete checking in libobjc + if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then + AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing]) + elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then + AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing]) + else + AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options]) + fi + fi esac # Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++ Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi (revision 242638) +++ gcc/doc/install.texi (working copy) @@ -2143,6 +2143,36 @@ overrides, you can pass a setting for @env{CONFIG_SITE} and set variables in the site file. +@subheading Objective-C-Specific Options + +The following options apply to the build of the Objective-C runtime library. + +@table @code +@item --enable-objc-gc +Specify that an additional variant of the GNU Objective-C runtime library +is built, using an external build of the Boehm-Demers-Weiser garbage +collector (@uref{http://www.hboehm.info/gc/}). This library needs to be +available for each multilib variant, unless configured with +@option{--enable-objc-gc=@samp{auto}} in which case the build of the +additional runtime library is skipped and the build continues. + +@item --with-target-bdw-gc=@var{list} +@itemx --with-target-bdw-gc-include=@var{list} +@itemx --with-target-bdw-gc-lib=@var{list} +Specify search directories for the garbage collector header files and +libraries. @var{list} is a comma separated list of key value pairs of the +form @samp{@var{multilibdir}@=@var{path}}, where the default multilib key +is named as @samp{.} (dot), or is omitted (e.g. +@samp{--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32}). + +The options @option{--with-target-bdw-gc-include} and +@option{--with-target-bdw-gc-include} must always specified together for +each multilib variant and take precedence over +@option{--with-target-bdw-gc-include}. If none of these options are +specified, the values are taken from the @command{pkg-config} +@samp{bdw-gc} module. +@end table + @html

Index: libobjc/Makefile.in =================================================================== --- libobjc/Makefile.in (revision 242638) +++ libobjc/Makefile.in (working copy) @@ -47,8 +47,6 @@ top_builddir = . --include ../boehm-gc/threads.mk - libdir = $(exec_prefix)/lib libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) @@ -95,7 +93,7 @@ OBJC_GCFLAGS=@OBJC_GCFLAGS@ OBJC_BOEHM_GC=@OBJC_BOEHM_GC@ OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@ -OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags) +OBJC_BOEHM_GC_LIBS=@OBJC_BOEHM_GC_LIBS@ INCLUDES = -I$(srcdir)/$(MULTISRCTOP)../gcc \ -I$(srcdir)/$(MULTISRCTOP)../gcc/config \ Index: libobjc/configure.ac =================================================================== --- libobjc/configure.ac (revision 242638) +++ libobjc/configure.ac (working copy) @@ -18,6 +18,8 @@ #along with GCC; see the file COPYING3. If not see #. +m4_include([../config/pkg.m4]) + AC_PREREQ(2.64) AC_INIT(package-unused, version-unused,, libobjc) AC_CONFIG_SRCDIR([objc/objc.h]) @@ -57,26 +59,6 @@ [version_specific_libs=no]) AC_MSG_RESULT($version_specific_libs) -AC_ARG_ENABLE(objc-gc, -[ --enable-objc-gc enable the use of Boehm's garbage collector with - the GNU Objective-C runtime.], -[case $enable_objc_gc in - no) - OBJC_GCFLAGS='' - OBJC_BOEHM_GC='' - OBJC_BOEHM_GC_INCLUDES='' - ;; - *) - OBJC_GCFLAGS='-DOBJC_WITH_GC=1' - OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la' - OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include' - ;; -esac], -[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES='']) -AC_SUBST(OBJC_GCFLAGS) -AC_SUBST(OBJC_BOEHM_GC) -AC_SUBST(OBJC_BOEHM_GC_INCLUDES) - # ----------- # Directories # ----------- @@ -214,6 +196,163 @@ gt_BITFIELD_TYPE_MATTERS +# ----------- +# boehm-gc +# ----------- + +AC_ARG_ENABLE(objc-gc, +[AS_HELP_STRING([--enable-objc-gc], + [enable use of Boehm's garbage collector with the + GNU Objective-C runtime])]) +AC_ARG_WITH([target-bdw-gc], +[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST], + [specify prefix directory for installed bdw-gc package. + Equivalent to --with-bdw-gc-include=PATH/include + plus --with-bdw-gc-lib=PATH/lib])]) +AC_ARG_WITH([target-bdw-gc-include], +[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST], + [specify directories for installed bdw-gc include files])]) +AC_ARG_WITH([target-bdw-gc-lib], +[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST], + [specify directories for installed bdw-gc library])]) + +case "$enable_objc_gc" in +no) + use_bdw_gc=no + ;; +*) + AC_MSG_CHECKING([for bdw garbage collector]) + 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_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found])) + else + dnl bdw-gw options, first error checking, complete checking in libobjc + if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then + AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing]) + elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then + AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing]) + else + AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options]) + fi + fi + mldir=`${CC-gcc} --print-multi-directory 2>/dev/null` + bdw_val= + if test "x$with_target_bdw_gc" != x; then + for i in `echo $with_target_bdw_gc | tr ',' ' '`; do + case "$i" in + *=*) sd=${i%%=*}; d=${i#*=} ;; + *) sd=.; d=$i ;; + esac + if test "$mldir" = "$sd"; then + bdw_val=$d + fi + done + if test "x$bdw_val" = x; then + AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc]) + fi + bdw_inc_dir="$bdw_val/include" + bdw_lib_dir="$bdw_val/lib" + fi + bdw_val= + if test "x$with_target_bdw_gc_include" != x; then + for i in `echo $with_target_bdw_gc_include | tr ',' ' '`; do + case "$i" in + *=*) sd=${i%%=*}; d=${i#*=} ;; + *) sd=.; d=$i ;; + esac + if test "$mldir" = "$sd"; then + bdw_val=$d + fi + done + if test "x$bdw_val" = x; then + AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include]) + fi + bdw_inc_dir="$bdw_val" + fi + bdw_val= + if test "x$with_target_bdw_gc_lib" != x; then + for i in `echo $with_target_bdw_gc_lib | tr ',' ' '`; do + case "$i" in + *=*) sd=${i%%=*}; d=${i#*=} ;; + *) sd=.; d=$i ;; + esac + if test "$mldir" = "$sd"; then + bdw_val=$d + fi + done + if test "x$bdw_val" = x; then + AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib]) + fi + bdw_lib_dir="$bdw_val" + fi + if test "x$bdw_inc_dir" = x; then + AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-include]) + fi + if test "x$bdw_lib_dir" = x; then + AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-bdw-gc-lib]) + fi + BDW_GC_CFLAGS="-I$bdw_inc_dir" + BDW_GC_LIBS="-L$bdw_lib_dir -lgc" + AC_MSG_RESULT([found]) + use_bdw_gc=maybe +esac + +if test "$use_bdw_gc" = maybe; then + AC_MSG_CHECKING([for system boehm-gc]) + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + CFLAGS="$CFLAGS $BDW_GC_CFLAGS" + LIBS="$LIBS $BDW_GC_LIBS" + dnl the link test is not good enough for ARM32 multilib detection, + dnl first check to link, then to run + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ],[GC_init()])], + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { + GC_init(); + return 0; + } + ]])], + [system_bdw_gc_found=yes], + [system_bdw_gc_found=no], + dnl assume no system boehm-gc for cross builds ... + [system_bdw_gc_found=no] + ) + ], + [system_bdw_gc_found=no]) + CFLAGS=$save_CFLAGS + LIBS=$save_LIBS + if test x$enable_objc_gc = xauto && test x$system_bdw_gc_found = xno; then + AC_MSG_WARN([system bdw-gc not found, not building libobjc_gc]) + use_bdw_gc=no + elif test x$enable_objc_gc = xyes && test x$system_bdw_gc_found = xno; then + AC_MSG_ERROR([system bdw-gc required but not found]) + else + use_bdw_gc=yes + AC_MSG_RESULT([found]) + fi +fi + +if test "$use_bdw_gc" = no; then + OBJC_GCFLAGS='' + OBJC_BOEHM_GC='' + OBJC_BOEHM_GC_INCLUDES='' + OBJC_BOEHM_GC_LIBS='' +else + OBJC_GCFLAGS='-DOBJC_WITH_GC=1' + OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la' + OBJC_BOEHM_GC_INCLUDES=$BDW_GC_CFLAGS + OBJC_BOEHM_GC_LIBS=$BDW_GC_LIBS +fi +AC_SUBST(OBJC_GCFLAGS) +AC_SUBST(OBJC_BOEHM_GC) +AC_SUBST(OBJC_BOEHM_GC_INCLUDES) +AC_SUBST(OBJC_BOEHM_GC_LIBS) + # ------ # Output # ------ Index: libobjc/gc.c =================================================================== --- libobjc/gc.c (revision 242638) +++ libobjc/gc.c (working copy) @@ -36,7 +36,7 @@ #include "objc/runtime.h" #include "objc-private/module-abi-8.h" -#include +#include #include /* gc_typed.h uses the following but doesn't declare them */ @@ -44,7 +44,7 @@ typedef GC_signed_word signed_word; #define BITS_PER_WORD (CHAR_BIT * sizeof (word)) -#include +#include /* The following functions set up in `mask` the corresponding pointers. The offset is incremented with the size of the type. */ Index: libobjc/memory.c =================================================================== --- libobjc/memory.c (revision 242638) +++ libobjc/memory.c (working copy) @@ -41,7 +41,7 @@ #include "objc/runtime.h" #if OBJC_WITH_GC -#include +#include void * objc_malloc (size_t size) Index: libobjc/objects.c =================================================================== --- libobjc/objects.c (revision 242638) +++ libobjc/objects.c (working copy) @@ -31,8 +31,8 @@ #include /* For memcpy() */ #if OBJC_WITH_GC -# include -# include +# include +# include #endif /* FIXME: The semantics of extraBytes are not really clear. */