This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.
Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.
Error was reported when build.sh was run with MKSANITIZER=yes flag.
Reviewed by: kamil@
Sigh; one more attempt. This time I'm sure I've verified that the
.pc files contain the right number and that atf-version also outputs
the right stuff... Both with a clean and non-clean obj directory.
Should fix part of the problems reported in PR bin/48624.
Yes, attempting yet another fix at this so that the version number that
gets recorded in the pkgconfig files and inside atf-version really matches
the latest imported version. Should resolve issues where the built files
get stuck with an older version number during update builds.
This time, I'm trying the same approach I applied in the FreeBSD source
tree, which has been working fine so far across various release imports.
- Move the majority of the common build definitions to the top-level
Makefile.inc and ensure this gets included everywhere.
- Move the bconfig.h file to the top-level directory.
- Add a statically-generated defs.h file instead of creating one
during the build. Easier to understand and less chances for things
to go wrong.
- Make sure all files using ATF_VERSION have the right dependency to
trigger a rebuild when the value changes.
- Clean up stale -I flags.
This is all mostly for simplicity reasons and to reduce the cognitive
load required to understand the build of the atf and kyua-* packages.
I have tested this with both MKKYUA=no/yes and non-clean/clean builds
so hopefully I got the details right. But if not, let me know please.
The main change here is that the atf-config, atf-report, atf-run and
atf-version tools no longer depend on libatf-c nor libatf-c++. Instead,
they depend on an internal libtools.a that contains code specifically
for these tools and nothing else, making them self-contained.
bconfig.h. Also make the build of these files depends on bconfig.h itself.
This should fix once and for all the problems of the
atf/atf-{c,c++}/pkg_config_test:version tests breaking because the
pkgconfig files hold an old version number during update builds.
Keeping these files up to date with every new import is too easy to get
wrong. Would be nice if we'd extract the version number in some other
manner, like from lib/libatf-c/bconfig.h.
Found by martin@.
the cpu name and the latter the port name. They had been reversed until
now due to some "smart" stupidity^Wlogic in the upstream configure script,
which is now gone.
This is a pullup of revision f9329ca68da7e8557e0803b5747a12f8c10b1258
plus the corresponding reachover build changes.
Addresses PR bin/44305.