From: Ivan Maidanski Date: Wed, 14 Sep 2011 07:00:23 +0000 (+0400) Subject: Delete configure.host (move its content to configure.ac). X-Git-Tag: gc7_3alpha2~358 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b63547583b98a3402f67e69d87ac77eb64b7c07e;p=gc Delete configure.host (move its content to configure.ac). * Makefile.am (dist_noinst_SCRIPTS): Remove configure.host. * Makefile.direct (GNU_BUILD_FILES): Likewise. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove. * configure.ac: Put the content of configure.host instead of including it. * configure.host: Remove file. --- diff --git a/Makefile.am b/Makefile.am index f0e465c5..2e43971e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -146,9 +146,8 @@ endif CCASFLAGS += $(DEFS) -dist_noinst_SCRIPTS = callprocs configure.host - ## callprocs --- used by Makefile.{dj,direct} - ## configure.host --- used by Makefile.{am,dj,direct} +dist_noinst_SCRIPTS = callprocs + ## callprocs --- used by Makefile.direct # headers which are not installed # (see include/include.am for more) @@ -176,10 +175,6 @@ EXTRA_DIST += tools/add_gc_prefix.c tools/gcname.c tools/if_mach.c \ Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \ include/private/msvc_dbg.h extra/msvc_dbg.c -# this is an auxiliary shell file used by Makefile and Makefile.direct -# -CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host - # # :GOTCHA: GNU make rule for making .s out of .S is flawed, # it will not remove dest if building fails diff --git a/Makefile.direct b/Makefile.direct index 53fdf2a7..2be43311 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -123,8 +123,7 @@ TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \ tests/leak_test.c tests/thread_leak_test.c tests/middle.c \ tests/smash_test.c tests/huge_test.c -GNU_BUILD_FILES= configure.ac Makefile.am configure \ - install-sh configure.host Makefile.in \ +GNU_BUILD_FILES= configure.ac Makefile.am configure install-sh Makefile.in \ aclocal.m4 config.sub config.guess \ include/include.am doc/doc.am \ ltmain.sh mkinstalldirs depcomp missing \ diff --git a/TODO b/TODO index 5db463a2..d0258753 100644 --- a/TODO +++ b/TODO @@ -18,8 +18,6 @@ Merge symbian branch to master. Merge useful code (if any) from iphone_libgc_6x branch. (Same for gcc_boehmgc and mono_libgc.) -configure.host: Move contents to configure.ac and remove the file. - windows-untested: Remove if CMake can generate MS Visual Studio 6.0, 7.0, 8.0 project files. diff --git a/configure.ac b/configure.ac index 8821e9c0..03dfe5c6 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,47 @@ AM_PROG_AS AC_PROG_INSTALL -. ${srcdir}/configure.host +# Special CFLAGS to use when building +gc_cflags="" + +# We should set -fexceptions if we are using gcc and might be used +# inside something like gcj. This is the zeroth approximation: +if test :"$GCC": = :yes: ; then + gc_cflags="${gc_cflags} -fexceptions" +else + case "$host" in + hppa*-*-hpux* ) + if test :$GCC: != :"yes": ; then + gc_cflags="${gc_flags} +ESdbgasm" + fi + # :TODO: actaully we should check using Autoconf if + # the compiler supports this option. + ;; + esac +fi + +# target_optspace --enable-target-optspace ("yes", "no", "") +case "${target_optspace}:${host}" in + yes:*) + gc_cflags="${gc_cflags} -Os" + ;; + :m32r-* | :d10v-* | :d30v-*) + gc_cflags="${gc_cflags} -Os" + ;; + no:* | :*) + # Nothing. + ;; +esac + +# Set any host dependent compiler flags. +case "${host}" in + mips-tx39-*|mipstx39-unknown-*) + gc_cflags="${gc_cflags} -G 0" + ;; + *) + ;; +esac + GC_CFLAGS=${gc_cflags} AC_SUBST(GC_CFLAGS) diff --git a/configure.host b/configure.host deleted file mode 100644 index 898c9236..00000000 --- a/configure.host +++ /dev/null @@ -1,61 +0,0 @@ -# configure.host - -# This shell script handles all host based configuration for the garbage -# collector. -# It sets various shell variables based on the host and the -# configuration options. You can modify this shell script without -# needing to rerun autoconf. - -# This shell script should be invoked as -# . configure.host -# If it encounters an error, it will exit with a message. - -# It uses the following shell variables: -# host The configuration host -# host_cpu The configuration host CPU -# target_optspace --enable-target-optspace ("yes", "no", "") -# GCC should be "yes" if using gcc - -# It sets the following shell variables: -# gc_cflags Special CFLAGS to use when building - -gc_cflags="" - -# We should set -fexceptions if we are using gcc and might be used -# inside something like gcj. This is the zeroth approximation: -if test :"$GCC": = :yes: ; then - gc_cflags="${gc_cflags} -fexceptions" -else - case "$host" in - hppa*-*-hpux* ) - if test :$GCC: != :"yes": ; then - gc_cflags="${gc_flags} +ESdbgasm" - fi - # :TODO: actaully we should check using Autoconf if - # the compiler supports this option. - ;; - esac -fi - -case "${target_optspace}:${host}" in - yes:*) - gc_cflags="${gc_cflags} -Os" - ;; - :m32r-* | :d10v-* | :d30v-*) - gc_cflags="${gc_cflags} -Os" - ;; - no:* | :*) - # Nothing. - ;; -esac - -# Set any host dependent compiler flags. -# THIS TABLE IS SORTED. KEEP IT THAT WAY. - -case "${host}" in - mips-tx39-*|mipstx39-unknown-*) - gc_cflags="${gc_cflags} -G 0" - ;; - *) - ;; -esac