Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2023 11:13:51 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        FreeBSD User <freebsd@walstatt-de.de>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: NanoBSD: CURRENT unable to compile 13-STABLE : error: a function definition without a prototype is deprecated ... in C
Message-ID:  <6321CA49-A38A-4FC6-A41E-E9964C2A94E3@FreeBSD.org>
In-Reply-To: <20230302064153.12940fa8@thor.intern.walstatt.dynvpn.de>
References:  <20230227192011.08f7aa8e@thor.intern.walstatt.dynvpn.de> <E2AFBCE9-4467-4E75-B7E4-4C6E0B03C0AA@FreeBSD.org> <720721A7-B1ED-405B-98EB-04A3AFCA7FD5@gromit.dlib.vt.edu> <1F3F20A1-C2BC-4A33-ABFD-D20F4ADB67E8@FreeBSD.org> <20230302064153.12940fa8@thor.intern.walstatt.dynvpn.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_7D6B2CAB-29DF-4D75-831D-54928F2872AF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 2 Mar 2023, at 06:41, FreeBSD User <freebsd@walstatt-de.de> wrote:
>=20
> Am Mon, 27 Feb 2023 23:46:21 +0100
> Dimitry Andric <dim@FreeBSD.org> schrieb:
...
>=20
> I tried to find some documentation on my CURRENT host regarding  =
"WITH_SYSTEM_COMPILER". None
> found via man src.conf, nor via make make.conf. Please delegate me to =
some place where I can
> find such infos.

Ah I was confused, WITH_SYSTEM_COMPILER is actually the default, and it
means that you want to skip building the bootstrap compiler, and just
use the host compiler. The src.conf(5) man page documents the inverse
settings instead:

     WITHOUT_SYSTEM_COMPILER
             Do not opportunistically skip building a cross-compiler =
during
             the bootstrap phase of the build.  Normally, if the =
currently
             installed compiler matches the planned bootstrap compiler =
type
             and revision, then it will not be built.  This does not =
prevent a
             compiler from being built for installation though, only for
             building one for the build itself.  The WITHOUT_CLANG =
option
             controls that.

     WITHOUT_SYSTEM_LINKER
             Do not opportunistically skip building a cross-linker =
during the
             bootstrap phase of the build.  Normally, if the currently
             installed linker matches the planned bootstrap linker type =
and
             revision, then it will not be built.  This does not prevent =
a
             linker from being built for installation though, only for
             building one for the build itself.  The WITHOUT_LLD option
             controls that.

             This option is only relevant when WITH_LLD_BOOTSTRAP is =
set.

I find the double negative phrasing "do not skip" always confusing. But
the logic is normally:

* The early phase of buildworld retrieves the versions of your host's
  compiler and linker
* It compares it against the versions in the source tree
* If the host compiler and linker are deemed "good enough", they are
  used as-is
* If the host compiler or linker are not suitable, the compiler or
  linker are bootstrapped from the source tree

But WITH_SYSTEM_COMPILER turns off all these checks and forces it to use
the host compiler, which might or might not work, depending on the
circumstances. You may have to use NO_WERROR or other tricks.


...
>> The safest solution is to let cross-tools do its thing, which will =
check
>> the host compiler, and automatically build an appropriate version of =
the
>> compiler and linker for the stable branch, if required.
>=20
> I had a misunderstanding in the terminus "cross compiling", I check =
now the build with this
> option set to be enabled.

Yes, this is a bit confusing, but in fact it *can* be a real cross
compiler, if you are targeting another architecture, for example doing
"make buildworld TARGET=3Darm64" from an x86_64 host.

And of course if you are building natively, it is 'just' a regular
bootstrap compiler.

-Dimitry


--Apple-Mail=_7D6B2CAB-29DF-4D75-831D-54928F2872AF
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZAB23wAKCRCwXqMKLiCW
ozNJAKDIVxUNAGclcU/OFW/Atzn3ER3wRwCgnHaQzdCXnSgKbrvjOpMrv+YlLjc=
=0vaP
-----END PGP SIGNATURE-----

--Apple-Mail=_7D6B2CAB-29DF-4D75-831D-54928F2872AF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6321CA49-A38A-4FC6-A41E-E9964C2A94E3>