https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109135
Bug ID: 109135 Summary: Wrong make utility called with LTO testsuite Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: kargl at gcc dot gnu.org Target Milestone: --- It seems the wrong make utility is being invoked when the testsuite tries to run tests for LTO. On FreeBSD, make is BSD make. GNU make is installed as gmake. After bootstrapping gcc with gfortran support, I move into the obj/gcc directory an execute % gmake -j6 check-fortran There a number of failures reported. In fact, with 'gmake -j6 check' is a massive number of failures. Looking into testsuite/gfortran/gfortran.log, I see for example, Executing on host: /usr/home/sgk/gcc/objx/gcc/testsuite/gfortran/../../gfortran -B/usr/home/sgk/gcc/objx/gcc/testsuite/gfortran/../../ -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/ /usr/home/sgk/gcc/gccx/gcc/testsuite/gfortran.dg/pr71526.f90 -fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 -flto -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libatomic/.libs -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -lm -o pr71526.exe (timeout = 300) spawn -ignore SIGHUP /usr/home/sgk/gcc/objx/gcc/testsuite/gfortran/../../\ gfortran -B/usr/home/sgk/gcc/objx/gcc/testsuite/gfortran/../../ -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/ /usr/home/sgk/gcc/gccx/gcc/testsuite/gfortran.dg/pr71526.f90 -fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 -flto -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libgfortran/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libatomic/.libs -B/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -L/usr/home/sgk/gcc/objx/x86_64-unknown-freebsd14.0/./libquadmath/.libs -lm -o pr71526.exe make[2]: illegal argument to -j -- must be positive integer! FAIL: gfortran.dg/pr71526.f90 -O (test for excess errors) Excess errors: make[2]: illegal argument to -j -- must be positive integer! With BSD make and if one my projects, I see % make -j Makefile make: illegal argument to -j -- must be positive integer! % make -j 0 Makefile make: illegal argument to -j -- must be positive integer! % make -j -6 Makefile make: illegal argument to -j -- must be positive integer! If run gmake with a Makefile suitable for gmake, I see % gmake -j -6 -f Makefile.gnu <GNU make usage message> % gmake -j 0 -f Makefile.gnu <GNU make usage message> % gmake -j -f Makefile.gnu <GNU make builds my project> I suspect the something in the testsuite is spawning a submake where the last 'gmake -j' example above is being spawned as the first 'make -j' example above.