mirror of git://gcc.gnu.org/git/gcc.git
re PR bootstrap/31020 (cannot write in </test/gnu/gcc/objdir/prev-gcc/../gcc/./include>)
fixincludes:
* mkheaders.in: Fix headers for each multilib required.
gcc:
PR bootstrap/31020
* configure.ac (CROSS_SYSTEM_HEADER_DIR, build_system_header_dir):
Define using $${sysroot_headers_suffix}.
* configure: Regenerate.
* cppdefault.c (cpp_include_defaults): Make FIXED_INCLUDE_DIR a
multilib-suffixed directory if SYSROOT_HEADERS_SUFFIX_SPEC
defined.
* doc/invoke.texi (-print-sysroot-headers-suffix): Document.
* gcc.c (print_sysroot_headers_suffix): New.
(option_map): Include --print-sysroot-headers-suffix.
(display_help): Mention -print-sysroot-headers-suffix.
(process_command): Handle -print-sysroot-headers-suffix.
(do_spec_1): Append multilib directory to include-fixed path if
sysroot suffixes in use.
(main): Handle -print-sysroot-headers-suffix.
* Makefile.in (start.encap): Don't depend on xlimits.h
(xlimits.h): Remove.
(stmp-int-hdrs): Don't depend on xlimits.h. Inline generation of
limits.h for each multilib in fixinc_list.
(fixinc_list, s-fixinc_list): New.
(stmp-fixinc): Depend on fixinc_list. If not copying headers,
generate them for each multilib in fixinc_list.
(stmp-fixproto): Use include-fixed. Run fixproto for each
multilib in fixinc_list.
(mostlyclean): Don't remove xlimits.h.
(clean): Remove include-fixed.
(real-install-headers-tar, real-install-headers-cpio,
real-install-headers-cp): Don't copy include, only include-fixed.
(install-mkheaders): Depend on fixinc_list. Don't depend on
xlimits.h. Save limits.h files for each multilib in fixinc_list.
Always save mkinstalldirs. Preserve ${sysroot_headers_suffix} in
SYSTEM_HEADER_DIR setting in mkheaders.conf.
From-SVN: r122620
This commit is contained in:
parent
4e669430fe
commit
14da607343
|
|
@ -1,3 +1,7 @@
|
||||||
|
2007-03-06 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* mkheaders.in: Fix headers for each multilib required.
|
||||||
|
|
||||||
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
|
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
|
||||||
|
|
||||||
* Makefile.in: Add dummy install-pdf target.
|
* Makefile.in: Add dummy install-pdf target.
|
||||||
|
|
|
||||||
|
|
@ -78,29 +78,33 @@ libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
|
||||||
itoolsdir=${libexecsubdir}/install-tools
|
itoolsdir=${libexecsubdir}/install-tools
|
||||||
itoolsdatadir=${libsubdir}/install-tools
|
itoolsdatadir=${libsubdir}/install-tools
|
||||||
incdir=${libsubdir}/include-fixed
|
incdir=${libsubdir}/include-fixed
|
||||||
|
mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs"
|
||||||
. ${itoolsdatadir}/mkheaders.conf
|
|
||||||
|
|
||||||
cd ${itoolsdir}
|
cd ${itoolsdir}
|
||||||
rm -rf ${incdir}/*
|
rm -rf ${incdir}/*
|
||||||
|
|
||||||
|
for ml in `cat ${itoolsdatadir}/fixinc_list`; do
|
||||||
|
sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`
|
||||||
|
multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`
|
||||||
|
subincdir=${incdir}${multi_dir}
|
||||||
|
. ${itoolsdatadir}/mkheaders.conf
|
||||||
if [ x${STMP_FIXINC} != x ] ; then
|
if [ x${STMP_FIXINC} != x ] ; then
|
||||||
TARGET_MACHINE="${target}" target_canonical="${target}" \
|
TARGET_MACHINE="${target}" target_canonical="${target}" \
|
||||||
MACRO_LIST="${itoolsdatadir}/macro_list" \
|
MACRO_LIST="${itoolsdatadir}/macro_list" \
|
||||||
@SHELL@ ./fixinc.sh ${incdir} \
|
@SHELL@ ./fixinc.sh ${subincdir} \
|
||||||
${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
|
${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS}
|
||||||
rm -f ${incdir}/syslimits.h
|
rm -f ${subincdir}/syslimits.h
|
||||||
if [ -f ${incdir}/limits.h ]; then
|
if [ -f ${subincdir}/limits.h ]; then
|
||||||
mv ${incdir}/limits.h ${incdir}/syslimits.h
|
mv ${subincdir}/limits.h ${subincdir}/syslimits.h
|
||||||
else
|
else
|
||||||
cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h
|
cp ${itoolsdatadir}/gsyslimits.h ${subincdir}/syslimits.h
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp ${itoolsdatadir}/include/* ${incdir}
|
cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir}
|
||||||
|
|
||||||
if [ x${STMP_FIXPROTO} != x ] ; then
|
if [ x${STMP_FIXPROTO} != x ] ; then
|
||||||
mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs"
|
|
||||||
export FIXPROTO_DEFINES mkinstalldirs
|
export FIXPROTO_DEFINES mkinstalldirs
|
||||||
@SHELL@ fixproto ${incdir} ${incdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
|
@SHELL@ fixproto ${subincdir} ${subincdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,38 @@
|
||||||
|
2007-03-06 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
PR bootstrap/31020
|
||||||
|
* configure.ac (CROSS_SYSTEM_HEADER_DIR, build_system_header_dir):
|
||||||
|
Define using $${sysroot_headers_suffix}.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* cppdefault.c (cpp_include_defaults): Make FIXED_INCLUDE_DIR a
|
||||||
|
multilib-suffixed directory if SYSROOT_HEADERS_SUFFIX_SPEC
|
||||||
|
defined.
|
||||||
|
* doc/invoke.texi (-print-sysroot-headers-suffix): Document.
|
||||||
|
* gcc.c (print_sysroot_headers_suffix): New.
|
||||||
|
(option_map): Include --print-sysroot-headers-suffix.
|
||||||
|
(display_help): Mention -print-sysroot-headers-suffix.
|
||||||
|
(process_command): Handle -print-sysroot-headers-suffix.
|
||||||
|
(do_spec_1): Append multilib directory to include-fixed path if
|
||||||
|
sysroot suffixes in use.
|
||||||
|
(main): Handle -print-sysroot-headers-suffix.
|
||||||
|
* Makefile.in (start.encap): Don't depend on xlimits.h
|
||||||
|
(xlimits.h): Remove.
|
||||||
|
(stmp-int-hdrs): Don't depend on xlimits.h. Inline generation of
|
||||||
|
limits.h for each multilib in fixinc_list.
|
||||||
|
(fixinc_list, s-fixinc_list): New.
|
||||||
|
(stmp-fixinc): Depend on fixinc_list. If not copying headers,
|
||||||
|
generate them for each multilib in fixinc_list.
|
||||||
|
(stmp-fixproto): Use include-fixed. Run fixproto for each
|
||||||
|
multilib in fixinc_list.
|
||||||
|
(mostlyclean): Don't remove xlimits.h.
|
||||||
|
(clean): Remove include-fixed.
|
||||||
|
(real-install-headers-tar, real-install-headers-cpio,
|
||||||
|
real-install-headers-cp): Don't copy include, only include-fixed.
|
||||||
|
(install-mkheaders): Depend on fixinc_list. Don't depend on
|
||||||
|
xlimits.h. Save limits.h files for each multilib in fixinc_list.
|
||||||
|
Always save mkinstalldirs. Preserve ${sysroot_headers_suffix} in
|
||||||
|
SYSTEM_HEADER_DIR setting in mkheaders.conf.
|
||||||
|
|
||||||
2007-03-06 Jan Hubicka <jh@suse.cz>
|
2007-03-06 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* regstack.c (reg_to_stack): When in 64bit PIC mode, we still can load
|
* regstack.c (reg_to_stack): When in 64bit PIC mode, we still can load
|
||||||
|
|
|
||||||
129
gcc/Makefile.in
129
gcc/Makefile.in
|
|
@ -1418,7 +1418,7 @@ all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
|
||||||
libgcc-support lang.all.cross doc @GENINSRC@ srcextra
|
libgcc-support lang.all.cross doc @GENINSRC@ srcextra
|
||||||
# This is what must be made before installing GCC and converting libraries.
|
# This is what must be made before installing GCC and converting libraries.
|
||||||
start.encap: native xgcc$(exeext) cpp$(exeext) specs \
|
start.encap: native xgcc$(exeext) cpp$(exeext) specs \
|
||||||
libgcc-support xlimits.h lang.start.encap @GENINSRC@ srcextra
|
libgcc-support lang.start.encap @GENINSRC@ srcextra
|
||||||
# These can't be made until after GCC can run.
|
# These can't be made until after GCC can run.
|
||||||
rest.encap: $(STMP_FIXPROTO) lang.rest.encap
|
rest.encap: $(STMP_FIXPROTO) lang.rest.encap
|
||||||
# This is what is made with the host's compiler
|
# This is what is made with the host's compiler
|
||||||
|
|
@ -1542,14 +1542,6 @@ cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
|
||||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) cc1-checksum.o \
|
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) cc1-checksum.o \
|
||||||
$(BACKEND) $(LIBS)
|
$(BACKEND) $(LIBS)
|
||||||
|
|
||||||
# Build the version of limits.h that we will install.
|
|
||||||
xlimits.h: glimits.h limitx.h limity.h
|
|
||||||
if $(LIMITS_H_TEST) ; then \
|
|
||||||
cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
|
|
||||||
else \
|
|
||||||
cat $(srcdir)/glimits.h > tmp-xlimits.h; \
|
|
||||||
fi
|
|
||||||
mv tmp-xlimits.h xlimits.h
|
|
||||||
#
|
#
|
||||||
# Build libgcc.a.
|
# Build libgcc.a.
|
||||||
|
|
||||||
|
|
@ -3325,7 +3317,7 @@ gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
|
||||||
# be rebuilt.
|
# be rebuilt.
|
||||||
|
|
||||||
# Build the include directories.
|
# Build the include directories.
|
||||||
stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h $(UNWIND_H)
|
stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) $(UNWIND_H)
|
||||||
# Copy in the headers provided with gcc.
|
# Copy in the headers provided with gcc.
|
||||||
# The sed command gets just the last file name component;
|
# The sed command gets just the last file name component;
|
||||||
# this is necessary because VPATH could add a dirname.
|
# this is necessary because VPATH could add a dirname.
|
||||||
|
|
@ -3342,11 +3334,23 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h $(UNWIND_H)
|
||||||
chmod a+r include/$$realfile; \
|
chmod a+r include/$$realfile; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
rm -f include-fixed/limits.h
|
|
||||||
cp xlimits.h include-fixed/limits.h
|
|
||||||
chmod a+r include-fixed/limits.h
|
|
||||||
rm -f include/unwind.h
|
rm -f include/unwind.h
|
||||||
cp $(UNWIND_H) include/unwind.h
|
cp $(UNWIND_H) include/unwind.h
|
||||||
|
set -e; for ml in `cat fixinc_list`; do \
|
||||||
|
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
|
||||||
|
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
|
||||||
|
fix_dir=include-fixed$${multi_dir}; \
|
||||||
|
if $(LIMITS_H_TEST) ; then \
|
||||||
|
cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
|
||||||
|
else \
|
||||||
|
cat $(srcdir)/glimits.h > tmp-xlimits.h; \
|
||||||
|
fi; \
|
||||||
|
$(mkinstalldirs) $${fix_dir}; \
|
||||||
|
chmod a+rx $${fix_dir} || true; \
|
||||||
|
rm -f $${fix_dir}/limits.h; \
|
||||||
|
mv tmp-xlimits.h $${fix_dir}/limits.h; \
|
||||||
|
chmod a+r $${fix_dir}/limits.h; \
|
||||||
|
done
|
||||||
# Install the README
|
# Install the README
|
||||||
rm -f include-fixed/README
|
rm -f include-fixed/README
|
||||||
cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
|
cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
|
||||||
|
|
@ -3366,6 +3370,28 @@ s-macro_list : $(GCC_PASSES)
|
||||||
$(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
|
$(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
|
||||||
$(STAMP) s-macro_list
|
$(STAMP) s-macro_list
|
||||||
|
|
||||||
|
fixinc_list: s-fixinc_list; @true
|
||||||
|
s-fixinc_list : $(GCC_PASSES)
|
||||||
|
# Build up a list of multilib directories and corresponding sysroot
|
||||||
|
# suffixes, in form sysroot;multilib.
|
||||||
|
if $(GCC_FOR_TARGET) -print-sysroot-headers-suffix > /dev/null 2>&1; then \
|
||||||
|
set -e; for ml in `$(GCC_FOR_TARGET) -print-multi-lib`; do \
|
||||||
|
multi_dir=`echo $${ml} | sed -e 's/;.*$$//'`; \
|
||||||
|
flags=`echo $${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
||||||
|
sfx=`$(GCC_FOR_TARGET) $${flags} -print-sysroot-headers-suffix`; \
|
||||||
|
if [ "$${multi_dir}" = "." ]; \
|
||||||
|
then multi_dir=""; \
|
||||||
|
else \
|
||||||
|
multi_dir=/$${multi_dir}; \
|
||||||
|
fi; \
|
||||||
|
echo "$${sfx};$${multi_dir}"; \
|
||||||
|
done; \
|
||||||
|
else \
|
||||||
|
echo ";"; \
|
||||||
|
fi > tmp-fixinc_list
|
||||||
|
$(SHELL) $(srcdir)/../move-if-change tmp-fixinc_list fixinc_list
|
||||||
|
$(STAMP) s-fixinc_list
|
||||||
|
|
||||||
# The line below is supposed to avoid accidentally matching the
|
# The line below is supposed to avoid accidentally matching the
|
||||||
# built-in suffix rule `.o:' to build fixincl out of fixincl.o. You'd
|
# built-in suffix rule `.o:' to build fixincl out of fixincl.o. You'd
|
||||||
# expect fixincl to be newer than fixincl.o, such that this situation
|
# expect fixincl to be newer than fixincl.o, such that this situation
|
||||||
|
|
@ -3383,16 +3409,9 @@ s-macro_list : $(GCC_PASSES)
|
||||||
# Build fixed copies of system files.
|
# Build fixed copies of system files.
|
||||||
# Abort if no system headers available, unless building a crosscompiler.
|
# Abort if no system headers available, unless building a crosscompiler.
|
||||||
# FIXME: abort unless building --without-headers would be more accurate and less ugly
|
# FIXME: abort unless building --without-headers would be more accurate and less ugly
|
||||||
stmp-fixinc: gsyslimits.h macro_list \
|
stmp-fixinc: gsyslimits.h macro_list fixinc_list \
|
||||||
$(build_objdir)/fixincludes/fixincl \
|
$(build_objdir)/fixincludes/fixincl \
|
||||||
$(build_objdir)/fixincludes/fixinc.sh
|
$(build_objdir)/fixincludes/fixinc.sh
|
||||||
@if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
|
|
||||||
echo The directory that should contain system headers does not exist: >&2 ; \
|
|
||||||
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
|
|
||||||
tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
|
|
||||||
if test "x${SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
|
|
||||||
then sleep 1; else exit 1; fi; \
|
|
||||||
fi
|
|
||||||
rm -rf include-fixed; mkdir include-fixed
|
rm -rf include-fixed; mkdir include-fixed
|
||||||
-chmod a+rx include-fixed
|
-chmod a+rx include-fixed
|
||||||
if [ -d ../prev-gcc ]; then \
|
if [ -d ../prev-gcc ]; then \
|
||||||
|
|
@ -3400,20 +3419,34 @@ stmp-fixinc: gsyslimits.h macro_list \
|
||||||
$(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
|
$(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
|
||||||
libsubdir=. ; \
|
libsubdir=. ; \
|
||||||
else \
|
else \
|
||||||
|
set -e; for ml in `cat fixinc_list`; do \
|
||||||
|
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
|
||||||
|
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
|
||||||
|
fix_dir=include-fixed$${multi_dir}; \
|
||||||
|
if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
|
||||||
|
echo The directory that should contain system headers does not exist: >&2 ; \
|
||||||
|
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
|
||||||
|
tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
|
||||||
|
if test "x${SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
|
||||||
|
then sleep 1; else exit 1; fi; \
|
||||||
|
fi; \
|
||||||
|
$(mkinstalldirs) $${fix_dir}; \
|
||||||
|
chmod a+rx $${fix_dir} || true; \
|
||||||
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
|
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
|
||||||
SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
|
SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
|
||||||
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
|
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
|
||||||
cd $(build_objdir)/fixincludes && \
|
cd $(build_objdir)/fixincludes && \
|
||||||
$(SHELL) ./fixinc.sh ../../gcc/include-fixed \
|
$(SHELL) ./fixinc.sh ../../gcc/$${fix_dir} \
|
||||||
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
|
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
|
||||||
rm -f include-fixed/syslimits.h; \
|
rm -f $${fix_dir}/syslimits.h; \
|
||||||
if [ -f include-fixed/limits.h ]; then \
|
if [ -f $${fix_dir}/limits.h ]; then \
|
||||||
mv include-fixed/limits.h include-fixed/syslimits.h; \
|
mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
|
||||||
else \
|
else \
|
||||||
cp $(srcdir)/gsyslimits.h include-fixed/syslimits.h; \
|
cp $(srcdir)/gsyslimits.h $${fix_dir}/syslimits.h; \
|
||||||
fi; \
|
fi; \
|
||||||
|
chmod a+r $${fix_dir}/syslimits.h; \
|
||||||
|
done; \
|
||||||
fi
|
fi
|
||||||
chmod a+r include-fixed/syslimits.h
|
|
||||||
$(STAMP) stmp-fixinc
|
$(STAMP) stmp-fixinc
|
||||||
|
|
||||||
# Files related to the fixproto script.
|
# Files related to the fixproto script.
|
||||||
|
|
@ -3480,9 +3513,13 @@ fixhdr.ready: build/fix-header$(build_exeext)
|
||||||
|
|
||||||
# stmp-int-hdrs is to make sure fixincludes has already finished.
|
# stmp-int-hdrs is to make sure fixincludes has already finished.
|
||||||
# The if statement is so that we don't run fixproto a second time
|
# The if statement is so that we don't run fixproto a second time
|
||||||
# if it has already been run on the files in `include'.
|
# if it has already been run on the files in `include-fixed'.
|
||||||
stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
|
stmp-fixproto: fixhdr.ready fixproto fixinc_list stmp-int-hdrs
|
||||||
if [ -f include/fixed ] ; then true; \
|
set -e; for ml in `cat fixinc_list`; do \
|
||||||
|
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
|
||||||
|
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
|
||||||
|
fix_dir=include-fixed$${multi_dir}; \
|
||||||
|
if [ -f $${fix_dir}/fixed ] ; then true; \
|
||||||
else \
|
else \
|
||||||
: This line works around a 'make' bug in BSDI 1.1.; \
|
: This line works around a 'make' bug in BSDI 1.1.; \
|
||||||
FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
|
FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
|
||||||
|
|
@ -3490,11 +3527,12 @@ stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
|
||||||
mkinstalldirs="$(mkinstalldirs)"; \
|
mkinstalldirs="$(mkinstalldirs)"; \
|
||||||
export mkinstalldirs; \
|
export mkinstalldirs; \
|
||||||
if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
|
if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
|
||||||
$(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
|
$(SHELL) ${srcdir}/fixproto $${fix_dir} $${fix_dir} $(SYSTEM_HEADER_DIR); \
|
||||||
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
|
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
|
||||||
else true; fi; \
|
else true; fi; \
|
||||||
$(STAMP) include/fixed; \
|
$(STAMP) $${fix_dir}/fixed; \
|
||||||
fi
|
fi; \
|
||||||
|
done
|
||||||
$(STAMP) stmp-fixproto
|
$(STAMP) stmp-fixproto
|
||||||
|
|
||||||
# We can't run fixproto (it's being built for a different host), but we still
|
# We can't run fixproto (it's being built for a different host), but we still
|
||||||
|
|
@ -3696,8 +3734,6 @@ mostlyclean: lang.mostlyclean
|
||||||
# Delete build programs
|
# Delete build programs
|
||||||
-rm -f build/*
|
-rm -f build/*
|
||||||
-rm -f mddeps.mk
|
-rm -f mddeps.mk
|
||||||
# Delete the temp files made in the course of building libgcc.a.
|
|
||||||
-rm -f xlimits.h
|
|
||||||
# Delete other built files.
|
# Delete other built files.
|
||||||
-rm -f xsys-protos.hT
|
-rm -f xsys-protos.hT
|
||||||
-rm -f specs.h gencheck.h options.c options.h
|
-rm -f specs.h gencheck.h options.c options.h
|
||||||
|
|
@ -3738,8 +3774,8 @@ clean: mostlyclean lang.clean
|
||||||
-rm -f cs-*
|
-rm -f cs-*
|
||||||
-rm -f doc/*.dvi
|
-rm -f doc/*.dvi
|
||||||
-rm -f doc/*.pdf
|
-rm -f doc/*.pdf
|
||||||
# Delete the include directory.
|
# Delete the include directories.
|
||||||
-rm -rf include
|
-rm -rf include include-fixed
|
||||||
# Delete files used by the "multilib" facility (including libgcc subdirs).
|
# Delete files used by the "multilib" facility (including libgcc subdirs).
|
||||||
-rm -f multilib.h tmpmultilib*
|
-rm -f multilib.h tmpmultilib*
|
||||||
-if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
|
-if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
|
||||||
|
|
@ -4017,35 +4053,36 @@ install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
|
||||||
|
|
||||||
# Targets without dependencies, for use in prev-gcc during bootstrap.
|
# Targets without dependencies, for use in prev-gcc during bootstrap.
|
||||||
real-install-headers-tar:
|
real-install-headers-tar:
|
||||||
(cd `${PWD_COMMAND}`/include ; \
|
|
||||||
tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
|
|
||||||
(cd `${PWD_COMMAND}`/include-fixed ; \
|
(cd `${PWD_COMMAND}`/include-fixed ; \
|
||||||
tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
|
tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
|
||||||
|
|
||||||
real-install-headers-cpio:
|
real-install-headers-cpio:
|
||||||
cd `${PWD_COMMAND}`/include ; \
|
|
||||||
find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
|
|
||||||
cd `${PWD_COMMAND}`/include-fixed ; \
|
cd `${PWD_COMMAND}`/include-fixed ; \
|
||||||
find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed
|
find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed
|
||||||
|
|
||||||
real-install-headers-cp:
|
real-install-headers-cp:
|
||||||
cp -p -r include $(DESTDIR)$(libsubdir)
|
|
||||||
cp -p -r include-fixed $(DESTDIR)$(libsubdir)
|
cp -p -r include-fixed $(DESTDIR)$(libsubdir)
|
||||||
|
|
||||||
# Install supporting files for fixincludes to be run later.
|
# Install supporting files for fixincludes to be run later.
|
||||||
install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
|
install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
|
||||||
macro_list xlimits.h
|
macro_list fixinc_list
|
||||||
$(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdatadir)/include/limits.h
|
|
||||||
$(INSTALL_DATA) $(srcdir)/gsyslimits.h \
|
$(INSTALL_DATA) $(srcdir)/gsyslimits.h \
|
||||||
$(DESTDIR)$(itoolsdatadir)/gsyslimits.h
|
$(DESTDIR)$(itoolsdatadir)/gsyslimits.h
|
||||||
$(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list
|
$(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list
|
||||||
if [ x$(STMP_FIXPROTO) != x ] ; then \
|
$(INSTALL_DATA) fixinc_list $(DESTDIR)$(itoolsdatadir)/fixinc_list
|
||||||
$(INSTALL_SCRIPT) $(mkinstalldirs) \
|
set -e; for ml in `cat fixinc_list`; do \
|
||||||
|
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}; \
|
||||||
|
$(INSTALL_DATA) include-fixed$${multidir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \
|
||||||
|
done
|
||||||
|
$(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \
|
||||||
$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
|
$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
|
||||||
|
if [ x$(STMP_FIXPROTO) != x ] ; then \
|
||||||
$(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
|
$(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
|
||||||
$(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
|
$(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
|
||||||
$(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
|
$(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
|
||||||
else :; fi
|
else :; fi
|
||||||
|
sysroot_headers_suffix='$${sysroot_headers_suffix}'; \
|
||||||
echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
|
echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
|
||||||
> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
|
> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
|
||||||
echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
|
echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
|
||||||
|
|
|
||||||
|
|
@ -7128,7 +7128,7 @@ if test "${with_sysroot+set}" = set; then
|
||||||
esac
|
esac
|
||||||
|
|
||||||
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
|
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
|
||||||
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
|
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||||
|
|
||||||
if test "x$exec_prefix" = xNONE; then
|
if test "x$exec_prefix" = xNONE; then
|
||||||
if test "x$prefix" = xNONE; then
|
if test "x$prefix" = xNONE; then
|
||||||
|
|
@ -13121,7 +13121,7 @@ ALL=all.internal
|
||||||
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
|
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||||
|
|
||||||
if test "x$with_build_sysroot" != x; then
|
if test "x$with_build_sysroot" != x; then
|
||||||
build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
|
build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||||
else
|
else
|
||||||
# This value is used, even on a native system, because
|
# This value is used, even on a native system, because
|
||||||
# CROSS_SYSTEM_HEADER_DIR is just
|
# CROSS_SYSTEM_HEADER_DIR is just
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,7 @@ AC_ARG_WITH(sysroot,
|
||||||
esac
|
esac
|
||||||
|
|
||||||
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
|
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
|
||||||
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
|
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||||
|
|
||||||
if test "x$exec_prefix" = xNONE; then
|
if test "x$exec_prefix" = xNONE; then
|
||||||
if test "x$prefix" = xNONE; then
|
if test "x$prefix" = xNONE; then
|
||||||
|
|
@ -1704,7 +1704,7 @@ ALL=all.internal AC_SUBST(ALL)
|
||||||
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' AC_SUBST(SYSTEM_HEADER_DIR)
|
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' AC_SUBST(SYSTEM_HEADER_DIR)
|
||||||
|
|
||||||
if test "x$with_build_sysroot" != x; then
|
if test "x$with_build_sysroot" != x; then
|
||||||
build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
|
build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||||
else
|
else
|
||||||
# This value is used, even on a native system, because
|
# This value is used, even on a native system, because
|
||||||
# CROSS_SYSTEM_HEADER_DIR is just
|
# CROSS_SYSTEM_HEADER_DIR is just
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,15 @@ const struct default_include cpp_include_defaults[]
|
||||||
#endif
|
#endif
|
||||||
#ifdef FIXED_INCLUDE_DIR
|
#ifdef FIXED_INCLUDE_DIR
|
||||||
/* This is the dir for fixincludes. */
|
/* This is the dir for fixincludes. */
|
||||||
{ FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
|
{ FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
|
||||||
|
/* A multilib suffix needs adding if different multilibs use
|
||||||
|
different headers. */
|
||||||
|
#ifdef SYSROOT_HEADERS_SUFFIX_SPEC
|
||||||
|
1
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef CROSS_INCLUDE_DIR
|
#ifdef CROSS_INCLUDE_DIR
|
||||||
/* One place the target system's headers might be. */
|
/* One place the target system's headers might be. */
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,7 @@ Objective-C and Objective-C++ Dialects}.
|
||||||
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
|
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
|
||||||
-print-multi-directory -print-multi-lib @gol
|
-print-multi-directory -print-multi-lib @gol
|
||||||
-print-prog-name=@var{program} -print-search-dirs -Q @gol
|
-print-prog-name=@var{program} -print-search-dirs -Q @gol
|
||||||
|
-print-sysroot-headers-suffix @gol
|
||||||
-save-temps -time}
|
-save-temps -time}
|
||||||
|
|
||||||
@item Optimization Options
|
@item Optimization Options
|
||||||
|
|
@ -4697,6 +4698,12 @@ variable @env{GCC_EXEC_PREFIX} to the directory where you installed them.
|
||||||
Don't forget the trailing @samp{/}.
|
Don't forget the trailing @samp{/}.
|
||||||
@xref{Environment Variables}.
|
@xref{Environment Variables}.
|
||||||
|
|
||||||
|
@item -print-sysroot-headers-suffix
|
||||||
|
@opindex print-sysroot-headers-suffix
|
||||||
|
Print the suffix added to the target sysroot when searching for
|
||||||
|
headers, or give an error if the compiler is not configured with such
|
||||||
|
a suffix---and don't do anything else.
|
||||||
|
|
||||||
@item -dumpmachine
|
@item -dumpmachine
|
||||||
@opindex dumpmachine
|
@opindex dumpmachine
|
||||||
Print the compiler's target machine (for example,
|
Print the compiler's target machine (for example,
|
||||||
|
|
|
||||||
27
gcc/gcc.c
27
gcc/gcc.c
|
|
@ -168,6 +168,11 @@ static int print_multi_lib;
|
||||||
|
|
||||||
static int print_help_list;
|
static int print_help_list;
|
||||||
|
|
||||||
|
/* Flag saying to print the sysroot suffix used for searching for
|
||||||
|
headers. */
|
||||||
|
|
||||||
|
static int print_sysroot_headers_suffix;
|
||||||
|
|
||||||
/* Flag indicating whether we should print the command and arguments */
|
/* Flag indicating whether we should print the command and arguments */
|
||||||
|
|
||||||
static int verbose_flag;
|
static int verbose_flag;
|
||||||
|
|
@ -1125,6 +1130,7 @@ static const struct option_map option_map[] =
|
||||||
{"--print-multi-directory", "-print-multi-directory", 0},
|
{"--print-multi-directory", "-print-multi-directory", 0},
|
||||||
{"--print-multi-os-directory", "-print-multi-os-directory", 0},
|
{"--print-multi-os-directory", "-print-multi-os-directory", 0},
|
||||||
{"--print-prog-name", "-print-prog-name=", "aj"},
|
{"--print-prog-name", "-print-prog-name=", "aj"},
|
||||||
|
{"--print-sysroot-headers-suffix", "-print-sysroot-headers-suffix", 0},
|
||||||
{"--profile", "-p", 0},
|
{"--profile", "-p", 0},
|
||||||
{"--profile-blocks", "-a", 0},
|
{"--profile-blocks", "-a", 0},
|
||||||
{"--quiet", "-q", 0},
|
{"--quiet", "-q", 0},
|
||||||
|
|
@ -3193,6 +3199,7 @@ display_help (void)
|
||||||
-print-multi-lib Display the mapping between command line options and\n\
|
-print-multi-lib Display the mapping between command line options and\n\
|
||||||
multiple library search directories\n"), stdout);
|
multiple library search directories\n"), stdout);
|
||||||
fputs (_(" -print-multi-os-directory Display the relative path to OS libraries\n"), stdout);
|
fputs (_(" -print-multi-os-directory Display the relative path to OS libraries\n"), stdout);
|
||||||
|
fputs (_(" -print-sysroot-headers-suffix Display the sysroot suffix used to find headers\n"), stdout);
|
||||||
fputs (_(" -Wa,<options> Pass comma-separated <options> on to the assembler\n"), stdout);
|
fputs (_(" -Wa,<options> Pass comma-separated <options> on to the assembler\n"), stdout);
|
||||||
fputs (_(" -Wp,<options> Pass comma-separated <options> on to the preprocessor\n"), stdout);
|
fputs (_(" -Wp,<options> Pass comma-separated <options> on to the preprocessor\n"), stdout);
|
||||||
fputs (_(" -Wl,<options> Pass comma-separated <options> on to the linker\n"), stdout);
|
fputs (_(" -Wl,<options> Pass comma-separated <options> on to the linker\n"), stdout);
|
||||||
|
|
@ -3637,6 +3644,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
|
||||||
print_multi_directory = 1;
|
print_multi_directory = 1;
|
||||||
else if (! strcmp (argv[i], "-print-multi-os-directory"))
|
else if (! strcmp (argv[i], "-print-multi-os-directory"))
|
||||||
print_multi_os_directory = 1;
|
print_multi_os_directory = 1;
|
||||||
|
else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
|
||||||
|
print_sysroot_headers_suffix = 1;
|
||||||
else if (! strncmp (argv[i], "-Wa,", 4))
|
else if (! strncmp (argv[i], "-Wa,", 4))
|
||||||
{
|
{
|
||||||
int prev, j;
|
int prev, j;
|
||||||
|
|
@ -4066,6 +4075,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
|
||||||
;
|
;
|
||||||
else if (! strcmp (argv[i], "-print-multi-os-directory"))
|
else if (! strcmp (argv[i], "-print-multi-os-directory"))
|
||||||
;
|
;
|
||||||
|
else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
|
||||||
|
;
|
||||||
else if (! strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")))
|
else if (! strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")))
|
||||||
{
|
{
|
||||||
target_system_root = argv[i] + strlen ("--sysroot=");
|
target_system_root = argv[i] + strlen ("--sysroot=");
|
||||||
|
|
@ -4978,6 +4989,9 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
|
||||||
spec_path, &info);
|
spec_path, &info);
|
||||||
|
|
||||||
info.append = "include-fixed";
|
info.append = "include-fixed";
|
||||||
|
if (*sysroot_hdrs_suffix_spec)
|
||||||
|
info.append = concat (info.append, dir_separator_str,
|
||||||
|
multilib_dir, NULL);
|
||||||
info.append_len = strlen (info.append);
|
info.append_len = strlen (info.append);
|
||||||
for_each_path (&include_prefixes, false, info.append_len,
|
for_each_path (&include_prefixes, false, info.append_len,
|
||||||
spec_path, &info);
|
spec_path, &info);
|
||||||
|
|
@ -6394,6 +6408,19 @@ main (int argc, char **argv)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (print_sysroot_headers_suffix)
|
||||||
|
{
|
||||||
|
if (*sysroot_hdrs_suffix_spec)
|
||||||
|
{
|
||||||
|
printf("%s\n", target_sysroot_hdrs_suffix);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
/* The error status indicates that only one set of fixed
|
||||||
|
headers should be built. */
|
||||||
|
fatal ("not configured with sysroot headers suffix");
|
||||||
|
}
|
||||||
|
|
||||||
if (print_help_list)
|
if (print_help_list)
|
||||||
{
|
{
|
||||||
display_help ();
|
display_help ();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue