The tasking system is not working correctly (I have been testing the
compiler with the ACATS test suite provided by Simon).
Hi!
On NetBSD there are several symbols that are replaced by the virtue of including a C header.
If you include correctly the C header, the correct symbol is used and you don't get the linker warning.
For gettimeofday the symbol is replaced by __gettimeofday50.
These symbols are marked with __RENAME(XXX) macros in the C headers.
I would suggest to have a look at the .o files to find out the one that has the `gettimeofday` symbol that is not replaced.
By the way, I'm intertested by your work as I'm still stuck on gcc 6 for my NetBSD machines.
20 years ago I wrote the 68HC11 port that was integrated in GCC 3.3 so I have some past experience in working with GCC.
Despite my very limited spare time, I could have a look if you provide me the sources of your port :-)
On NetBSD there are several symbols that are replaced by the virtue
of including a C header.
If you include correctly the C header, the correct symbol is used
and you don't get the linker warning.
That is what I did by adding the indicated header files to the NetBSD
section of the init.c file. No other systems have them there (or
anywhere in some cases). I expected that to fix the issue, but it did not.
For gettimeofday the symbol is replaced by __gettimeofday50.
These symbols are marked with __RENAME(XXX) macros in the C headers.
The problem can't be fixed by including C headers, because ...
For gettimeofday the symbol is replaced by __gettimeofday50.
These symbols are marked with __RENAME(XXX) macros in the C headers.
The C header is (I got this from the net, so beware)
int gettimeofday(struct timeval * __restrict, void *__restrict)
__RENAME(__gettimeofday50);
The Ada needs to change to
function gettimeofday
(tv : not null access struct_timeval;
tz : struct_timezone_ptr) return Integer;
pragma Import (C, gettimeofday, "gettimeofday50");
(or maybe "_gettimeofday50", or even "__gettimeofday50" - nm will be
your friend).
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
Simon is right, the symbol used by the Ada import statement must berenamed.
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.
Thanks for the link to the NetBSD git sources, I'm trying to build and keep you informed in my progress :-)
Stephane
Simon is right, the symbol used by the Ada import statement must be
renamed.
I have good news and bad news.[...]
The good news is that there are no more linker warnings in the RTS!!! :D
The bad news:
3. Finally, and this is killing me. While running the ACATS test suit,[...]
I am getting stalled tests. This has happened in the past, where some
tests just stall and block everything. "No problem" just kill a couple
of tests.
However, for the past day, a lot of tests are stalling. Like 1 every
5.
Simon, have you seen this behaviour? Any tips?
No, very sorry (there was one test which stalled, c425-something I
think, but only the one, and that was a while ago)
Which reminds me: I'd only do this for x86_64 platform.
Regards,
John
ALSO! I get this error at the very beginning:
```
cannot generate code for file b~impbit.ads (package spec)
gnatmake: "b~impbit.ads" compilation error
```
So, Simon, Stephane, here I am leaving you with some goodies, should
you want to take a look:
The ACATS log: https://irvise.xyz/acats.tar.gz
What is the cause of failure? 95% is timeout.
What about the tests that did not fail because of timeout? One I had to
kill because gcc got stuck. It was indeed a C* test. To be more specific,
it was C452003.
"Fernando Oleo Blanco" <irvise_ml@irvise.xyz> wrote in message news:sgni2a$1ggh$1@gioia.aioe.org...
...
What is the cause of failure? 95% is timeout.
What about the tests that did not fail because of timeout? One I had to
kill because gcc got stuck. It was indeed a C* test. To be more specific,
it was C452003.
Some GNAT versions have bugs with some newer tests. I believe that is one of them that hangs GNAT. You have to kill GNAT if that happens (yes, it is a pain if you are using a script that runs everything). I believe that this hang is fixed in the newest versions of GNAT, but that may not be the one that you are running.
Which reminds me: I'd only do this for x86_64 platform.
Regards,
John
In the Makefile.rtl, there are OS/architecture pairs. For example, there
is an entry for FreeBSD-x86 and FreeBSD-x86_64. My basic question is,
why not just have an entry per OS?
The difference between 32 and 64 bit is significant when compiling code, as it determines if the code does native 64-bit "long integers" or requires software emulation for such data lengths.
So I ran the code in the link to see if the Priority value was valid in NetBSD and... Oh... Min: -1 and Max: -1... Reading the POSIX manual it
says that -1 is an error... Was I getting an error code?
I went into #netbsd, asked aaaaandd... No, it is no error, those are the actual values that NetBSD uses as valid ones... So NetBSD is _not_ POSIX compilant in this case... More quirks to take into account... However,
this thing is going to get discussed with NetBSD people.
But this is not where it ends...
The priority number I was getting is the default in libgnat/system.ads: gcc/ada/libgnat/system.ads: Default_Priority : constant Priority := 15;
Just wondering if any of these patches are useful?
OpenBSD was forked from NetBSD, but that was a long time ago.
"https://cvsweb.openbsd.org/ports/lang/gcc/11/patches/"
system.ads should be specific to each platform and you can change it to reflect that.
pragma Assert (Result in 0 | EPERM | EINVAL);
Fernando Oleo Blanco <irvise_ml@irvise.xyz> writes:
pragma Assert (Result in 0 | EPERM | EINVAL);
EINVAL was added 5 years ago. The others have been there for 20 years
(when Ada was added to FSF GCC, according to git blame in https://github.com/gcc-mirror/gcc).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:02:23 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,057 |