Mark Millard
2017-May-01 08:17 UTC
GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t definition
Gerald Pfeifer gerald at pfeifer.com wrote on Sun Apr 30 15:20:35 UTC 2017 :> That, or run the fixinc.sh script in > ./libexec/gcc/$TARGETTRIPLET/$VERSION/install-tools/fixinc.sh.fixinc.sh is designed to be run by (for the */* involved): bootstrap/libexec/gcc/*/*/install-tools/mkheaders and that mkheaders does more than just fixinc.sh as far as changing headers goes, such as limits.h and gsyslmits.h and syslimits.h . In more detail: The mkheaders core loop looks like: 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" \ /bin/sh ./fixinc.sh ${subincdir} \ ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS} rm -f ${subincdir}/syslimits.h if [ -f ${subincdir}/limits.h ]; then mv ${subincdir}/limits.h ${subincdir}/syslimits.h else cp ${itoolsdatadir}/gsyslimits.h ${subincdir}/syslimits.h fi fi cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir} done Note that mkheaders also provides various definitions to fixinc.sh, such as MACRO_LIST . Direct use of fixinc.sh likely requires providing appropriate alternate definitions for such. I'll note that: http://www.linuxfromscratch.org/lfs/view/7.1/chapter06/gcc.html reports as one of its steps (quote): The fixincludes script is known to occasionally erroneously attempt to "fix" the system headers installed so far. As the headers up to this point are known to not require fixing, issue the following command to prevent the fixincludes script from running: sed -i 's@\./fixinc\.sh at -c true@' gcc/Makefile.in (End quote) So seems that disabling fixinc.sh's use is fairly common when the headers are known to "not require fixing" (i.e., are known to already be gcc compliant). This still leaves the limits.h and gsystemlimits.h and syslimits.h code in place but does block most of the activity. ==Mark Millard markmi at dsl-only.net
Gerald Pfeifer
2017-May-01 09:53 UTC
GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t definition
On Mon, 1 May 2017, Mark Millard wrote:> and that mkheaders does more than just fixinc.sh > as far as changing headers goes, such as limits.h > and gsyslmits.h and syslimits.h .That's a good point, and I guess the *limits.h files do make sense to come from the compiler itself?> The fixincludes script is known to occasionally erroneously attempt > to "fix" the system headers installed so far. As the headers up to > this point are known to not require fixing, issue the following > command to prevent the fixincludes script from running: > > sed -i 's@\./fixinc\.sh at -c true@' gcc/Makefile.in > > (End quote):> This still leaves the limits.h and gsystemlimits.h and > syslimits.h code in place but does block most of the > activity.Thanks for this pointer, Mark! I have earmarked this as the first approach to give a try soon, instead of completely yanking the fixincluded directory. Gerald