configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check to remove the need for MY_CFLAGS.

2010-10-28  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check
	to remove the need for MY_CFLAGS.
	* Makefile.am: Do not use @...@ substitutions.  Use AM_CXXFLAGS,
	AM_CFLAGS and AM_LDFLAGS instead of redefining LTCOMPILE and LINK.
	Use "override" to disable -O2 when required.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.

From-SVN: r166028
This commit is contained in:
Paolo Bonzini 2010-10-28 10:58:48 +00:00 committed by Paolo Bonzini
parent c575a65f66
commit 2a6fa9aeed
6 changed files with 67 additions and 104 deletions

View File

@ -1,3 +1,14 @@
2010-10-28 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Rewrite DGUX check to use GC_CFLAGS, and -O0 check
to remove the need for MY_CFLAGS.
* Makefile.am: Do not use @...@ substitutions. Use AM_CXXFLAGS,
AM_CFLAGS and AM_LDFLAGS instead of redefining LTCOMPILE and LINK.
Use "override" to disable -O2 when required.
* configure: Regenerate.
* Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
2010-10-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* dyn_load.c: Fix typo.

View File

@ -33,20 +33,20 @@ mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
extra_ldflags_libgc = @extra_ldflags_libgc@
# Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = @addobjs@
libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = $(addobjs)
libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS)
libgcjgc_convenience_la_LIBADD = @addobjs@
libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
libgcjgc_convenience_la_LIBADD = $(addobjs)
libgcjgc_convenience_la_DEPENDENCIES = $(addobjs)
AM_CXXFLAGS = @GC_CFLAGS@
AM_CFLAGS = @GC_CFLAGS@
AM_CXXFLAGS = $(GC_CFLAGS)
AM_CFLAGS = $(GC_CFLAGS)
AM_LDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
override CFLAGS := $(filter-out $(O0_CFLAGS), $(CFLAGS)) $(O0_CFLAGS)
test_ldadd = libgcjgc.la $(THREADLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
@ -93,15 +93,6 @@ libstaticrootslib_la_DEPENDENCIES = libgcjgc_convenience.la
.S.lo:
$(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
$(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LTLDFLAGS) -o $@
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.

View File

@ -108,7 +108,13 @@ depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
LTCCASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
@ -188,9 +194,9 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MY_CFLAGS = @MY_CFLAGS@
NM = @NM@
NMEDIT = @NMEDIT@
O0_CFLAGS = @O0_CFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
@ -301,14 +307,15 @@ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
# Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = @addobjs@
libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = $(addobjs)
libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS)
libgcjgc_convenience_la_LIBADD = @addobjs@
libgcjgc_convenience_la_DEPENDENCIES = @addobjs@
AM_CXXFLAGS = @GC_CFLAGS@
AM_CFLAGS = @GC_CFLAGS@
libgcjgc_convenience_la_LIBADD = $(addobjs)
libgcjgc_convenience_la_DEPENDENCIES = $(addobjs)
AM_CXXFLAGS = $(GC_CFLAGS)
AM_CFLAGS = $(GC_CFLAGS)
AM_LDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
test_ldadd = libgcjgc.la $(THREADLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
gctest_SOURCES = tests/test.c
gctest_LDADD = $(test_ldadd)
@ -334,14 +341,6 @@ libstaticrootslib_la_LDFLAGS = -version-info 1:2:0 -no-undefined \
-rpath /nowhere -shared-libgcc
libstaticrootslib_la_DEPENDENCIES = libgcjgc_convenience.la
LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
$(CC) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LTLDFLAGS) -o $@
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
@ -886,6 +885,7 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool mostlyclean-multi pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
override CFLAGS := $(filter-out $(O0_CFLAGS), $(CFLAGS)) $(O0_CFLAGS)
.s.lo:
$(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<

55
boehm-gc/configure vendored
View File

@ -604,7 +604,7 @@ LTLIBOBJS
LIBOBJS
toolexeclibdir
toolexecdir
MY_CFLAGS
O0_CFLAGS
addtests
addlibs
addincludes
@ -15332,59 +15332,40 @@ addobjs="$addobjs $machdep"
#
# Check for AViiON Machines running DGUX
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if host is AViiON running DGUX" >&5
$as_echo_n "checking if host is AViiON running DGUX... " >&6; }
ac_is_dgux=no
ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
ac_is_dgux=yes;
ac_is_dgux=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if host is AViiON running DGUX" >&5
$as_echo_n "checking if host is AViiON running DGUX... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_is_dgux" >&5
$as_echo "$ac_is_dgux" >&6; }
## :GOTCHA: we do not check anything but sys/dg_sys_info.h
if test $ac_is_dgux = yes; then
if test "$enable_full_debug" = "yes"; then
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
else
CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
GC_CFLAGS="$GC_CFLAGS -mstandard"
fi
GC_CFLAGS="$GC_CFLAGS -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Solaris gcc optimization fix is necessary" >&5
$as_echo_n "checking whether Solaris gcc optimization fix is necessary... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC optimization fix should be disabled" >&5
$as_echo_n "checking whether GCC optimization fix should be disabled... " >&6; }
O0_CFLAGS=-mtune=generic
case "$host" in
*aix*)
if test "$GCC" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
new_CFLAGS=
for i in $CFLAGS; do
case "$i" in
-O*)
;;
*)
new_CFLAGS="$new_CFLAGS $i"
;;
esac
done
CFLAGS="$new_CFLAGS"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } ;;
*aix*) test "$GCC" = yes && O0_CFLAGS=-O0 ;;
*) ;;
esac
MY_CFLAGS="$CFLAGS"
if test x"$O0_CFLAGS" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi

