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

            Bug ID: 105391
           Summary: gm2 doesn't heed --with-gmp*
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---

When building the current devel/modula-2 branch on i686-pc-linux-gnu for
comparison's sake, the build failed like this

In file included from
/vol/gcc/src/hg/master/modula-2/gcc/m2/mc-boot/GAssertion.c:29:
/vol/gcc/src/hg/master/modula-2/gcc/system.h:702:10: fatal error: gmp.h: No
such file or directory
  702 | #include <gmp.h>
      |          ^~~~~~~
compilation terminated.

and many many more similar errors.  The system in question hadn't installed
gmp.h in system directories, but only in a separate prefix specified with
--with-gmp.  However, gcc/m2/Make-lang.in doesn't heed GMPINC/GMPLIB.

The attached patch fixes this by adding $(INCLUDES) in many places.  It was
enough
to let the build succeed, but is certainly hacky in that it may add the
variable
in more places than necessary.  I found the makefile extremely hard to deal
with
because it's extremely repetitive.

Reply via email to