https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93049

            Bug ID: 93049
           Summary: limits.h generated by fixincludes breaks
                    cross-compilation
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: svante.signell at gmail dot com
  Target Milestone: ---

Created attachment 47542
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47542&action=edit
fix for glimits.h

Hello,

Cross-compiling from x86_64-linux-gnu to i686-gnu breaks for example the builds
of
sed-4.7 and coreutils-8.31, as well as Linux-PAM-1.3.1. The first two failures
are due to that the fixed limits.h #define MB_LEN_MAX 1 while the system one
has #define MB_LEN_MAX 16. The third error is due to that

#ifdef __USE_POSIX2
# include <bits/posix2_lim.h>
#endif

is chopped off the generated limits.h, leaving LINE_MAX undefined.

The problem seems to be in the file gcc-9.2.0/gcc/glimits.h causing the
generated gcc-9.2.0.obj/gcc/include-fixed/limits.h.

The attached patch fixinc_glimits.h.diff fixes that problem.

Reply via email to