View File

@ -453,54 +453,34 @@ AC_SUBST(addtests)
#
# Check for AViiON Machines running DGUX
#
AC_MSG_CHECKING(if host is AViiON running DGUX)
ac_is_dgux=no
AC_CHECK_HEADER(sys/dg_sys_info.h,
[ac_is_dgux=yes;])
AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_is_dgux=yes])
AC_MSG_CHECKING(if host is AViiON running DGUX)
AC_MSG_RESULT($ac_is_dgux)
## :GOTCHA: we do not check anything but sys/dg_sys_info.h
if test $ac_is_dgux = yes; then
if test "$enable_full_debug" = "yes"; then
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
else
CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
GC_CFLAGS="$GC_CFLAGS -mstandard"
fi
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
GC_CFLAGS="$GC_CFLAGS -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend"
fi
dnl As of 4.13a2, the collector will not properly work on Solaris when
dnl built with gcc and -O. So we remove -O in the appropriate case.
dnl Not needed anymore on Solaris.
AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
AC_MSG_CHECKING([whether GCC optimization should be disabled])
O0_CFLAGS=
case "$host" in
*aix*)
if test "$GCC" = yes; then
AC_MSG_RESULT(yes)
new_CFLAGS=
for i in $CFLAGS; do
case "$i" in
-O*)
;;
*)
new_CFLAGS="$new_CFLAGS $i"
;;
esac
done
CFLAGS="$new_CFLAGS"
else
AC_MSG_RESULT(no)
fi
;;
*) AC_MSG_RESULT(no) ;;
*aix*) test "$GCC" = yes && O0_CFLAGS=-O0 ;;
*) ;;
esac
dnl We need to override the top-level CFLAGS. This is how we do it.
MY_CFLAGS="$CFLAGS"
AC_SUBST(MY_CFLAGS)
if test x"$O0_CFLAGS" != x; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST([O0_CFLAGS])
dnl Include defines that have become de facto standard.
dnl ALL_INTERIOR_POINTERS can be overridden in startup code.

View File

@ -110,9 +110,9 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MY_CFLAGS = @MY_CFLAGS@
NM = @NM@
NMEDIT = @NMEDIT@
O0_CFLAGS = @O0_CFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@