From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.1 required=3.0 tests=BAYES_00,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!tmr9BI+uueYJMT3TC5a5oA.user.46.165.242.75.POSTED!not-for-mail From: Fernando Oleo Blanco Newsgroups: comp.lang.ada Subject: Re: Help: Ada in NetBSD Date: Mon, 30 Aug 2021 10:14:05 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <16242b6e-cfb6-4fb1-8f7f-566469de446an@googlegroups.com> <7b5879f1-6d8a-46d7-b761-82c9cf483984n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="60877"; posting-host="tmr9BI+uueYJMT3TC5a5oA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.3 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:62582 List-Id: On 30.08.21 00:08, Stephane Carrez wrote: > Hi! > > The reason for the symbol change is some NetBSD libc change in the signature of some system calls. > Some information in: http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/lib/libc/README Thank you very much for the link. It does explain quite a few things > Simon is right, the symbol used by the Ada import statement must be renamed. > The __gettimeofday50 is the new function signature while _gettimeofday is the old one. > The gettimeofday is the weak alias to _gettimeofday and produces the warning. > > Beware that the symbol name that you specify for some import statement is platform specific. > Having a different symbol names for NetBSD is quite common. However, I still would say that is not right. Here is my reasoning/arguments: - All programs would have to be corrected just for NetBSD if the linker does not do the alias translation automatically. - I think the linker is doing the aliasing correctly, meaning, that any program that references such functions directly, get linked correctly to the actual implementation. After all, the alias is just another identifier for the actual function. - The linker does not complain when linking these files during the compilation of GCC. - JMarino's gcc6-aux does not use an special identifier. It also uses the "normal" function name directly and it compiles and works. See: https://github.com/NetBSD/pkgsrc/blob/27a8f94efc02f33007d20a4ba6a8aaa369361b95/lang/gcc6-aux/files/diff-ada#L1584 for another function that gets "renamed". It just works. The last point is what makes me _very_ hesitant about this issue. Why would it work for JMarino's gcc and not mine? I have compiled JMarino's port in the same system. I may be missing some other fix in some other part... Anyhow, for the time being, I want to get this working. I will try this fix and see if it solves the issue. > Thanks for the link to the NetBSD git sources, I'm trying to build and keep you informed in my progress :-) > > Stephane > Great! Regards, -- Fernando Oleo Blanco https://irvise.xyz