Commit ad6717df by Paolo Bonzini Committed by Paolo Bonzini

Makefile.tpl (touch-stage[+id+]): New.

2004-06-09  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.tpl (touch-stage[+id+]): New.
	(restage[+prev+]): Depend on touch-stage[+id+].

	* Makefile.tpl (RECURSE_FLAGS_TO_PASS): New.
	Use it throughout.

	* Makefile.def: Add profile and feedback bootstrap stages.
	Remove next field from bootstrap stages.
	* Makefile.tpl (LN, LN_S): Substitute.
	(stageN-start, stageN-end): Use double-colon rules, to
	provide a hook for additional setup commands.
	(distclean-stageN-gcc, restageN): Create dependencies from
	[+prev+], not from [+next+].
	(stageN-bubble): Add commands for successive stages from
	[+prev+], using double-colon rules.
	(all-stageN-gcc): Fix typo.
	(stagefeedback-start, profiledbootstrap): New.
	* Makefile.in: Regenerate.
	* configure.in: Call ACX_PROG_LN.
	* configure: Regenerate.

config/ChangeLog:
2004-06-09  Paolo Bonzini  <bonzini@gnu.org>

	* acx.m4 (ACX_PROG_LN): From gcc, modified to
	accept a parameter.

gcc/ChangeLog:
2004-06-09  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4 (gcc_AC_PROG_LN): Remove.
	(gcc_AC_CHECK_DECLS): Use AH_TEMPLATE to generate
	config.in entries.
	* configure.ac: Call ACX_PROG_LN, falling back to $LN_S
	if hard links are not available.
	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r82816
