Commit 2a6fa9ae by Paolo Bonzini Committed by Paolo Bonzini

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
parent c575a65f
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> 2010-10-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* dyn_load.c: Fix typo. * dyn_load.c: Fix typo.
......
...@@ -33,20 +33,20 @@ mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_darwin_mach_dep.s \ ...@@ -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 \ rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.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 # Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked: # linuxthread semaphore functions get linked:
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS) libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = @addobjs@ libgcjgc_la_DEPENDENCIES = $(addobjs)
libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir) libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS) libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS)
libgcjgc_convenience_la_LIBADD = @addobjs@ libgcjgc_convenience_la_LIBADD = $(addobjs)
libgcjgc_convenience_la_DEPENDENCIES = @addobjs@ libgcjgc_convenience_la_DEPENDENCIES = $(addobjs)
AM_CXXFLAGS = @GC_CFLAGS@ AM_CXXFLAGS = $(GC_CFLAGS)
AM_CFLAGS = @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) test_ldadd = libgcjgc.la $(THREADLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
...@@ -93,15 +93,6 @@ libstaticrootslib_la_DEPENDENCIES = libgcjgc_convenience.la ...@@ -93,15 +93,6 @@ libstaticrootslib_la_DEPENDENCIES = libgcjgc_convenience.la
.S.lo: .S.lo:
$(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $< $(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 # 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 # values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile. # friends when we are called from the top level Makefile.
......
...@@ -108,7 +108,13 @@ depcomp = ...@@ -108,7 +108,13 @@ depcomp =
am__depfiles_maybe = am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(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) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
LTCCASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ LTCCASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) --mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
...@@ -188,9 +194,9 @@ LTLIBOBJS = @LTLIBOBJS@ ...@@ -188,9 +194,9 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
MY_CFLAGS = @MY_CFLAGS@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
O0_CFLAGS = @O0_CFLAGS@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@ OTOOL = @OTOOL@
...@@ -301,14 +307,15 @@ sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s ...@@ -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 # Include THREADLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked: # linuxthread semaphore functions get linked:
libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS) $(UNWINDLIBS) libgcjgc_la_LIBADD = $(addobjs) $(THREADLIBS) $(UNWINDLIBS)
libgcjgc_la_DEPENDENCIES = @addobjs@ libgcjgc_la_DEPENDENCIES = $(addobjs)
libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir) libgcjgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:2:0 -rpath $(toolexeclibdir)
libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS) libgcjgc_la_LINK = $(LINK) $(libgcjgc_la_LDFLAGS)
libgcjgc_convenience_la_LIBADD = @addobjs@ libgcjgc_convenience_la_LIBADD = $(addobjs)
libgcjgc_convenience_la_DEPENDENCIES = @addobjs@ libgcjgc_convenience_la_DEPENDENCIES = $(addobjs)
AM_CXXFLAGS = @GC_CFLAGS@ AM_CXXFLAGS = $(GC_CFLAGS)
AM_CFLAGS = @GC_CFLAGS@ AM_CFLAGS = $(GC_CFLAGS)
AM_LDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
test_ldadd = libgcjgc.la $(THREADLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS) test_ldadd = libgcjgc.la $(THREADLIBS) $(UNWINDLIBS) $(EXTRA_TEST_LIBS)
gctest_SOURCES = tests/test.c gctest_SOURCES = tests/test.c
gctest_LDADD = $(test_ldadd) gctest_LDADD = $(test_ldadd)
...@@ -334,14 +341,6 @@ libstaticrootslib_la_LDFLAGS = -version-info 1:2:0 -no-undefined \ ...@@ -334,14 +341,6 @@ libstaticrootslib_la_LDFLAGS = -version-info 1:2:0 -no-undefined \
-rpath /nowhere -shared-libgcc -rpath /nowhere -shared-libgcc
libstaticrootslib_la_DEPENDENCIES = libgcjgc_convenience.la 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 # 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 # values defined in terms of make variables, as is the case for CC and
...@@ -886,6 +885,7 @@ uninstall-am: ...@@ -886,6 +885,7 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool mostlyclean-multi pdf \ mostlyclean-generic mostlyclean-libtool mostlyclean-multi pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
override CFLAGS := $(filter-out $(O0_CFLAGS), $(CFLAGS)) $(O0_CFLAGS)
.s.lo: .s.lo:
$(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $< $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
......
...@@ -604,7 +604,7 @@ LTLIBOBJS ...@@ -604,7 +604,7 @@ LTLIBOBJS
LIBOBJS LIBOBJS
toolexeclibdir toolexeclibdir
toolexecdir toolexecdir
MY_CFLAGS O0_CFLAGS
addtests addtests
addlibs addlibs
addincludes addincludes
...@@ -15332,59 +15332,40 @@ addobjs="$addobjs $machdep" ...@@ -15332,59 +15332,40 @@ addobjs="$addobjs $machdep"
# #
# Check for AViiON Machines running DGUX # 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_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" 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 : if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
ac_is_dgux=yes; ac_is_dgux=yes
fi 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 "$as_me:${as_lineno-$LINENO}: result: $ac_is_dgux" >&5
$as_echo "$ac_is_dgux" >&6; } $as_echo "$ac_is_dgux" >&6; }
## :GOTCHA: we do not check anything but sys/dg_sys_info.h ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
if test $ac_is_dgux = yes; then if test $ac_is_dgux = yes; then
if test "$enable_full_debug" = "yes"; then if test "$enable_full_debug" = "yes"; then
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" GC_CFLAGS="$GC_CFLAGS -mstandard"
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"
fi fi
GC_CFLAGS="$GC_CFLAGS -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend"
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Solaris gcc optimization fix is necessary" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC optimization fix should be disabled" >&5
$as_echo_n "checking whether Solaris gcc optimization fix is necessary... " >&6; } $as_echo_n "checking whether GCC optimization fix should be disabled... " >&6; }
O0_CFLAGS=-mtune=generic
case "$host" in case "$host" in
*aix*) *aix*) test "$GCC" = yes && O0_CFLAGS=-O0 ;;
if test "$GCC" = yes; then *) ;;
esac
if test x"$O0_CFLAGS" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
new_CFLAGS= else
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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
fi fi
;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } ;;
esac
MY_CFLAGS="$CFLAGS"
......
...@@ -453,54 +453,34 @@ AC_SUBST(addtests) ...@@ -453,54 +453,34 @@ AC_SUBST(addtests)
# #
# Check for AViiON Machines running DGUX # Check for AViiON Machines running DGUX
# #
AC_MSG_CHECKING(if host is AViiON running DGUX)
ac_is_dgux=no ac_is_dgux=no
AC_CHECK_HEADER(sys/dg_sys_info.h, AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_is_dgux=yes])
[ac_is_dgux=yes;])
AC_MSG_CHECKING(if host is AViiON running DGUX)
AC_MSG_RESULT($ac_is_dgux) AC_MSG_RESULT($ac_is_dgux)
## :GOTCHA: we do not check anything but sys/dg_sys_info.h ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
if test $ac_is_dgux = yes; then if test $ac_is_dgux = yes; then
if test "$enable_full_debug" = "yes"; then if test "$enable_full_debug" = "yes"; then
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2" GC_CFLAGS="$GC_CFLAGS -mstandard"
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"
fi fi
AC_SUBST(CFLAGS) GC_CFLAGS="$GC_CFLAGS -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend"
AC_SUBST(CXXFLAGS)
fi fi
dnl As of 4.13a2, the collector will not properly work on Solaris when 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 built with gcc and -O. So we remove -O in the appropriate case.
dnl Not needed anymore on Solaris. 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 case "$host" in
*aix*) *aix*) test "$GCC" = yes && O0_CFLAGS=-O0 ;;
if test "$GCC" = yes; then *) ;;
esac
if test x"$O0_CFLAGS" != x; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
new_CFLAGS= else
for i in $CFLAGS; do
case "$i" in
-O*)
;;
*)
new_CFLAGS="$new_CFLAGS $i"
;;
esac
done
CFLAGS="$new_CFLAGS"
else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
;; AC_SUBST([O0_CFLAGS])
*) AC_MSG_RESULT(no) ;;
esac
dnl We need to override the top-level CFLAGS. This is how we do it.
MY_CFLAGS="$CFLAGS"
AC_SUBST(MY_CFLAGS)
dnl Include defines that have become de facto standard. dnl Include defines that have become de facto standard.
dnl ALL_INTERIOR_POINTERS can be overridden in startup code. dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
......
...@@ -110,9 +110,9 @@ LTLIBOBJS = @LTLIBOBJS@ ...@@ -110,9 +110,9 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
MY_CFLAGS = @MY_CFLAGS@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
O0_CFLAGS = @O0_CFLAGS@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@ OTOOL = @OTOOL@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment