On 2017-Apr-14, at 6:54 PM, Mark Millard <markmi at dsl-only.net> wrote:
> Alexander Kabaev kabaev at gmail.com on Sat Apr 15 00:20:40 UTC 2017 > wrote: > . . . > >> it was suggested multiple times that the whole fixinc step is >> ultimately harmful and serves no useful purpose and probably should be >> disabled in built packages outright. Is there a reason not to do it? >> Even Redhat appears to do the slimming in their rpms: >> >> mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h >> mv $FULLPATH/include-fixed/limits.h $FULLPATH/include/limits.h >> for h in `find $FULLPATH/include -name \*.h`; do >> if grep -q 'It has been auto-edited by fixincludes from' $h; then >> rh=`grep -A2 'It has been auto-edited by fixincludes from' $h | >> tail -1 | sed 's|^.*"\(.*\)".*$|\1|'` diff -up $rh $h || : >> rm -f $h >> fi >> done > > 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). Hmm. Looking around I found a more overall script. For the context that I tried it in the command was: # /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap/libexec/gcc/aarch64-aux-freebsd12.0/6.3.1/install-tools/mkheaders /usr/obj/portswork/usr/ports/lang/gcc6-aux/work/bootstrap In other words: bootstrap/libexec/gcc/*/*/install-tools/mkheaders is the script and looking on the web I find other references to using such as well. So I doubt that is all that special to gcc6-aux, although some of the content of the example might well be. It in turn uses fixinc.sh script(s). The mkheaders core loop looked 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 This code provides context to fixinc.sh and deals with limits.h as well. So: http://www.linuxfromscratch.org/lfs/view/7.1/chapter06/gcc.html was not turning everything off. === Mark Millard markmi at dsl-only.net _______________________________________________ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"