aboutsummaryrefslogtreecommitdiff
path: root/tools/build/cross-build/include/common/sys
Commit message (Collapse)AuthorAgeFilesLines
* cdefs.h: Introduce __nonstring attributeAlex Richardson7 days1-0/+8
| | | | | | | | | | This attribute can be used to annotate char arrays that are not supposed to be terminated with a NUL char and is needed to silence clang's new -Wunterminated-string-initialization warning. The name matches linuxkpi. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52565
* cross-build: Define __GNUC_PREREQ__ in cdefs.hMark Johnston2025-10-081-0/+10
| | | | | | | | | This is required when including stdckdint.h and doesn't seem to be provided by older clang. Reviewed by: emaste Fixes: 7233893e9496 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray") Differential Revision: https://reviews.freebsd.org/D52933
* cross-build: provide exterr.h and sys/exterrvar.h for non-FreeBSD hostsKonstantin Belousov2025-07-101-0/+6
| | | | | | | | | with enough glue to make libc/gen/err.c compilable. Reported by: jhb Reviewed by: jhb, jrtc27 Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51217
* tools/build: Provide extra headers on non-FreeBSDJessica Clarke2025-06-161-0/+3
| | | | | | These will be needed by future changes to continue to allow building makefs as a bootstrap tool on Linux and macOS. This also requires defining __sbintime_t in our cross-build sys/_types.
* cross-build: fix missing <sys/md4.h> the proper wayKyle Evans2024-10-181-91/+0
| | | | | | | | | | Add it to tools/build/Makefile with a short note of where it's needed, rather than hamfistedly copying it into the tools/build hierarchy. Reported by: jrtc27 Reviewed by: jrtc27 Fixes: aad507854efd13c43 ("Fix the cross-build after recent commits") Differential Revision: https://reviews.freebsd.org/D46854
* Fix the cross-build after recent commitsKyle Evans2024-09-301-0/+91
| | | | | | | | | | | - Provide a sys/md4.h in the cross-build environment to fix bootstrap of libmd. - flua now exposes WTRAPPED which isn't incredibly common- make it conditional, we probably won't be using it in any bootstrap context any time soon. Fixes: 442e0975ee4b3 ("Consolidate md4 implementations written in C") Fixes: c2caf3b3313fe ("flua: posix: add more useful functions [...]")
* cross: Move Solaris API64 defines to commonVal Packett2024-05-241-0/+3
| | | | | | | | | off64_t is needed for both Linux (musl) and MacOS, so move them to the common area. Somehow glibc provides the definition, but defining it doesn't hurt and hels in the musl case. Reviewed by: allanjude, jrtc27 Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
* tools/build: Provide sys/linker_set.h when cross-buildingJessica Clarke2023-12-131-0/+13
| | | | | | | | | | This is needed for kldxref, which will shortly become a bootstrap tool. Linux can use the same one as FreeBSD (provided the cross-building sys/cdefs.h is augmented appropriately), whilst macOS needs its own Mach-O-specific implementation. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D43049
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1611-22/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Revert "tools/build: Unbreak bmake bootstrap on Linux"Jessica Clarke2023-01-291-8/+0
| | | | | | | Now that make.py no longer has the described hack on Linux we can drop this ugly workaround. This reverts commit fba998a3d897e6297baca74068e4ec1db7adaeec.
* tools/build: Unbreak bmake bootstrap on LinuxJessica Clarke2022-08-221-0/+8
| | | | | | | | | | | | Currently make.py has a hack to add the cross-build headers to the include search path when bootstrapping bmake on Linux (but not macOS). This is a bit of an abuse of these headers, and e9ba1fd5eda2 was not prepared for this, since sys/bitcount.h won't exist in that instance (it gets copied into WORLDTMP during the legacy build). Work around this until we can wean the bmake bootstrap off using these headers by not including sys/bitcount.h when it doesn't exist. Fixes: e9ba1fd5eda2 ("tools/build: Provide FreeBSD's bitstring API when cross-building")
* tools/build: Provide FreeBSD's bitstring API when cross-buildingJessica Clarke2022-08-181-0/+4
| | | | | | | | | This is needed for building makefs as a cross-tool since the ZFS code uses these APIs. Reviewed by: emaste Fixes: 240afd8c1fcc ("makefs: Add ZFS support") Differential Revision: https://reviews.freebsd.org/D36133
* cross-build: Add __weak_symbol definition for libdwarf bootstrapJessica Clarke2021-12-151-0/+3
| | | | | Fixes: 3aa0bc89c6a1 ("libdwarf: Add a weak uncompress() symbol") MFC after: 1 week
* Fix cross-builds after 4e5d32a445f90d37966cd6de571978551654e3f3Jose Luis Duran2021-09-071-0/+19
| | | | | | | Add alignment macros to cross-build's sys/cdefs.h Pull Request: https://github.com/freebsd/freebsd-src/pull/531 MFC after: immediately (build fix)
* Allow bootstrapping llvm-tblgen on macOS and LinuxAlex Richardson2021-08-021-0/+6
| | | | | | | | | | This is needed in order to build various LLVM binutils (e.g. addr2line) as well as clang/lld/lldb. Co-authored-by: Jessica Clarke <jrtc27@FreeBSD.org> Test Plan: Compiles on ubuntu 18.04 and macOS 11.4 Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D31057
* Fix warnings during bootstrap on Linux systemsAlex Richardson2021-01-072-24/+26
| | | | | Most warnings are currently off for the boostrap phase, but once D27598 lands they will be enabled again.
* Fix more -Wundef warnings during bootstrapAlex Richardson2020-10-141-5/+0
| | | | Notes: svn path=/head/; revision=366699
* Fix dtrace tools bootstrap on non-FreeBSD after OpenZFS importAlex Richardson2020-09-192-51/+8
| | | | | | | | | | | | This required surprisingly few build system changes and only two changes to the openZFS compat headers which have been upstreamed as https://github.com/openzfs/zfs/pull/10863 Reviewed By: #zfs, freqlabs Differential Revision: https://reviews.freebsd.org/D26193 Notes: svn path=/head/; revision=365901
* Add Linux/macOS compatibility system headers to tools/build/cross-buildAlex Richardson2020-08-2512-0/+813
These headers are required in order to build the bootstrap tools on macOS and Linux. A follow-up commit will add implementations of functions that don't exist on those operating systems to -legacy when bootstrapping. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D14316 Notes: svn path=/head/; revision=364757