Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2017 01:17:31 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        Gerald Pfeifer <gerald@pfeifer.com>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Cc:        dim@FreeBSD.org, Konstantin Belousov <kostikbel@gmail.com>
Subject:   Re: GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t definition
Message-ID:  <0630A9BC-429E-49F2-B0A0-2313A925B0B4@dsl-only.net>

next in thread | raw e-mail | index | archive | help
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@-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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0630A9BC-429E-49F2-B0A0-2313A925B0B4>