summaryrefslogtreecommitdiff
path: root/tools/compat
AgeCommit message (Collapse)Author
2023-07-08Add support for missing NAME_MAX when building on Solaris hostspalle
2023-07-05Update build instruction for Solaris 11.4 hostspalle
2023-07-03PR/57500: Palle Lyckegaard: include missing tools/compat/regex.h forchristos
__{BEGIN,END}_DECLS.
2023-06-03regenlukem
2023-06-03tools/compat: support all bsd.own.mk disabled warningslukem
Check the host CC support for all the warnings now in <bsd.own.mk> and override appropriately in defs.mk. In general there's a 1:1 mapping, with the special case CC_WNO_ADDRESS_OF_PACKED_MEMBER which is set from both @CC_WNO_ADDRESS_OF_PACKED_MEMBER@ (gcc) and @CC_WNO_ERROR_ADDRESS_OF_PACKED_MEMBER@ (clang).
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-05-30tools/compat: regenlukem
2023-05-30tools/compat: disable host CC warningslukem
Determine if the host CC supports flags to disable various warnings similar to <bsd.own.mk> GCC_*, CLANG_*, and CC_*, and override the <bsd.own.mk> equivalents in defs.mk. Silences "warning: unknown warning option '...'" from our source. External source (e.g., binutils and gcc) need their own fixes to enhance their detection of supported clang compiler flags.
2023-05-30tools/compat: detect supported host compiler flagslukem
Define NB_CC_FLAG(FLAG) to use AX_CHECK_COMPILE_FLAG to determine if the host compiler supports FLAG and define and AC_SUBST CC_FLAG if so. Use workarounds to force clang to hard-fail on unknown -Wwarning, and gcc to use -WWARN to check unknown -Wno-WARN because the latter doesn't cause an error in gcc. In the future we could use NB_CC_FLAG([-fcommon]) for older NetBSD release branches compiled with host gcc 10+. Rework Darwin -no-cpp-precomp check to use NB_CC_FLAG(). Note: this flag probably hasn't been required on macOS (Darwin) for a long time, but serves as a good example on how to use this. Display varaibles at the end of configure to show what was detected.
2023-05-30tools/compat: import AX_CHECK_COMPILE_FLAGlukem
Import AX_CHECK_COMPILE_FLAG serial 6 from autoconf-archive https://github.com/autoconf-archive/autoconf-archive.git as at commit 5b5ce7f on 2023-05-01.
2023-05-30tools/compat: don't expose HAVE_PTHREAD_H to makelukem
Non of the tools Makefiles needs HAVE_PTHREAD_H, so don't AC_SUBST it or provide in defs.mk.
2023-05-30tools/compat: use autoreconf, support MAKEVERBOSElukem
Use autoreconf instead of autoconf + autoheader; we'll need aclocal in the near future. If MAKEVERBOSE >= 2, add -v to autoreconf.
2023-05-29tools/compat: regenlukem
2023-05-29tools/compat/configure.ac: style tweakslukem
Use "NB_" prefix not "AC_" for our macros ("AC_" is for autoconf). Fail is NB_ macro isn't defined. Use AC_DEFUN() instead of define(). Consistently use () in zero argument macro calls.
2023-05-23tools/compat: regen for dispatch_semaphore_createlukem
2023-05-23tools/compat: MAKEVERBOSE support in regenlukem
2023-05-23ctfmerge: fix macOS semaphore implementationlukem
Use dispatch_semaphore_create() if present instead of sem_init(). macOS doesn't actually implement sem_init() (et al) (even though it provides the prototypes as deprecated). This was detected by the previous commit to ctfmerge that added error handling. Implement ctfmerge's barrier operations in terms of dispatch(3) APIs such as dispatch_semaphore_create() (et al). Update tools/compat/configure.ac to find dispatch_semaphore_create(). Fixes ctfmerge on macOS hosts. Inspired by https://stackoverflow.com/a/27847103.
2021-09-18Patch the build script and toolchain to allow passing throughchristos
HOST_CPPFLAGS, HOST_CXXFLAGS, but not LIBRARY_PATH because it breaks the build. These variables are necessary to support building NetBSD from a GNU Guix or NixOS host, where /usr/include, /lib, and all but /bin/sh do not exist. In many cases, support for HOST_CPPFLAGS was incomplete. From Ryan Sundberg
2021-07-11Final note on OpenBSD cross-buildling. Remaining issues were due tocjep
default limits on the build host.
2021-07-04LLVM RT library will actually cross-build from OpenBSD provided sufficientcjep
limits are in place for the build user.
2021-06-29Note OpenBSD cross-build progresscjep
2021-06-28avoid triggering conflict indicator warningscjep
2021-06-28note on Darwin/Maccjep
2021-05-30PR port-amiga/56188cjep
Include a prototype for __nbcompat_heapsort. The tools for amiga now build on Darwin where one Amiga specific tool uses heapsort. Despite being a one-liner, ./build.sh -m amiga tools was tested on NetBSD, Darwin, FreeBSD & Linux with the change. Discussed various options with jdc & thorpej. Perhaps in the future we could look at using qsort instead of heapsort as qsort is standardised and more likely to be available. We could then remove heapsort from the compatibility library.
2021-05-24Fix typo in pathname in a comment.uwe
2021-05-12Add macOS High Sierra to the list of verified build platformscjep
2021-05-07More test notes from using build.sh against non NetBSD platforms.cjep
2021-05-06Update with information from recent testing of different Linux variantscjep
on AWS. Also FreeBSD 13.
2021-02-25Add reallocarray; this is used by the new regex code and we don't want tochristos
convert it to reallocarr so the code is kept similar with the original from FreeBSD.
2021-02-23Fix copy-paste error for heapsort(3), so that it is declared appropriately.rin
2020-06-24Regen: Add AC_MSG_RESULT yes/no to the uio checks.uwe
2020-06-24Add AC_MSG_RESULT yes/no to the uio checks.uwe
2020-06-13tools: configure --silent if MAKEVERBOSE == 0lukem
2019-06-22Bring back two lines deleted by accident. From Kamil Rytarowski.hannken
2019-06-22Update tools/compat/configure for new path of "rpc/types.h".hannken
Remove intermediate patch from rpcgen/Makefile. Patch from Nick Hudson, errors from me.
2019-06-19regen tools/compatkamil
2019-06-19Add more SunOS types to tools/compatkamil
Add fallback defintions of: uchar_t, ushort_t, uint_t, ulong_t. Needed by the libctf code on Ubuntu 16.x.
2019-06-19Add sys/uio.h & enum uio_seg, enum uio_rw to tools/compatkamil
This is needed for bootstrapping the tools on Ubuntu 16.x.
2019-05-08Fix building libprop as a host tool library on platforms that don't havethorpej
the Matt Thomas rbtree: - Include rb.c in libnbcompat, and provide a nbcompat sys/rbtree.h header. - Make sure libprop's source file include prop_object_impl.h before anything else, and pull in nbtool_config.h from there. Tested by simulating such a host system by renaming the host's <sys/rbtree.h> out of the way (which reproduced the build failure) and verifying that the host-tool installboot contained the rb_* functions in its own .text segment.
2019-01-27Restore comment accidentally lost in merge.dholland
2019-01-27Merge the [pgoyette-compat] branchpgoyette
2018-09-09Add instructions for building NetBSD on modern Solaris 11 hostspalle
2018-08-30deal with getsubopt and strncasecmp (needed by mdocml)christos
2018-08-16add strncasecmpchristos
2018-08-11Add strcasecmpchristos
2018-06-13Revert my previous config test inclusion for u_longlong_t.maya
Fixing this differently by avoiding the need for the definition. It also caused a problem in OS X, as I neglected to include a correct header
2018-06-12Move the typedefs before the header inclusions (except <features.h>) andchristos
explain why.
2018-06-11Add configure check and fallback definition for u_longlong_tmaya
Should help linux tools compilation of dtrace tools, and not affect NetBSD. From Chuck Zmudzinski in current-users, with light modification by myself.
2018-05-01Create a new bsd.hostinit.mk file and put the build definitions for all hostchristos
programs there; make all Makefiles that use bsd.hostprog.mk include it. Namely turn off MKREPRO and don't make lint, man pages, info files etc. Remove the Makefile.inc files that contained these same settings, and remove the settings from Makefile.host
2018-05-01PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler mightchristos
not support the necessary options. This is done thusly: 1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that use it and don't include bsd.own.mk. 2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc first. This will also allow us to control other tools options from a single location if we need to. XXX: pullup-8