From nobody Wed May 31 18:11:07 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QWcld2Bt3z4XM2x for ; Wed, 31 May 2023 18:11:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QWclc5Wwsz3FSW for ; Wed, 31 May 2023 18:11:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685556682; bh=GdqXsiC+HvB0Zo8xHvT8udAcsxocNDxrlCHgdFySp5o=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=k6ZZzWYMx6iOufHfVi9HyBibK4HUoHJkcXlakxBTHzJTKziFZClBAV4UGPM33P3VZfqgqjMWmYuUQOJ8WkoaDOthG36P507gees6xuEk/uwMv57RIzWWN5hbzi+/X647cW6OZ/9aAAB7HUiNtKkYoIgwO/W1lPMCQNWj+P7BqDP0H5bJQtqB1NWVq2+JHujSbMvMti7gxiZZEunkM805V8K5xEwWcUjBj6zvH1P/zp66uB7NdIGpj2/fuklZ3Xi5rFKB/70RMXH6IMhEP8JhEu2+CHkGDhGeuZuTbW8K5UXAk0hHWW43iOXYi19tqbxQUL66I5vyBmyA/uozxoqIsA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685556682; bh=OAWsG3vBAEiyq/pdHmPLB8zTPphw4Z0VFBhjnl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WbIcmSvf_._tYtCceiNrHr.FD4gI77Xp9WE_VXdUv2ZoKQKtC. JuhDizKng84kU_05W_XPsqckcdKWYIP2kqhnK07rzedhgvLOU6_pdOvGkNeaNS1.Xzud.GQokLDd aaGECUSgwd2lcupqS.pmJVlZZ94B3ETNYjnd5birtoPXeX5y6GvBzFaaPA_uo1P2gnxDpPNOroQ. iKdFngbyWvt3Gqn94dJc5htFfsYqNWYqzB54R23KU44wIw.KYjQhqluQyAYmhxK8CENf8GN7UvPE Z6k6vdLwSpXrHn8l60iyN3cndL2SezR8dNyq3t7dG2Jp8er7T4B_s_8ds6rj77tnZALXDqPFMAqJ 34L6.gSNRcaS4NL7Oe7woAF3Mh5PAbb9ICb5fTwfXok0xQM._.LrvhLvisHHhU.ZTztqJM9qkHAc 9QV.u_y5cQe_LZ3GJFD8X0WTPzl5CxeyYWrEIrIIrMz4D5_.f1rXD6kGVgoNbJTv.Fw871dq0lZI zAAlrlrEG34yuEg1Qh5.W_m4FRNtANQAvYOQcBmqiBeyIY4zJEN2GGunGyVDTzhBDrHDYhrVu7xM - X-Sonic-MF: X-Sonic-ID: 5c65ce85-0189-4a7a-a359-6a893fe9c933 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 May 2023 18:11:22 +0000 Received: by hermes--production-ne1-574d4b7954-r69wt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2e30660094ab18c6bf6ff7d1b15a878e; Wed, 31 May 2023 18:11:20 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: devel/arm-none-eabi-newlib headers inconsistencies (not functional) or am I misusing something? From: Mark Millard In-Reply-To: <65ed005700693855d4b0bc689aef0cc0@mail.yourbox.net> Date: Wed, 31 May 2023 11:11:07 -0700 Cc: freebsd-arm , kevans@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2911C643-03A4-4976-AF9B-4DE1A143A28E@yahoo.com> References: <11a941a3a1c9e001559ccc6183af131d@mail.yourbox.net> <784313c52e2f42eb63f3755a5c093fdc@mail.yourbox.net> <9E888138-D3D0-4A6C-92B9-31705D470089@yahoo.com> <232dc6e4e0d3b5f3abcd37049db0991b@mail.yourbox.net> <8A93F4D2-4FDA-4C3D-8FA3-2D72DAD06A8B@yahoo.com> <572F38A8-67ED-4A77-A5EC-C431141BF386@yahoo.com> <65ed005700693855d4b0bc689aef0cc0@mail.yourbox.net> To: =?utf-8?B?Sm9zw6kgUMOpcmV6?= X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QWclc5Wwsz3FSW X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 31, 2023, at 06:11, Jos=C3=A9 P=C3=A9rez wrote: > Hi, Hello. > El 2023-05-27 15:21, Mark Millard escribi=C3=B3: >> On May 27, 2023, at 05:27, Mark Millard wrote: >> It is unclear what you are doing for linking. >=20 > Linking is another chapter that will be written after we can obtain = objects. >=20 > For the time being I am buinding a number of tests to see if the = headers are functional or not, following your suggestion to add newlib = ports header path first, and then arm-noabi-gcc header paths. I.e. > #include <...> search starts here: > /usr/local/arm-none-eabi/include > /usr/local/lib/gcc/arm-none-eabi/11.3.0/include > /usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed > End of search list. >=20 > In this scenario the next problem I am hitting is this one: > % arm-none-eabi-gcc test_stdatomic.c -c -g -DDEBUG -pipe -nostdinc = -isystem /usr/local/arm-none-eabi/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed -o = test_stdatomic.o > In file included from test_stdatomic.c:2: > /usr/local/arm-none-eabi/include/stdatomic.h: In function = 'atomic_flag_test_and_set_explicit': > /usr/local/arm-none-eabi/include/stdatomic.h:386:17: error: request = for member '__val' in something not a structure or union > 386 | return (atomic_exchange_explicit(&__object->__flag, 1, = __order)); > | ^~~~~~~~~~~~~~~~~~~~~~~~ > /usr/local/arm-none-eabi/include/stdatomic.h: In function = 'atomic_flag_clear_explicit': > /usr/local/arm-none-eabi/include/stdatomic.h:393:9: error: request for = member '__val' in something not a structure or union > 393 | atomic_store_explicit(&__object->__flag, 0, __order); > | ^~~~~~~~~~~~~~~~~~~~~ >=20 > % cat test_stdatomic.c > #include > #include >=20 > int main(int argc, char *argv[]) { > return 0; > } >=20 > Any suggestion before I patch = /usr/local/arm-none-eabi/include/stdatomic.h to make it work? >=20 # arm-none-eabi-gcc -std=3Dc99 test_stdatomic.c -c -g -DDEBUG -pipe = -nostdinc -isystem /usr/local/arm-none-eabi/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed -o = test_stdatomic.o # So: with -std=3Dc99 added your command works fine. But using -std=3Dc11 = (even implicitly) does not: # arm-none-eabi-gcc -std=3Dc11 test_stdatomic.c -c -g -DDEBUG -pipe = -nostdinc -isystem /usr/local/arm-none-eabi/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include -isystem = /usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed -o = test_stdatomic.o In file included from test_stdatomic.c:2: /usr/local/arm-none-eabi/include/stdatomic.h: In function = 'atomic_flag_test_and_set_explicit': /usr/local/arm-none-eabi/include/stdatomic.h:386:17: error: request for = member '__val' in something not a structure or union 386 | return (atomic_exchange_explicit(&__object->__flag, 1, = __order)); | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/arm-none-eabi/include/stdatomic.h: In function = 'atomic_flag_clear_explicit': /usr/local/arm-none-eabi/include/stdatomic.h:393:9: error: request for = member '__val' in something not a structure or union 393 | atomic_store_explicit(&__object->__flag, 0, __order); | ^~~~~~~~~~~~~~~~~~~~~ Note that c11 added builtin atomics. It appears that devel/arm-none-eabi-newlib does not yet correctly handle such contexts, at least for what arm-none-eabi-gcc provides relative to c11. Is use of -std=3Dc99 inappropriate to your purpose? Do you need to use c11 (or later)? =3D=3D=3D Mark Millard marklmi at yahoo.com