aboutsummaryrefslogtreecommitdiff
path: root/tools/build/cross-build
Commit message (Collapse)AuthorAgeFilesLines
* cross-build: fix some redeclaration warnings during bootstrapAlex Richardson2021-10-115-13/+6
| | | | MFC after: 3 days
* cross-build: Remove redundant lines.Warner Losh2021-10-102-4/+0
| | | | | | | | | There's two identical gid_from_group lines in a row. We only need one. Ditto for uid_from_user(). Sponsored by: Netflix Reviewed by: bapt, jrtc27 Differential Revision: https://reviews.freebsd.org/D32442
* 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)
* tools/build/cross-build: Fix building libllvmminimal on LinuxJessica Clarke2021-08-123-0/+133
| | | | | | | | | | There is a __used member in glibc's posix_spawn_file_actions_t in spawn.h, so we must temporarily undefine __used when including it, otherwise Support/Unix/Program.inc fails to build. This is based on similar handling for __unused in other headers. Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux") MFC after: 1 week
* 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
* tools/build: Don't redefine open() for the linux bootstrapAlex Richardson2021-08-021-21/+4
| | | | | | | | | | | This is needed to bootstrap llvm-tblgen on Linux since LLVM calls `::open(...)` which does not work if open is a statement macro. Also stop defining O_SHLOCK/O_EXLOCK and update the only bootstrap tools user of those flags to deal with missing definitions. Reviewed By: jrtc27 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31226
* Change strmode argument type to mode_t for crossbuildAlfonso Gregory2021-06-291-1/+1
| | | | | | | To match the libc changes. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493
* Silence a macro-redefined warning when crossbuildingAlex Richardson2021-03-011-0/+2
| | | | | This is already defined by the ncurses headers, so just undef it before defining it again.
* Fix cross-build support for Ubuntu 16.04Jessica Clarke2021-01-231-1/+9
| | | | | | | | | Older glibc headers did some very nasty things that have since been sanitised. We could also fix this by adding a linux/getopt.h wrapper alongside the existing common/getopt.h that #undef's __need_getopt, but that seems a little more hacky and complicated. Reviewed by: arichardson
* Fix warnings during bootstrap phase on macOSAlex Richardson2021-01-071-1/+1
|
* Fix warnings during bootstrap on Linux systemsAlex Richardson2021-01-0710-63/+66
| | | | | 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-195-51/+17
| | | | | | | | | | | | 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 necessary Makefile.inc1 infrastructure for building on non-FreeBSDAlex Richardson2020-08-252-0/+49
| | | | | | | | | | | | | | | | | | | | The most awkward bit in this patch is the bootstrapping of m4: We can't simply use the host version of m4 since that is not compatible with the flags passed by lex (at least on macOS, possibly also on Linux). Therefore we need to bootstrap m4, but lex needs m4 to build and m4 also depends on lex (which needs m4 to generate any files). To work around this cyclic dependency we can build a bootstrap version of m4 (with pre-generated files) then use that to build the real m4. This patch also changes the xz/unxz/dd tools to always use the host version since the version in the source tree cannot easily be bootstrapped on macOS or Linux. Reviewed By: brooks, imp (earlier version) Differential Revision: https://reviews.freebsd.org/D25992 Notes: svn path=/head/; revision=364760
* Add missing FreeBSD functions to -legacy when building on macOS/LinuxAlex Richardson2020-08-257-0/+585
| | | | | | | | | | | | | | | | In most cases this simply builds the file from lib/libc for missing functions (e.g. strlcpy on Linux etc.). In cases where this is not possible I've added an implementation to tools/build/cross-build. The fgetln.c/fgetwln.c/closefrom.c compatibility code was obtained from https://gitlab.freedesktop.org/libbsd/libbsd, but I'm not sure it makes sense to import it into to contrib just for these three bootstrap files. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D25978 Notes: svn path=/head/; revision=364759
* Add Linux/macOS compatibility system headers to tools/build/cross-buildAlex Richardson2020-08-2566-0/+3849
| | | | | | | | | | | | 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
* Allow building mkimg as cross-toolSimon J. Gerraty2017-03-032-0/+38
| | | | | | | | | | | | For linux the mmap offset must also be page aligned, and we need to disable macros like __FBSDID() Change the linux osdep_uuidgen() to use more portable gettimeofday(). Reviewed by: marcel Notes: svn path=/head/; revision=314577
* Add hacks that I use to test cross-builds (by building onRuslan Ermilov2005-03-023-0/+19
native and foreign architectures and comparing products). They eliminate most of the differences caused by different object directory paths, timestamping, and identification. (Note WORLDTMP was renamed to ${OBJTREE}${.CURDIR}/tmp.) Notes: svn path=/head/; revision=143044