From: Paul Smith Date: Tue, 3 Sep 2019 16:24:54 +0000 (-0400) Subject: * README.git: Describe GCC and GNU make requirements X-Git-Tag: 4.2.91~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76b6e668a60d4c1eff5e231198f52e6d5f948be1;p=thirdparty%2Fmake.git * README.git: Describe GCC and GNU make requirements * maintMakefile: Put custom C flags into a separate variable so they can be overridden more easily on the command line. --- diff --git a/README.git b/README.git index 47328c69..a78726d7 100644 --- a/README.git +++ b/README.git @@ -85,6 +85,8 @@ need to install the following extra software: * autopoint * pkg-config * texinfo (for makeinfo) +* GCC (Clang's GCC emulation is not sufficient) +* GNU make (POSIX make is not sufficient) And any tools that those utilities require (GNU m4, Perl, etc.) @@ -93,10 +95,13 @@ a local installation of gnulib you can set GNULIB_SRCDIR to point to it. Otherwise, ./bootstrap will obtain a clone for you. Unfortunately due to issues with gnulib's getloadavg, you must have automake -1.16.1 or above. This version is not yet widely available in GNU/Linux +1.16.1 or above. This version may not yet be available through GNU/Linux package managers. If you need to install from source be sure to set ACLOCAL_PATH to point to the pkg-config location (e.g., /usr/share/aclocal). +If you want to build from Git with a non-GCC compiler, add "MAKE_CFLAGS=" to +your make command line (or at least remove any flags your compiler does not +support). When building from Git you must build in the source directory: "VPATH builds" from remote directories are not supported. Once you've created @@ -118,6 +123,11 @@ That is, you can just run: to build and install GNU make. +NOTE! This method builds GNU make in "maintainer mode". In this mode it will + be slower, possibly MUCH slower: there are various sanity checks + enabled. If you want to build from Git with "maintainer mode" disabled, + add "MAKE_MAINTAINER_MODE=" to your make command line. + Building From Git for Windows ----------------------------- diff --git a/maintMakefile b/maintMakefile index c99a585a..b47e7145 100644 --- a/maintMakefile +++ b/maintMakefile @@ -29,11 +29,13 @@ MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web # We like mondo-warnings! # Also force comments to be preserved. This helps when using ccache, in # combination with GCC 7's implicit-fallthrough warning. -AM_CFLAGS += -C -Wall -Wextra -Werror -Wwrite-strings -Wshadow \ +MAKE_CFLAGS := -C -Wall -Wextra -Werror -Wwrite-strings -Wshadow \ -Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \ -Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith \ -Wignored-qualifiers -Wformat-signedness -Wduplicated-cond +AM_CFLAGS += $(MAKE_CFLAGS) + # Unfortunately the Guile headers are sometimes broken. Convince GCC # to treat them as system headers so warnings are ignored. GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))