parent 92efec6e
2004-06-09 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (touch-stage[+id+]): New.
(restage[+prev+]): Depend on touch-stage[+id+].
* Makefile.tpl (RECURSE_FLAGS_TO_PASS): New.
Use it throughout.
* Makefile.def: Add profile and feedback bootstrap stages.
Remove next field from bootstrap stages.
* Makefile.tpl (LN, LN_S): Substitute.
(stageN-start, stageN-end): Use double-colon rules, to
provide a hook for additional setup commands.
(distclean-stageN-gcc, restageN): Create dependencies from
[+prev+], not from [+next+].
(stageN-bubble): Add commands for successive stages from
[+prev+], using double-colon rules.
(all-stageN-gcc): Fix typo.
(stagefeedback-start, profiledbootstrap): New.
* Makefile.in: Regenerate.
* configure.in: Call ACX_PROG_LN.
* configure: Regenerate.
2004-06-08 Canqun Yang <canqun@nudt.edu.cn> 2004-06-08 Canqun Yang <canqun@nudt.edu.cn>
* MAINTAINERS (Write After Approval): Add myself. * MAINTAINERS (Write After Approval): Add myself.
......
...@@ -216,25 +216,33 @@ flags_to_pass = { flag= WINDRES_FOR_TARGET ; }; ...@@ -216,25 +216,33 @@ flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
// Toplevel bootstrap // Toplevel bootstrap
bootstrap_stage = { bootstrap_stage = {
id=1 ; next=2 ; id=1 ;
extra_configure_flags='--disable-intermodule \ extra_configure_flags='--disable-intermodule \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ; --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
extra_make_flags='CFLAGS="$(STAGE1_CFLAGS)"' ; }; extra_make_flags='CFLAGS="$(STAGE1_CFLAGS)"' ; };
bootstrap_stage = { bootstrap_stage = {
id=2 ; prev=1 ; next=3 ; id=2 ; prev=1 ;
bootstrap_target=bootstrap2 ; bootstrap_target=bootstrap2 ;
extra_configure_flags="@stage2_werror_flag@" ; extra_configure_flags="@stage2_werror_flag@" ;
extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; }; extra_make_flags="" ; };
bootstrap_stage = { bootstrap_stage = {
id=3 ; prev=2 ; next=4 ; id=3 ; prev=2 ;
compare_target=compare ; compare_target=compare ;
bootstrap_target=bootstrap ; bootstrap_target=bootstrap ;
cleanstrap_target=cleanstrap ; cleanstrap_target=cleanstrap ;
extra_configure_flags="@stage2_werror_flag@" ; extra_configure_flags="@stage2_werror_flag@" ;
extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; }; extra_make_flags="" ; };
bootstrap_stage = { bootstrap_stage = {
id=4 ; prev=3 ; id=4 ; prev=3 ;
compare_target=compare3 ; compare_target=compare3 ;
bootstrap_target=bootstrap4 ; bootstrap_target=bootstrap4 ;
extra_configure_flags="@stage2_werror_flag@" ; extra_configure_flags="@stage2_werror_flag@" ;
extra_make_flags="$(POSTSTAGE1_FLAGS_TO_PASS)" ; }; extra_make_flags="" ; };
bootstrap_stage = {
id=profile ; prev=1 ;
extra_configure_flags="@stage2_werror_flag@" ;
extra_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"' ; };
bootstrap_stage = {
id=feedback ; prev=1 ;
extra_configure_flags="@stage2_werror_flag@" ;
extra_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-use"' ; };
...@@ -68,6 +68,8 @@ INSTALL = @INSTALL@ ...@@ -68,6 +68,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
LN = @LN@
LN_S = @LN_S@
# ------------------------------------------------- # -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables # Miscellaneous non-standard autoconf-set variables
...@@ -494,6 +496,8 @@ RECURSE_FLAGS = \ ...@@ -494,6 +496,8 @@ RECURSE_FLAGS = \
CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS)
# Flags to pass down to most sub-makes, in which we're building with # Flags to pass down to most sub-makes, in which we're building with
# the host environment. # the host environment.
EXTRA_HOST_FLAGS = \ EXTRA_HOST_FLAGS = \
...@@ -1258,7 +1262,7 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc ...@@ -1258,7 +1262,7 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \ $(SET_LIB_PATH) \
echo "Building runtime libraries"; \ echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
profiledbootstrap: all-bootstrap configure-gcc profiledbootstrap: all-bootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \ @r=`${PWD_COMMAND}`; export r; \
...@@ -1271,7 +1275,7 @@ profiledbootstrap: all-bootstrap configure-gcc ...@@ -1271,7 +1275,7 @@ profiledbootstrap: all-bootstrap configure-gcc
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \ $(SET_LIB_PATH) \
echo "Building runtime libraries and training compiler"; \ echo "Building runtime libraries and training compiler"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
@r=`${PWD_COMMAND}`; export r; \ @r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \ $(SET_LIB_PATH) \
...@@ -1291,8 +1295,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld ...@@ -1291,8 +1295,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \ $(SET_LIB_PATH) \
echo "Building runtime libraries"; \ echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
LANGUAGES="c c++" all
@endif gcc-no-bootstrap @endif gcc-no-bootstrap
.PHONY: check-gcc maybe-check-gcc .PHONY: check-gcc maybe-check-gcc
...@@ -1440,12 +1443,14 @@ objext = .o ...@@ -1440,12 +1443,14 @@ objext = .o
# Real targets act phony if they depend on phony targets; this hack # Real targets act phony if they depend on phony targets; this hack
# prevents gratuitous rebuilding of stage 1. # prevents gratuitous rebuilding of stage 1.
prebootstrap: prebootstrap:
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-bootstrap $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-bootstrap
$(STAMP) prebootstrap $(STAMP) prebootstrap
# Flags to pass to stage2 and later makes. # Flags to pass to stage2 and later makes.
BOOT_CFLAGS= -g -O2 BOOT_CFLAGS= -g -O2
POSTSTAGE1_FLAGS_TO_PASS = \ POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
STAGE_PREFIX=$$r/stage[+prev+]-gcc/ \
CFLAGS="$(BOOT_CFLAGS)" \ CFLAGS="$(BOOT_CFLAGS)" \
ADAC="\$$(CC)" ADAC="\$$(CC)"
...@@ -1461,14 +1466,14 @@ POSTSTAGE1_FLAGS_TO_PASS = \ ...@@ -1461,14 +1466,14 @@ POSTSTAGE1_FLAGS_TO_PASS = \
[+ FOR bootstrap-stage +] [+ FOR bootstrap-stage +]
.PHONY: stage[+id+]-start stage[+id+]-end .PHONY: stage[+id+]-start stage[+id+]-end
stage[+id+]-start: stage[+id+]-start::
[ -f stage_last ] && $(MAKE) `cat stage_last`-end || : [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
echo stage[+id+] > stage_last ; \ echo stage[+id+] > stage_last ; \
[ -d stage[+id+]-gcc ] || mkdir stage[+id+]-gcc; \ [ -d stage[+id+]-gcc ] || mkdir stage[+id+]-gcc; \
set stage[+id+]-gcc gcc ; @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \ set stage[+id+]-gcc gcc ; @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
set stage[+prev+]-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ [+ ENDIF prev +] set stage[+prev+]-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
stage[+id+]-end: stage[+id+]-end::
rm -f stage_last ; \ rm -f stage_last ; \
set gcc stage[+id+]-gcc ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \ set gcc stage[+id+]-gcc ; @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
set prev-gcc stage[+prev+]-gcc ; @UNDO_LINK_TO_DIR@ [+ ENDIF prev +] set prev-gcc stage[+prev+]-gcc ; @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
...@@ -1477,18 +1482,19 @@ stage[+id+]-end: ...@@ -1477,18 +1482,19 @@ stage[+id+]-end:
# are remade, but not reconfigured. The next stage (if any) will not # are remade, but not reconfigured. The next stage (if any) will not
# be reconfigured as well. # be reconfigured as well.
.PHONY: stage[+id+]-bubble .PHONY: stage[+id+]-bubble
stage[+id+]-bubble: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +] stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
@if [ -f all-stage[+id+]-gcc ] ; then \ @if [ -f all-stage[+id+]-gcc ] ; then \
echo Remaking stage [+id+] ; \ echo Remaking stage [+id+] ; \
rm -f all-stage[+id+]-gcc ; \ rm -f all-stage[+id+]-gcc ; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ fi ; \
all-stage[+id+]-gcc [+ IF next +] && \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]-gcc
if [ -f configure-stage[+next+]-gcc ] ; then \
$(STAMP) configure-stage[+next+]-gcc ; \ [+ IF prev +]
fi [+ ENDIF next +]; \ stage[+prev+]-bubble::
else \ @if [ -f configure-stage[+id+]-gcc ] ; then \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all-stage[+id+]-gcc ; \ $(STAMP) configure-stage[+id+]-gcc ; \
fi fi
[+ ENDIF prev +]
configure-stage[+id+]-gcc: [+ IF prev +] all-stage[+prev+]-gcc [+ configure-stage[+id+]-gcc: [+ IF prev +] all-stage[+prev+]-gcc [+
ELSE +] prebootstrap [+ ENDIF prev +] ELSE +] prebootstrap [+ ENDIF prev +]
...@@ -1529,8 +1535,7 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc ...@@ -1529,8 +1535,7 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc
$(GCC_HOST_EXPORTS) [+ ENDIF prev +] \ $(GCC_HOST_EXPORTS) [+ ENDIF prev +] \
cd gcc && \ cd gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) [+ IF prev +] \ $(MAKE) $(GCC_FLAGS_TO_PASS) [+ IF prev +] \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ $(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
STAGE_PREFIX=$$r/stage[+prev+]-gcc/ [+ ENDIF prev +] \
[+extra_make_flags+] && $(STAMP) ../all-stage[+id+]-gcc [+extra_make_flags+] && $(STAMP) ../all-stage[+id+]-gcc
[+ IF compare-target +] [+ IF compare-target +]
...@@ -1560,23 +1565,38 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc ...@@ -1560,23 +1565,38 @@ all-stage[+id+]-gcc: configure-stage[+id+]-gcc
[+ IF bootstrap-target +] [+ IF bootstrap-target +]
.PHONY: [+bootstrap-target+] .PHONY: [+bootstrap-target+]
[+bootstrap-target+]: [+bootstrap-target+]:
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) stage[+id+]-bubble [+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble [+
IF compare-target +] [+compare-target+] [+ IF compare-target +] [+compare-target+] [+
ENDIF compare-target +] \ ENDIF compare-target +] \
stage[+id+]-start all stage[+id+]-end stage[+id+]-start all stage[+id+]-end
[+ ENDIF bootstrap-target +] [+ ENDIF bootstrap-target +]
.PHONY: restage[+id+] distclean-stage[+id+] .PHONY: restage[+id+] touch-stage[+id+] distclean-stage[+id+]
distclean-stage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +] # Rules to wipe a stage and all the following ones, used for cleanstrap
[+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
distclean-stage[+id+]::
[ -f stage_last ] && $(MAKE) `cat stage_last`-end || : [ -f stage_last ] && $(MAKE) `cat stage_last`-end || :
rm -rf configure-stage[+id+]-gcc all-stage[+id+]-gcc stage[+id+]-gcc [+ rm -rf configure-stage[+id+]-gcc all-stage[+id+]-gcc stage[+id+]-gcc [+
IF compare-target +][+compare-target+] [+ ENDIF compare-target +] IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +] # Rules to renew the timestamp on a stage and all the following ones
[+ IF prev +]touch-stage[+prev+]:: touch-stage[+id+] [+ ENDIF prev +]
touch-stage[+id+]::
@[ -f configure-stage[+id+]-gcc ] && \
echo '$(STAMP) configure-stage[+id+]-gcc' && \
$(STAMP) configure-stage[+id+]-gcc; \
[ -f all-stage[+id+]-gcc ] && \
echo '$(STAMP) all-stage[+id+]-gcc' && \
$(STAMP) all-stage[+id+]-gcc; \
:
# After building a stage, touch the following ones
[+ IF prev +]restage[+prev+]:: touch-stage[+id+] [+ ENDIF prev +]
restage[+id+]::
rm -rf all-stage[+id+]-gcc [+ rm -rf all-stage[+id+]-gcc [+
IF compare-target +][+compare-target+] [+ ENDIF compare-target +] IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) [+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+
IF compare-target +][+compare-target+] [+ IF compare-target +][+compare-target+] [+
ELSE +] all-stage[+id+]-gcc [+ ENDIF compare-target +] ELSE +] all-stage[+id+]-gcc [+ ENDIF compare-target +]
...@@ -1586,6 +1606,33 @@ restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +] ...@@ -1586,6 +1606,33 @@ restage[+id+]: [+ IF next +] distclean-stage[+next+] [+ ENDIF next +]
[+ ENDIF cleanstrap-target +] [+ ENDIF cleanstrap-target +]
[+ ENDFOR bootstrap-stage +] [+ ENDFOR bootstrap-stage +]
stagefeedback-start::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
cd stageprofile-gcc && \
{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
{ find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
profiledbootstrap: all-bootstrap configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
$(GCC_HOST_EXPORTS) \
echo "Bootstrapping the compiler"; \
$(MAKE) stageprofile-bubble distclean-stagefeedback stageprofile-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries and training compiler"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
$(GCC_HOST_EXPORTS) \
echo "Building feedback based compiler"; \
$(MAKE) stagefeedback-bubble stagefeedback-end
@endif gcc-bootstrap @endif gcc-bootstrap
# -------------------------------------- # --------------------------------------
......
2004-06-09 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (ACX_PROG_LN): From gcc, modified to
accept a parameter.
2004-05-23 Paolo Bonzini <bonzini@gnu.org> 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING): * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
......
...@@ -258,3 +258,27 @@ if test $gcc_cv_c__bool = yes; then ...@@ -258,3 +258,27 @@ if test $gcc_cv_c__bool = yes; then
fi fi
]) ])
dnl See if hard links work and if not, try to substitute $1 or simple copy.
AC_DEFUN([ACX_PROG_LN],
[AC_MSG_CHECKING(whether ln works)
AC_CACHE_VAL(acx_cv_prog_LN,
[rm -f conftestdata_t
echo >conftestdata_f
if ln conftestdata_f conftestdata_t 2>/dev/null
then
acx_cv_prog_LN=ln
else
acx_cv_prog_LN=no
fi
rm -f conftestdata_f conftestdata_t
])dnl
if test $acx_cv_prog_LN = no; then
LN="ifelse([$1],,cp,[$1])"
AC_MSG_RESULT([no, using $LN])
else
LN="$acx_cv_prog_LN"
AC_MSG_RESULT(yes)
fi
AC_SUBST(LN)dnl
])
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
############################################################################## ##############################################################################
### WARNING: this file contains embedded tabs. Do not run untabify on this file. ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
sinclude(config/acx.m4)
AC_INIT(move-if-change) AC_INIT(move-if-change)
AC_PREREQ(2.13) AC_PREREQ(2.13)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
...@@ -25,10 +27,9 @@ AC_ARG_PROGRAM ...@@ -25,10 +27,9 @@ AC_ARG_PROGRAM
# Get 'install' or 'install-sh' and its variants. # Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL AC_PROG_INSTALL
ACX_PROG_LN
AC_PROG_LN_S AC_PROG_LN_S
sinclude(config/acx.m4)
### we might need to use some other shell than /bin/sh for running subshells ### we might need to use some other shell than /bin/sh for running subshells
### If we are on Windows, search for the shell. This will permit people ### If we are on Windows, search for the shell. This will permit people
### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
......
2004-06-09 Paolo Bonzini <bonzini@gnu.org>
* aclocal.m4 (gcc_AC_PROG_LN): Remove.
(gcc_AC_CHECK_DECLS): Use AH_TEMPLATE to generate
config.in entries.
* configure.ac: Call ACX_PROG_LN, falling back to $LN_S
if hard links are not available.
* configure: Regenerate.
* config.in: Regenerate.
2004-06-08 Per Bothner <per@bothner.com> 2004-06-08 Per Bothner <per@bothner.com>
* configure.ac: New --enable-mapped-location sets USE_MAPPED_LOCATION. * configure.ac: New --enable-mapped-location sets USE_MAPPED_LOCATION.
......
...@@ -28,11 +28,13 @@ dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate. ...@@ -28,11 +28,13 @@ dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
dnl gcc_AC_CHECK_DECLS(SYMBOLS, dnl gcc_AC_CHECK_DECLS(SYMBOLS,
dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]]) dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
AC_DEFUN([gcc_AC_CHECK_DECLS], AC_DEFUN([gcc_AC_CHECK_DECLS],
[for ac_func in $1 [AC_FOREACH([gcc_AC_Func], [$1],
[AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_[]gcc_AC_Func),
[Define to 1 if we found a declaration for ']gcc_AC_Func[', otherwise
define to 0.])])dnl
for ac_func in $1
do do
changequote(, )dnl ac_tr_decl=AS_TR_CPP([HAVE_DECL_$ac_func])
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
gcc_AC_CHECK_DECL($ac_func, gcc_AC_CHECK_DECL($ac_func,
[AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2], [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
[AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3], [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
...@@ -48,12 +50,6 @@ dnl during this test. ...@@ -48,12 +50,6 @@ dnl during this test.
$4 $4
) )
done done
dnl Automatically generate config.h entries via autoheader.
if test x = y ; then
patsubst(translit([$1], [a-z], [A-Z]), [\w+],
[AC_DEFINE([HAVE_DECL_\&], 1,
[Define to 1 if we found this declaration otherwise define to 0.])])dnl
fi
]) ])
dnl 'make compare' can be significantly faster, if cmp itself can dnl 'make compare' can be significantly faster, if cmp itself can
...@@ -142,38 +138,6 @@ fi ...@@ -142,38 +138,6 @@ fi
AC_SUBST(LN_S)dnl AC_SUBST(LN_S)dnl
]) ])
dnl See if hard links work and if not, try to substitute either symbolic links or simple copy.
AC_DEFUN([gcc_AC_PROG_LN],
[AC_MSG_CHECKING(whether ln works)
AC_CACHE_VAL(gcc_cv_prog_LN,
[rm -f conftestdata_t
echo >conftestdata_f
if ln conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN="ln"
else
if ln -s conftestdata_f conftestdata_t 2>/dev/null
then
gcc_cv_prog_LN="ln -s"
else
gcc_cv_prog_LN=cp
fi
fi
rm -f conftestdata_f conftestdata_t
])dnl
LN="$gcc_cv_prog_LN"
if test "$gcc_cv_prog_LN" = "ln"; then
AC_MSG_RESULT(yes)
else
if test "$gcc_cv_prog_LN" = "ln -s"; then
AC_MSG_RESULT([no, using ln -s])
else
AC_MSG_RESULT([no, and neither does ln -s, so using cp])
fi
fi
AC_SUBST(LN)dnl
])
dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
dnl of the usual 2. dnl of the usual 2.
AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG], AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
......
...@@ -145,88 +145,112 @@ ...@@ -145,88 +145,112 @@
/* Define if <time.h> defines clock_t. */ /* Define if <time.h> defines clock_t. */
#undef HAVE_CLOCK_T #undef HAVE_CLOCK_T
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'abort', otherwise define to 0.
*/
#undef HAVE_DECL_ABORT #undef HAVE_DECL_ABORT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */
#undef HAVE_DECL_ATOF #undef HAVE_DECL_ATOF
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'atol', otherwise define to 0. */
#undef HAVE_DECL_ATOL #undef HAVE_DECL_ATOL
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'basename', otherwise define to
0. */
#undef HAVE_DECL_BASENAME #undef HAVE_DECL_BASENAME
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'calloc', otherwise define to 0.
*/
#undef HAVE_DECL_CALLOC #undef HAVE_DECL_CALLOC
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'clock', otherwise define to 0.
*/
#undef HAVE_DECL_CLOCK #undef HAVE_DECL_CLOCK
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'errno', otherwise define to 0.
*/
#undef HAVE_DECL_ERRNO #undef HAVE_DECL_ERRNO
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'fprintf_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FPRINTF_UNLOCKED #undef HAVE_DECL_FPRINTF_UNLOCKED
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'fputs_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FPUTS_UNLOCKED #undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'free', otherwise define to 0. */
#undef HAVE_DECL_FREE #undef HAVE_DECL_FREE
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'fwrite_unlocked', otherwise
define to 0. */
#undef HAVE_DECL_FWRITE_UNLOCKED #undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0.
*/
#undef HAVE_DECL_GETCWD #undef HAVE_DECL_GETCWD
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getenv', otherwise define to 0.
*/
#undef HAVE_DECL_GETENV #undef HAVE_DECL_GETENV
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getopt', otherwise define to 0.
*/
#undef HAVE_DECL_GETOPT #undef HAVE_DECL_GETOPT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getrlimit', otherwise define to
0. */
#undef HAVE_DECL_GETRLIMIT #undef HAVE_DECL_GETRLIMIT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getrusage', otherwise define to
0. */
#undef HAVE_DECL_GETRUSAGE #undef HAVE_DECL_GETRUSAGE
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'getwd', otherwise define to 0.
*/
#undef HAVE_DECL_GETWD #undef HAVE_DECL_GETWD
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'ldgetname', otherwise define to
0. */
#undef HAVE_DECL_LDGETNAME #undef HAVE_DECL_LDGETNAME
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'malloc', otherwise define to 0.
*/
#undef HAVE_DECL_MALLOC #undef HAVE_DECL_MALLOC
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'putc_unlocked', otherwise define
to 0. */
#undef HAVE_DECL_PUTC_UNLOCKED #undef HAVE_DECL_PUTC_UNLOCKED
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'realloc', otherwise define to 0.
*/
#undef HAVE_DECL_REALLOC #undef HAVE_DECL_REALLOC
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'sbrk', otherwise define to 0. */
#undef HAVE_DECL_SBRK #undef HAVE_DECL_SBRK
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'setrlimit', otherwise define to
0. */
#undef HAVE_DECL_SETRLIMIT #undef HAVE_DECL_SETRLIMIT
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'snprintf', otherwise define to
0. */
#undef HAVE_DECL_SNPRINTF #undef HAVE_DECL_SNPRINTF
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'strsignal', otherwise define to
0. */
#undef HAVE_DECL_STRSIGNAL #undef HAVE_DECL_STRSIGNAL
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'strstr', otherwise define to 0.
*/
#undef HAVE_DECL_STRSTR #undef HAVE_DECL_STRSTR
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'times', otherwise define to 0.
*/
#undef HAVE_DECL_TIMES #undef HAVE_DECL_TIMES
/* Define to 1 if we found this declaration otherwise define to 0. */ /* Define to 1 if we found a declaration for 'vasprintf', otherwise define to
0. */
#undef HAVE_DECL_VASPRINTF #undef HAVE_DECL_VASPRINTF
/* Define to 1 if you have the <direct.h> header file. */ /* Define to 1 if you have the <direct.h> header file. */
......
...@@ -726,8 +726,8 @@ case ${AWK} in ...@@ -726,8 +726,8 @@ case ${AWK} in
"") AC_MSG_ERROR([can't build without awk, bailing out]) ;; "") AC_MSG_ERROR([can't build without awk, bailing out]) ;;
esac esac
gcc_AC_PROG_LN
gcc_AC_PROG_LN_S gcc_AC_PROG_LN_S
ACX_PROG_LN($LN_S)
AC_PROG_RANLIB AC_PROG_RANLIB
gcc_AC_PROG_INSTALL gcc_AC_PROG_INSTALL
......
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