Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2023 05:27:05 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        =?utf-8?B?Sm9zw6kgUMOpcmV6?= <fbl@aoek.com>
Cc:        freebsd-arm@freebsd.org, kevans@freebsd.org
Subject:   Re: devel/arm-none-eabi-newlib headers inconsistencies (not functional) or am I misusing something?
Message-ID:  <8A93F4D2-4FDA-4C3D-8FA3-2D72DAD06A8B@yahoo.com>
In-Reply-To: <232dc6e4e0d3b5f3abcd37049db0991b@mail.yourbox.net>
References:  <11a941a3a1c9e001559ccc6183af131d@mail.yourbox.net> <784313c52e2f42eb63f3755a5c093fdc@mail.yourbox.net> <9E888138-D3D0-4A6C-92B9-31705D470089@yahoo.com> <232dc6e4e0d3b5f3abcd37049db0991b@mail.yourbox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 27, 2023, at 04:21, Jos=C3=A9 P=C3=A9rez <fbl@aoek.com> wrote:

> El 2023-05-27 12:18, Mark Millard escribi=C3=B3:
>>> should be fixed or is it ok
>>> to leave it as it is now?
>> Leave it as it is.
>=20
> Ok.
>=20
>> You need
>> /usr/local/lib/gcc/arm-none-eabi to be first (or
>> the only entry).
>=20
> If I force the search path to use /usr/local/arm-none-eabi/include
> only, it does not work:
> % arm-none-eabi-gcc -nostdinc -I/usr/local/arm-none-eabi/include =
break_arm.c
> In file included from /usr/local/arm-none-eabi/include/stdio.h:35,
>                 from break_arm.c:1:
> /usr/local/arm-none-eabi/include/sys/cdefs.h:45:10: fatal error: =
stddef.h: No such file or directory
>   45 | #include <stddef.h>
>      |          ^~~~~~~~~~
> compilation terminated.

Interesting that devel/arm-none-eabi-newlib would be
incomplete in its file coverage. But its use of
stddef.h from gcc is probably just fine (for now).
(Language standard update tracking could change
that someday if material that is used is moved
between headers by the standard.)

> If I add arm gcc port paths AFTER newlib path, it works:
> % arm-none-eabi-gcc -nostdinc -I/usr/local/arm-none-eabi/include =
-I/usr/local/lib/gcc/arm-none-eabi/11.3.0/include =
-I/usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed -c break_arm.c =
&& echo done
> done
>=20
> Shall the include path be swapped in the arm gcc port?

No. Ports like sysutils/u-boot-rpi2 would end up using
devel/arm-none-eabi-newlib when it happens to be installed
-- but should not use devel/arm-none-eabi-newlib. The order
is correct for the 30+ ports that use devel/arm-none-eabi-gcc
already. You should not change what happens for those ports.

> We shall also evaluate whether the system defaul /usr/include shall
> be left as a last resort or not.

This removal might be valid, I do not know. None of
the ports that use devel/arm-none-eabi-gcc should
actually find or use any files from the /usr/include/
tree. If some purpose needed /usr/include/ , it could
use the command line to get the search path it needs.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A93F4D2-4FDA-4C3D-8FA3-2D72DAD06A8B>