From nobody Wed May 31 20:11:54 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 4QWgQy5DgLz4XXT1 for ; Wed, 31 May 2023 20:12:10 +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 4QWgQw6dLlz3m34 for ; Wed, 31 May 2023 20:12:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=BEGLsIii; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685563927; bh=s3zJGkgGI8tzC/4fxAIX3tK5M4zTyI9XbpqqJ+iorjo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=BEGLsIiiEiSdadLwT971l/jJsTWJDFvk4A1gRADVAIvs6lYlo9I6qtxLwlSoqBPbGrqrh5CTWVRE3XE2ImxdVoE1nqS6iOBfxIA7zZ5Qy7GHhLxx0o2HLkkEO3fb0as1SASNTTjpwBct/oedwaQKZ2OQGR9JA40rlWxbhzIIWVDmnnyVeP/aGCTZApsDTMhioWaumg0Tnz1iysbM59D/I6KZXYuWiRmcvPhpZukfOB1w+Og2MpNwopgKrPpzOYOxd/n8eFueXTeCMUTl0phNLs9ag2i+S7nUhJcMyOnVf6Ql2JMEOh1WIdn9OOAbOGXSFS75rUIGCb+wPwR4M5M6Tw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685563927; bh=6BLISYhtnk1uhqQhMRG6Yxp48cQfk8cYQ0jlSoVO4M0=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=UwG74Pv31Ww0FgsUNt4DvZ/NliZFndwJlPkuxC+nscB+yJ7KL7sHprSAjWfZKG4wIXohac6XByWp5wzqTgam6SRZGMtVwsjuV7Pi3zhF2k5T4NL1FxLwdHa8Pn1JKJbjroi5XDyyq0jYr9o46Hi6TCRYtkIZG7HLMfjSK7R9a8A8TXAnl+hQn8NgwXO31eK99LwF+xbCZVxrNybAYvUHBLNwQjtc2ZISSSplFPEzGmU8zipOJkGEN43CUuNLlDDIjkwtcT4QInUTeypP+vwJ16IHBd2RRAtZRxTZ7npDoolBL4uLfYt78qgo3XMe3f6NWnnHkfQUmOHm/W8DxTYKPA== X-YMail-OSG: 8Do11ooVM1mSP6Ko9WmgY3eOCgadlfLl8NoFX6QPI9B69vcUbDcoaail2RpWh3H 92ymNQYkRPoPJPQ.EvoemX8gwvLPViCJy6QuZynbqETc0uZEZ_uYnjDTRZmUxZDlmlmX9Qk4PLkm ajDId_qvJYcCEONDK5g833u5ByFjl3_kyCHOBQxLRj8nL9PS18R1nS5E1I0NjETFKAvJZcDB29Qp x2ZWrNUUGrslTDg4Srhn.v2nX4C.pcmtEomGh6VTVwLODvPh8tpUgw1IY4veRbjHKBdL12L.HMaf Soml.6mg5dVwCjZPuHro25ey5ZIc0ABcnFu70qW4iIsGvHExldedMV8kSdxorLWlrbw0fAYNP2.g JpZy_J1sLXvlbvQdtJmVqVNwHHJf.fEERoR0COmiUGoowPkudTj7qEDXt91E0xUZ7842pcthh.oR oRUjORWiBTK9.KnIAyt_v31zaHhiI0HewzehSrxyDu6jiTX.3XHY3sTpKaKqmSScwzmSJTY2asoE .K9etG2zzubqLUuB446scuWL3w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zT4kDhZfePb09Vfm8hwHMAx1 ns5RCbrc3kvOraVU.FKtASJlDxjn53oo3NgzGGFtUrbt3oJD8XfUmlzdS1dah5kj99R2g0xy4aaE 6MBKofA1zprt1xR3hUmmbrnp42DeQw2beoP6E7aE2CYuzy7MpMIcwc0ncwH1lHrIeldXX55q6MQ7 kTw.LIkzwyCOEM4i31J7RrrV13ug17CqCwW3NYU6OhVGz4.k6Jo.cMFxbmuN.6mtTWswyIZW8pvn mRq6nUgpR55TCRbTsz7F_Lz6BegSgHHyTWIykDq46AP._jV98jbW3fCn8GUmtmBIWpSbJrPpmycH hCOfoQFuWJH4yCLLLctmA2QioX9KkJe6qEMfGpQxlClGvJk.xMx4SDQuO2Cot0qSQBABSQK51wSD 9a2uqUSID9fpodD4GaZjEz2YsZJX.dWcYfxJyhbdQ6P.d52pPsktYzFfRLzx0MsKHrW4wVgBgHM2 C50iomTOQqJANn6Dg69qFSAdIR2PIQpvGrXQeeqW.EM9QihGZRDnVhLdvhjhI2T9mSqSpYUn.AFH mEIXt6VaO0BTpwEvBwei_4YBCLS8oRq461E24YIFrTN1EfVbecFmKkt2DZpFvyvZp5uwoMgCSmZt vIZDyDI6q_W9ydfwWHs2ER1g3bZuBaAfj6uFYU0l6vRB1xy9zdhrZyqgoc_OlwKaoOrdX2RnZ5ct W X-Sonic-MF: X-Sonic-ID: 59fcbc93-7ad7-42a1-81f4-943c6efbe349 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 May 2023 20:12:07 +0000 Received: by hermes--production-gq1-6db989bfb-z7s2g (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a7afc5692c6c146dc448b5e7ebc1d9b8; Wed, 31 May 2023 20:12:05 +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: <2911C643-03A4-4976-AF9B-4DE1A143A28E@yahoo.com> Date: Wed, 31 May 2023 13:11:54 -0700 Cc: freebsd-arm , kevans@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6F740EDE-9FF0-4CC4-B3BC-767692F2FA4F@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> <2911C643-03A4-4976-AF9B-4DE1A143A28E@yahoo.com> To: =?utf-8?B?Sm9zw6kgUMOpcmV6?= X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [-2.37 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.87)[-0.865]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.147:from]; BLOCKLISTDE_FAIL(0.00)[98.137.65.147:server fail]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.147:from] X-Rspamd-Queue-Id: 4QWgQw6dLlz3m34 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On May 31, 2023, at 11:11, Mark Millard wrote: > On May 31, 2023, at 06:11, Jos=C3=A9 P=C3=A9rez wrote: >=20 >> Hi, >=20 > Hello. >=20 >> 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 >=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 > # >=20 > So: with -std=3Dc99 added your command works fine. But using -std=3Dc11 = (even implicitly) > does not: >=20 > # 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); > | ^~~~~~~~~~~~~~~~~~~~~ >=20 > 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. >=20 > Is use of -std=3Dc99 inappropriate to your purpose? Do > you need to use c11 (or later)? >=20 I will note that newlib's NEWS file: = https://sourceware.org/git/?p=3Dnewlib-cygwin.git;a=3Dblob;f=3Dnewlib/NEWS= ;h=3Dee456f9b8a25ea96d31013383b1ad56eed6afa03;hb=3DHEAD mentions C99 various times over the years, but never mentions any of C11, C17, or C23. Looking at the materials, they appear to be incoherent for things added/changed by C11 and later. Overall: it looks like C11 and later are just not supported upstream. =3D=3D=3D Mark Millard marklmi at yahoo.com