Commit Graph

1464 Commits

Author SHA1 Message Date
palle 6042d5e3e5 Update build instructions for Solaris 10 hosts 2023-09-02 18:45:48 +00:00
palle ce4c8804b1 Update build instructions for Solaris 11.3 hosts 2023-08-24 19:30:48 +00:00
palle 8ff2783e9b Update build instructions for Solaris 11.3 hosts 2023-08-23 19:09:53 +00:00
rin f97ac75017 gdb/mknative: Preset yes to rename(2) checks
It must be better to have this workaround here, rather than in external.
(Thanks uwe@ for suggestion!)

Confirmed that the same files generated as before.
2023-08-20 02:30:58 +00:00
rin 4ff1013c35 tools/gdb: Drop working dir for mknative from generated files
Migrate -I${.OBJDIR}/.native/include from CPPFLAGS to CCADDFLAGS for
this purpose.

No binary changes for native binaries as far as I can see.
2023-08-17 07:54:10 +00:00
rin ab9092b155 tools/gdb: Sprinkle --enable-obsolete for ia64 :( 2023-08-17 05:35:09 +00:00
christos 95f204a973 override the override 2023-08-15 19:56:07 +00:00
palle deca08f38b Update build instructions for Solaris 10 and Solaris 11.3 hosts 2023-08-15 19:13:12 +00:00
christos 37060aa12c backout previous; cross build needs native gmp 2023-08-14 22:41:34 +00:00
palle c25779f438 Update build instructions for Solaris 11.4 (CBE) hosts 2023-08-14 18:49:45 +00:00
christos 982170f0be fix cross-gdb 2023-08-14 16:45:26 +00:00
christos c7cb6a1257 jump through hoops to make the native build find gmp for gdb. 2023-08-09 18:57:04 +00:00
christos 9eceabbe08 mknative support for gdb-13.2 2023-07-31 17:09:59 +00:00
mrg e374a119f0 updates for GCC 12 (relatively tiny).
- gcov-iov.h is now called version.h and we build it directly.
- need to explicitly ask for bversion.h gtyp-input.list to be built.
2023-07-31 01:48:37 +00:00
palle 2c5ae00c27 Update build instruction for Solaris 11.4 (CBE) hosts 2023-07-30 19:03:50 +00:00
mrg e791292b6c mark our GCC 12 as "nb1 20230729". 2023-07-30 06:36:21 +00:00
mrg 0e63a0ec09 gcc 10 is now in gcc.old, make mknative-gcc.old gcc-10 happy. 2023-07-28 08:05:29 +00:00
lukem dac4cd245f tools/compat/compat_defs.h: improve NAME_MAX compat
Move the NAME_MAX workaround to the <limits.h> section,
and don't assume that _XOPEN_NAME_MAX is available.
2023-07-21 22:05:04 +00:00
lukem 569efedda5 tools/compat: regen 2023-07-20 16:22:30 +00:00
lukem 4815827f69 tools: binstall can use posix_spawn() instead of vfork() 2023-07-20 16:21:23 +00:00
lukem 307596b164 tools/make: regen 2023-07-20 15:20:00 +00:00
lukem a08c7a13b0 tools/compat: regen 2023-07-20 15:18:34 +00:00
lukem 54f2e3827e tools/make: build with -Wno-deprecated-declarations
Use NB_CHECK_CC_FLAG() from ../tools/compat to determine
if the compiler supports -Wno-deprecated-declarations.
Avoids sooking about vfork() on macOS.
2023-07-20 15:16:44 +00:00
lukem 27a8da3b8e tools/compat: provide nb_check_cc_flag.m4
Implement m4 macro NB_CHECK_CC_FLAG(FLAG, [VAR=FLAG_DERIVED])
	Determine if the C compiler supports FLAG,
	and sets output variable VAR to FLAG if FLAG is supported.

	If VAR is not provided, default to FLAG_DERIVED, which is
	FLAG converted to upper-case and all special characters
	replaced with "_", and the result prepended with "CC_".
	FLAG_DERIVED is appended to the m4 macro NB_CHECK_CC_FLAG_VARS.
	E.g., if FLAG is "-Wexample=yes", FLAG_DERIVED is "CC_WEXAMPLE_YES".

This is implemented in separate buildaux/nb_check_cc_flag.m4,
based on configure's NB_CC_FLAG(), but supports VAR override.

Adapt configure from internal NB_CC_FLAG() to NB_CHECK_CC_FLAG().

(Note: AX_CHECK_COMPILE_FLAG() from autoconf-archive could be enhanced
to support the clang and gcc workarounds I've implemented here.)
2023-07-20 15:15:23 +00:00
lukem c75b14aa91 tools/make/buildmake.sh: fix quoting
autoconf 2.69 generates @DEFS@ with definitions with
quoted embedded spaces, so rework how docmd() is invoked
to avoid weird quoting issues.

As part of this, remove all the shell variables containing @var@
and just use @var@ directly.
2023-07-20 15:13:27 +00:00
lukem 8a8613b19b tools/make/configure.ac: style tweaks
Consistently use () in zero argument macro calls.
Display results at end.
2023-07-20 15:12:36 +00:00
palle aac8d61cf7 Update build instructions for Solaris 11.4 hosts: specify HOST_SH and note standards 2023-07-16 18:09:54 +00:00
mrg 1b78493458 bump gcc 10 version. 2023-07-11 18:13:27 +00:00
rin 701412968e host-mkdep(1): Add support for -iquote.
Not used yet, but may eventually replace deprecated -I-, both for
GCC and clang.
2023-07-10 08:55:44 +00:00
palle 4fb0058c93 Add support for missing NAME_MAX when building on Solaris hosts 2023-07-08 19:10:00 +00:00
palle fcbcc39cb9 Update build instruction for Solaris 11.4 hosts 2023-07-05 16:26:29 +00:00
christos 53d5df7bf7 PR/57500: Palle Lyckegaard: include missing tools/compat/regex.h for
__{BEGIN,END}_DECLS.
2023-07-03 18:50:42 +00:00
lukem cf9c9d4dc8 tools: revert use of <bsd.hostinit.mk>
tools/Makefile.host revision 1.35 changed from
  setting various NOxxx variables and .include <bsd.own.mk>
to
  .include <bsd.hostinit.mk>
which sets the same NOxxx variables, .include <bsd.init.mk>
which optionally .include ../Makefile.inc before .include <bsd.own.mk>.

This chnage caused build failures with HAVE_LLVM=yes, so revert rev 1.35.
(Maybe to do with the .include ../Makefile.inc. The tools/llvm* build is
tricky, and it's easier to revert this change than debug.)
2023-06-04 16:53:59 +00:00
lukem 333a9a00e1 tools: use <bsd.hostinit.mk> where appropriate
bsd.hostinit.mk sets a bunch of NOxxx variables before
including bsd.init.mk (which includes bsd.own.mk),
so simplify instead of replicating the NOxxx setup
for host tools.
2023-06-04 10:00:20 +00:00
lukem 869cdbbd1c regen 2023-06-03 09:18:14 +00:00
lukem 97766c5b60 tools/compat: support all bsd.own.mk disabled warnings
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-03 09:10:13 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
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-06-03 09:09:01 +00:00
lukem a25022c648 tools: use NONLS= not MKNLS=no 2023-06-02 20:47:27 +00:00
hgutch d9afbe107f Fix LLVM build with host gcc 13
Building LLVM with a host gcc 13 fails and suggests including <cstdint>
in external/apache2/llvm/dist/llvm/include/llvm/Support/Signals.h .
Instead of this, joerg@ suggested not modifying the llvm vendor branch
but instead working around this in our LLVM build infrastructure.
2023-05-30 19:05:04 +00:00
lukem 39d234c9f0 tools/compat: regen 2023-05-30 19:04:42 +00:00
lukem 8d651401a4 tools/compat: disable host CC warnings
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-30 18:54:21 +00:00
lukem 2356d03a18 tools/compat: detect supported host compiler flags
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-30 18:39:19 +00:00
lukem 69c1db2ad0 tools/compat: import AX_CHECK_COMPILE_FLAG
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-30 18:35:16 +00:00
lukem c578bb77d2 tools/compat: don't expose HAVE_PTHREAD_H to make
Non of the tools Makefiles needs HAVE_PTHREAD_H, so don't
AC_SUBST it or provide in defs.mk.
2023-05-30 18:31:55 +00:00
lukem f7d6f1b13f tools/compat: use autoreconf, support MAKEVERBOSE
Use autoreconf instead of autoconf + autoheader;
we'll need aclocal in the near future.

If MAKEVERBOSE >= 2, add -v to autoreconf.
2023-05-30 18:27:04 +00:00
lukem e6c216806f tools/compat: regen 2023-05-29 21:34:57 +00:00
lukem 2ec2a2d759 tools/compat/configure.ac: style tweaks
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-29 21:30:42 +00:00
lukem 0589c2d76d tools/compat: regen for dispatch_semaphore_create 2023-05-23 20:22:11 +00:00
lukem 55152776e1 tools/compat: MAKEVERBOSE support in regen 2023-05-23 20:20:54 +00:00
lukem 6eddcd88c5 ctfmerge: fix macOS semaphore implementation
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.
2023-05-23 19:53:24 +00:00