diff options
author | Joseph Myers <joseph@codesourcery.com> | 2007-03-06 15:50:28 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-03-06 15:50:28 +0000 |
commit | 14da607343d7637050c36ee3d338156dcc431354 (patch) | |
tree | 8c9042406cd938c21327303d5cf16abd1b592581 /fixincludes/mkheaders.in | |
parent | 4e669430fe3291fa26128e18c6083d0b0e61d9a3 (diff) | |
download | gcc-14da607343d7637050c36ee3d338156dcc431354.zip gcc-14da607343d7637050c36ee3d338156dcc431354.tar.gz gcc-14da607343d7637050c36ee3d338156dcc431354.tar.bz2 |
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
Diffstat (limited to 'fixincludes/mkheaders.in')
-rw-r--r-- | fixincludes/mkheaders.in | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in index cfe826e..b584b68 100644 --- a/fixincludes/mkheaders.in +++ b/fixincludes/mkheaders.in @@ -78,29 +78,33 @@ libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version} itoolsdir=${libexecsubdir}/install-tools itoolsdatadir=${libsubdir}/install-tools incdir=${libsubdir}/include-fixed - -. ${itoolsdatadir}/mkheaders.conf +mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs" cd ${itoolsdir} rm -rf ${incdir}/* -if [ x${STMP_FIXINC} != x ] ; then +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 TARGET_MACHINE="${target}" target_canonical="${target}" \ MACRO_LIST="${itoolsdatadir}/macro_list" \ - @SHELL@ ./fixinc.sh ${incdir} \ + @SHELL@ ./fixinc.sh ${subincdir} \ ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS} - rm -f ${incdir}/syslimits.h - if [ -f ${incdir}/limits.h ]; then - mv ${incdir}/limits.h ${incdir}/syslimits.h + rm -f ${subincdir}/syslimits.h + if [ -f ${subincdir}/limits.h ]; then + mv ${subincdir}/limits.h ${subincdir}/syslimits.h else - cp ${itoolsdatadir}/gsyslimits.h ${incdir}/syslimits.h + cp ${itoolsdatadir}/gsyslimits.h ${subincdir}/syslimits.h fi -fi + fi -cp ${itoolsdatadir}/include/* ${incdir} + cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir} -if [ x${STMP_FIXPROTO} != x ] ; then - mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs" - export FIXPROTO_DEFINES mkinstalldirs - @SHELL@ fixproto ${incdir} ${incdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1 -fi + if [ x${STMP_FIXPROTO} != x ] ; then + export FIXPROTO_DEFINES mkinstalldirs + @SHELL@ fixproto ${subincdir} ${subincdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1 + fi +done |