I've upgraded one of my systems to Fedora 35 and I found trimming
the headers in this way made the three compilations of libcap, used
by `make distcheck`, work with standard Fedora 35 compiler packages.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
David Seifert at Gentoo made a request to not require perl for
the libcap build since their distribution wants to build it prior
to building perl and so requiring it requires they maintain some
extra patches.
We previously introduced the need for perl in response to some
apparent incompatibilities between various versions of sed:
https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9494a1fab59ac0b6e4f0bfc536fa482c6d6490b6
However, it has been 13 years since that time so we're optimistic
those problems are no longer present for anyone and we've also
added a make variable abstraction in case some builder wants to
override their system default 'sed' as make BUILD_SED=... etc.
We've also done something similar with make uses of grep, egrep
and fgrep.
Finally, for make variable naming consistency, we've replaced use
of BUILD_GPERF with USE_GPERF. Since folk may be using BUILD_GPERF
in their package building scripts, we error out if it is set.
The expectation is that people will update their package defs.
(Eventually, we plan to reuse BUILD_GPERF as an alias for 'gperf'.)
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
I've been looking at reasons packagers are not building the Go binaries
and found this with respect to RPMs:
https://github.com/rpm-software-management/rpm/issues/367
There has been no easy way to inject the otherwise unneeded workaround:
-ldflags=-linkmode=external for building (which, strangely, generates
some sort of warning and gratuitously links glibc to an otherwise
static build), but seems to work.
Until RPM supports Go's native '.note.go.buildid', and RPM requires
'.note.gnu.build-id' on binaries, I guess this can work around it:
GO_BUILD_FLAGS='-ldflags=-linkmode=external'
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Noticed that we weren't applying the same amount of flag discipline
to local BUILD_* tool rules. Fixing that, I see we've been carrying
a source code issue in libcap/_makenames.c for a while. (FIXED).
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Not sure exactly what is causing the build server to fail (can't
reproduce yet), but add some extra padding to a calloc and also
some test debugging printf()s.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
These allow overriding of the sbin target directory with
make sbindir=xxx
or
make sbin=xxx
We've recently made some CPPFLAGS changes, so I'm not going to
disturb those further this iteration.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
I've yet to understand why this is needed. But, apparently, folk
feel strongly that there is a reason one might want to force it
one way or another. If you don't care one way or the other, let
the Makefiles figure out something that works.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Some system libraries support being run as regular executables.
Now that I have figured out how to do it, add support for libcap.so
and libpsx.so to print some information and exit.
Note, I've explained how most of this stuff works in this answer:
https://stackoverflow.com/a/68339111/14760867
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Go has its own notion of major version, and this commit raises
it from 0 to 1. That is, these modules should now be considered
stable.
The sources for the 1.2.48 and the 0.2.48 modules are otherwise
identical.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Avoid building any of the GO stuff:
make GOLANG=no ...
Build with a specific build of GO:
make GO=~/sdk/go1.16rc1/bin/go ...
Also, now https://github.com/golang/go/issues/43149 is resolved in the
go1.16rc1 build (it does not work in the go1.16beta1 but we don't support
that one any more), remove the forced CGO use for the go/psx-signals build.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Go 1.16 release branch contains the syscall.AllThreadsSyscall now,
so use the Go release tag to identify a build environment that supports
this feature.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Heiko Thiery reports that some embedded distributions that link
against uLibc can't support shared libraries. So, refactor the
Makefiles to support
make SHARED=no ...
(SHARED defaults to yes).
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
For now, the dynamic linkage of libpsx.so* is considered alpha.
The build tree supports it and can successfully run tests but
I'm hopeful I can get some feedback from third parties that it
works as expected.
Feature request:
https://bugzilla.kernel.org/show_bug.cgi?id=206093
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
This was changed from ":=" to "?=" in Make.rules, which means "set new value if
previously unset". Make however already sets default values for the compile
tools, so doing "make CROSS_COMPILE=prefix-" did not override any of them
anymore.
Fixes: 22f2e207f7824d231aab4de973e547f006e3ea3c
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Acked-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Overriding CFLAGS and BUILD_CFLAGS from outside the build isn't really fun as
one then has to provide what comes in DEFINES and IPATH also. Add another flag
to set only the optimization flags and then combine it as before.
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
make DYNAMIC=yes test sudotest
works now. Thomas Petazzoni provided a patch that built
the tests this way, but I've restructured things to
make the above command line work against the uninstalled
library builds.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>