2005-08-08 Paolo Bonzini <bonzini@gnu.org>
* configure.in (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET, GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Find them with NCN_STRICT_CHECK_TARGET_TOOL, like the other target tools; remove code to manually set them. (Target tools): Look in the environment for them. * Makefile.tpl (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET, GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Redefine. (AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): Look into gcc build directory. (CONFIGURED_CC_FOR_TARGET, CONFIGURED_CXX_FOR_TARGET, CONFIGURED_GCJ_FOR_TARGET, CONFIGURED_GCC_FOR_TARGET, CONFIGURED_GFORTRAN_FOR_TARGET, USUAL_CC_FOR_TARGET, USUAL_CXX_FOR_TARGET, USUAL_GCJ_FOR_TARGET, USUAL_GCC_FOR_TARGET, USUAL_RAW_CXX_FOR_TARGET, USUAL_GFORTRAN_FOR_TARGET): New. (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): Delete. * configure: Regenerate. * Makefile.in: Regenerate.
This commit is contained in:
parent
6a7bea70f0
commit
5fb28bccde
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
||||
2005-08-08 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* configure.in (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET,
|
||||
GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Find
|
||||
them with NCN_STRICT_CHECK_TARGET_TOOL, like the other target
|
||||
tools; remove code to manually set them.
|
||||
(Target tools): Look in the environment for them.
|
||||
* Makefile.tpl (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET,
|
||||
GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Redefine.
|
||||
(AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): Look into gcc
|
||||
build directory.
|
||||
(CONFIGURED_CC_FOR_TARGET, CONFIGURED_CXX_FOR_TARGET,
|
||||
CONFIGURED_GCJ_FOR_TARGET, CONFIGURED_GCC_FOR_TARGET,
|
||||
CONFIGURED_GFORTRAN_FOR_TARGET, USUAL_CC_FOR_TARGET,
|
||||
USUAL_CXX_FOR_TARGET, USUAL_GCJ_FOR_TARGET, USUAL_GCC_FOR_TARGET,
|
||||
USUAL_RAW_CXX_FOR_TARGET, USUAL_GFORTRAN_FOR_TARGET): New.
|
||||
(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE,
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): Delete.
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2005-07-27 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* Makefile.tpl (EXTRA_TARGET_FLAGS): Set LDFLAGS=LDFLAGS_FOR_TARGET.
|
||||
|
105
Makefile.in
105
Makefile.in
@ -351,8 +351,8 @@ CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
|
||||
USUAL_AS_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=as ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/as ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(AS); \
|
||||
@ -361,29 +361,93 @@ USUAL_AS_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
CC_FOR_TARGET = @CC_FOR_TARGET@
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@
|
||||
USUAL_CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CC); \
|
||||
else \
|
||||
echo $(CONFIGURED_CC_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
# During gcc bootstrap, if we use some random cc for stage1 then
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
# overridden on the command line.
|
||||
GCC_FOR_TARGET=@GCC_FOR_TARGET@
|
||||
CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@
|
||||
USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
|
||||
$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
|
||||
CXX_FOR_TARGET = @CXX_FOR_TARGET@
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@
|
||||
USUAL_CXX_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \
|
||||
(echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \
|
||||
test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \
|
||||
echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CXX); \
|
||||
else \
|
||||
echo $(CONFIGURED_CXX_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
USUAL_RAW_CXX_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CXX); \
|
||||
else \
|
||||
echo $(CONFIGURED_CXX_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@
|
||||
USUAL_GCJ_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(GCJ); \
|
||||
else \
|
||||
echo $(CONFIGURED_GCJ_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@
|
||||
USUAL_GFORTRAN_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(GFORTRAN); \
|
||||
else \
|
||||
echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
|
||||
USUAL_DLLTOOL_FOR_TARGET = ` \
|
||||
@ -397,16 +461,13 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
|
||||
GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
|
||||
|
||||
LD_FOR_TARGET=@LD_FOR_TARGET@
|
||||
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
|
||||
USUAL_LD_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=ld ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(LD); \
|
||||
@ -422,8 +483,8 @@ CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
|
||||
USUAL_NM_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=nm ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/nm ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(NM); \
|
||||
@ -584,16 +645,8 @@ BASE_FLAGS_TO_PASS = \
|
||||
"CONFIG_SHELL=$(SHELL)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
|
||||
|
||||
# For any flags above that may contain shell code that varies from one
|
||||
# target library to another. When doing recursive invocations of the
|
||||
# top-level Makefile, we don't want the outer make to evaluate them,
|
||||
# so we pass these variables down unchanged. They must not contain
|
||||
# single nor double quotes.
|
||||
RECURSE_FLAGS = \
|
||||
CXX_FOR_TARGET='$(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)
|
||||
# We leave this in just in case, but it is not needed anymore.
|
||||
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
|
||||
|
||||
# Flags to pass down to most sub-makes, in which we're building with
|
||||
# the host environment.
|
||||
@ -1993,7 +2046,7 @@ mail-report-with-warnings.log: warning.log
|
||||
# Installation targets.
|
||||
|
||||
.PHONY: install uninstall
|
||||
install: unstage installdirs install-host install-target stage
|
||||
install: installdirs install-host install-target
|
||||
|
||||
.PHONY: install-host-nogcc
|
||||
install-host-nogcc: \
|
||||
|
105
Makefile.tpl
105
Makefile.tpl
@ -354,8 +354,8 @@ CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
|
||||
USUAL_AS_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=as ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/as ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(AS); \
|
||||
@ -364,29 +364,93 @@ USUAL_AS_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
CC_FOR_TARGET = @CC_FOR_TARGET@
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@
|
||||
USUAL_CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CC); \
|
||||
else \
|
||||
echo $(CONFIGURED_CC_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
# During gcc bootstrap, if we use some random cc for stage1 then
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
# overridden on the command line.
|
||||
GCC_FOR_TARGET=@GCC_FOR_TARGET@
|
||||
CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@
|
||||
USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
|
||||
$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
|
||||
CXX_FOR_TARGET = @CXX_FOR_TARGET@
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@
|
||||
USUAL_CXX_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \
|
||||
(echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \
|
||||
test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \
|
||||
echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CXX); \
|
||||
else \
|
||||
echo $(CONFIGURED_CXX_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
USUAL_RAW_CXX_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(CXX); \
|
||||
else \
|
||||
echo $(CONFIGURED_CXX_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@
|
||||
USUAL_GCJ_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(GCJ); \
|
||||
else \
|
||||
echo $(CONFIGURED_GCJ_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
|
||||
CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@
|
||||
USUAL_GFORTRAN_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(GFORTRAN); \
|
||||
else \
|
||||
echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
|
||||
USUAL_DLLTOOL_FOR_TARGET = ` \
|
||||
@ -400,16 +464,13 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
|
||||
GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
|
||||
|
||||
LD_FOR_TARGET=@LD_FOR_TARGET@
|
||||
CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
|
||||
USUAL_LD_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=ld ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(LD); \
|
||||
@ -425,8 +486,8 @@ CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
|
||||
USUAL_NM_FOR_TARGET = ` \
|
||||
if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
|
||||
echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
|
||||
$(CC_FOR_TARGET) -print-prog-name=nm ; \
|
||||
elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \
|
||||
echo $$r/$(HOST_SUBDIR)/gcc/nm ; \
|
||||
else \
|
||||
if [ '$(host)' = '$(target)' ] ; then \
|
||||
echo $(NM); \
|
||||
@ -519,16 +580,8 @@ BASE_FLAGS_TO_PASS = [+ FOR flags_to_pass +]\
|
||||
"CONFIG_SHELL=$(SHELL)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
|
||||
|
||||
# For any flags above that may contain shell code that varies from one
|
||||
# target library to another. When doing recursive invocations of the
|
||||
# top-level Makefile, we don't want the outer make to evaluate them,
|
||||
# so we pass these variables down unchanged. They must not contain
|
||||
# single nor double quotes.
|
||||
RECURSE_FLAGS = \
|
||||
CXX_FOR_TARGET='$(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)
|
||||
# We leave this in just in case, but it is not needed anymore.
|
||||
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
|
||||
|
||||
# Flags to pass down to most sub-makes, in which we're building with
|
||||
# the host environment.
|
||||
@ -749,7 +802,7 @@ mail-report-with-warnings.log: warning.log
|
||||
# Installation targets.
|
||||
|
||||
.PHONY: install uninstall
|
||||
install: unstage installdirs install-host install-target stage
|
||||
install: installdirs install-host install-target
|
||||
|
||||
.PHONY: install-host-nogcc
|
||||
install-host-nogcc: [+
|
||||
|
164
configure.in
164
configure.in
@ -1000,10 +1000,6 @@ if test "${build}" != "${host}" ; then
|
||||
CXX=${CXX-${host_alias}-c++}
|
||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
||||
CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
|
||||
CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
|
||||
GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
|
||||
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
|
||||
BUILD_PREFIX=${build_alias}-
|
||||
BUILD_PREFIX_1=${build_alias}-
|
||||
|
||||
@ -1017,7 +1013,6 @@ else
|
||||
# This is all going to change when we autoconfiscate...
|
||||
|
||||
CC_FOR_BUILD="\$(CC)"
|
||||
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
|
||||
BUILD_PREFIX=
|
||||
BUILD_PREFIX_1=loser-
|
||||
|
||||
@ -2048,89 +2043,6 @@ if test "x${use_gnu_ld}" = x &&
|
||||
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
|
||||
fi
|
||||
|
||||
if test "x${CC_FOR_TARGET+set}" = xset; then
|
||||
:
|
||||
elif test -d ${srcdir}/gcc; then
|
||||
CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
|
||||
elif test "$host" = "$target"; then
|
||||
CC_FOR_TARGET='$(CC)'
|
||||
else
|
||||
CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
|
||||
fi
|
||||
CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||
|
||||
if test "x${GCJ_FOR_TARGET+set}" = xset; then
|
||||
:
|
||||
elif test -d ${srcdir}/gcc; then
|
||||
GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
|
||||
elif test "$host" = "$target"; then
|
||||
GCJ_FOR_TARGET='gcj'
|
||||
else
|
||||
GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
|
||||
fi
|
||||
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||
|
||||
if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
|
||||
:
|
||||
elif test -d ${srcdir}/gcc; then
|
||||
GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
|
||||
elif test "$host" = "$target"; then
|
||||
GFORTRAN_FOR_TARGET='gfortran'
|
||||
else
|
||||
GFORTRAN_FOR_TARGET=`echo gfortran | sed "${program_transform_name}"`
|
||||
fi
|
||||
case $GFORTRAN_FOR_TARGET in
|
||||
*' $(FLAGS_FOR_TARGET)') ;;
|
||||
*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
|
||||
esac
|
||||
|
||||
# Don't use libstdc++-v3's flags to configure/build itself.
|
||||
libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||
raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
|
||||
|
||||
if test "x${CXX_FOR_TARGET+set}" = xset; then
|
||||
if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
|
||||
RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
|
||||
fi
|
||||
elif test -d ${srcdir}/gcc; then
|
||||
# We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
|
||||
# of g++ for linking C++ or Java, because g++ has -shared-libgcc by
|
||||
# default whereas gcc does not.
|
||||
# RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
|
||||
# all other cases.
|
||||
CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ '$libstdcxx_flags
|
||||
RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ '$raw_libstdcxx_flags
|
||||
elif test "$host" = "$target"; then
|
||||
CXX_FOR_TARGET='$(CXX)'
|
||||
RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
|
||||
else
|
||||
CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
|
||||
RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
|
||||
fi
|
||||
CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||
RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
|
||||
|
||||
qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
|
||||
qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
|
||||
|
||||
# We want to defer the evaluation of `cmd`s and shell variables in
|
||||
# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
|
||||
# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
|
||||
# quotes, but we still have to duplicate `$'s so that shell variables
|
||||
# can be expanded by the nested make as shell variables, not as make
|
||||
# macros.
|
||||
qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
|
||||
qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
|
||||
|
||||
# Wrap CC_FOR_TARGET and friends, for certain types of builds.
|
||||
CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
|
||||
GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
|
||||
GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
|
||||
CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
|
||||
RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
|
||||
|
||||
# Makefile fragments.
|
||||
for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
|
||||
do
|
||||
@ -2184,24 +2096,47 @@ AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
|
||||
# Target tools.
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AR_FOR_TARGET, ar)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_AS_FOR_TARGET, as)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_DLLTOOL_FOR_TARGET, dlltool)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_LD_FOR_TARGET, ld)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_NM_FOR_TARGET, nm)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_RANLIB_FOR_TARGET, ranlib, :)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CONFIGURED_WINDRES_FOR_TARGET, windres)
|
||||
# Target tools. Do the tests using the names they may have passed in
|
||||
# the environment, then move it to CONFIGURED_*_FOR_TARGET.
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CC_FOR_TARGET, cc)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(CXX_FOR_TARGET, c++)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(GCJ_FOR_TARGET, gcj)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(GFORTRAN_FOR_TARGET, gfortran)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
|
||||
NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
|
||||
|
||||
AC_SUBST(GCC_FOR_TARGET)
|
||||
CONFIGURED_AR_FOR_TARGET="$AR_FOR_TARGET"
|
||||
CONFIGURED_AS_FOR_TARGET="$AS_FOR_TARGET"
|
||||
CONFIGURED_CC_FOR_TARGET="$CC_FOR_TARGET"
|
||||
CONFIGURED_CXX_FOR_TARGET="$CXX_FOR_TARGET"
|
||||
CONFIGURED_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET"
|
||||
CONFIGURED_GCC_FOR_TARGET="$GCC_FOR_TARGET"
|
||||
CONFIGURED_GCJ_FOR_TARGET="$GCJ_FOR_TARGET"
|
||||
CONFIGURED_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET"
|
||||
CONFIGURED_LD_FOR_TARGET="$LD_FOR_TARGET"
|
||||
CONFIGURED_NM_FOR_TARGET="$NM_FOR_TARGET"
|
||||
CONFIGURED_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET"
|
||||
CONFIGURED_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET"
|
||||
|
||||
AC_SUBST(CONFIGURED_AR_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_AS_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_CC_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_CXX_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_DLLTOOL_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_GCC_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_GCJ_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_GFORTRAN_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_LD_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_NM_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_RANLIB_FOR_TARGET)dnl
|
||||
AC_SUBST(CONFIGURED_WINDRES_FOR_TARGET)dnl
|
||||
AC_SUBST(FLAGS_FOR_TARGET)
|
||||
AC_SUBST(CC_FOR_TARGET)
|
||||
AC_SUBST(GCJ_FOR_TARGET)
|
||||
AC_SUBST(GFORTRAN_FOR_TARGET)
|
||||
AC_SUBST(CXX_FOR_TARGET)
|
||||
AC_SUBST(RAW_CXX_FOR_TARGET)
|
||||
AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
|
||||
AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
|
||||
|
||||
# Fix up target tools.
|
||||
if test "x${build}" = "x${host}" ; then
|
||||
@ -2213,7 +2148,13 @@ if test "x${build}" = "x${host}" ; then
|
||||
# should also eliminate all of this cleanly.
|
||||
AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
|
||||
AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
|
||||
CC_FOR_TARGET="\$(USUAL_CC_FOR_TARGET)"
|
||||
CXX_FOR_TARGET="\$(USUAL_CXX_FOR_TARGET)"
|
||||
RAW_CXX_FOR_TARGET="\$(USUAL_RAW_CXX_FOR_TARGET)"
|
||||
DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
|
||||
GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
|
||||
GCJ_FOR_TARGET="\$(USUAL_GCJ_FOR_TARGET)"
|
||||
GFORTRAN_FOR_TARGET="\$(USUAL_GFORTRAN_FOR_TARGET)"
|
||||
LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
|
||||
NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
|
||||
RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
|
||||
@ -2222,19 +2163,20 @@ else
|
||||
# Just use the ones we found.
|
||||
AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
|
||||
AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
|
||||
CC_FOR_TARGET="\$(CONFIGURED_CC_FOR_TARGET)"
|
||||
CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)"
|
||||
RAW_CXX_FOR_TARGET="\$(CONFIGURED_CXX_FOR_TARGET)"
|
||||
DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
|
||||
GCC_FOR_TARGET="\$(CONFIGURED_GCC_FOR_TARGET)"
|
||||
GCJ_FOR_TARGET="\$(CONFIGURED_GCJ_FOR_TARGET)"
|
||||
GFORTRAN_FOR_TARGET="\$(CONFIGURED_GFORTRAN_FOR_TARGET)"
|
||||
LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
|
||||
NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
|
||||
RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
|
||||
WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"
|
||||
fi
|
||||
AC_SUBST(AR_FOR_TARGET)
|
||||
AC_SUBST(AS_FOR_TARGET)
|
||||
AC_SUBST(DLLTOOL_FOR_TARGET)
|
||||
AC_SUBST(LD_FOR_TARGET)
|
||||
AC_SUBST(NM_FOR_TARGET)
|
||||
AC_SUBST(RANLIB_FOR_TARGET)
|
||||
AC_SUBST(WINDRES_FOR_TARGET)
|
||||
|
||||
AC_SUBST(RAW_CXX_FOR_TARGET)
|
||||
|
||||
# Certain tools may need extra flags.
|
||||
AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
|
||||
|
Loading…
Reference in New Issue
Block a user