I notice you are using the __FreeBSD_* macro rather than if FreeBSD is the OS. Does ATLAS not detect the OS as FreeBSD on the platform you mention (I don't like to rely on nonstandard #defines)?
Thanks,
Clint
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, trick case.
Debian has the capability to use either Linux or FreeBSD kernel.
In my case, I am using a macro provided by gcc. I don't know how standard it is. Sorry.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This seems like the first thing to fix then; if the OS is FreeBSD but ATLAS detects Linux something is wrong. I'm not sure I'm understanding what this is anyway. Is this the debian distro with a BSD kernel, or something? What does uname -s say on this platform?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm following up on this. Debian GNU/kFreeBSD is recognized as Linux by ATLAS because "uname -s" returns "GNU/kFreeBSD", and therefore matches strstr(res, "GNU") in CONFIG/src/probe_OS.c.
An easy fix would be to run the FreeBSD test before the Linux test in CONFIG/src/probe_OS.c.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Change the elf if freebsd system
I notice you are using the __FreeBSD_* macro rather than if FreeBSD is the OS. Does ATLAS not detect the OS as FreeBSD on the platform you mention (I don't like to rely on nonstandard #defines)?
Thanks,
Clint
Well, trick case.
Debian has the capability to use either Linux or FreeBSD kernel.
In my case, I am using a macro provided by gcc. I don't know how standard it is. Sorry.
Yeah, my question is if ATLAS detects that the OS is FreeBSD when you use the FreeBSD kernel. If it does, I can sub in the OS test for the macro test.
Thanks,
Clint
Sounds like it detects a Linux:
https://buildd.debian.org/fetch.cgi?pkg=atlas&arch=kfreebsd-amd64&ver=3.8.3-20&stamp=1270866680&file=log&as=raw (huge file)
[...]
make[1]: Leaving directory `/build/buildd-atlas_3.8.3-20-kfreebsd-amd64-JTNrb0/atlas-3.8.3/build/atlas-base'
cmnd=make IRun_OS args="-v 2 " | fgrep 'OS='
OS configured as Linux (1)
cmnd=make IRun_asm args="-v 2 -O 1" | fgrep 'ASM='
[...]
This seems like the first thing to fix then; if the OS is FreeBSD but ATLAS detects Linux something is wrong. I'm not sure I'm understanding what this is anyway. Is this the debian distro with a BSD kernel, or something? What does uname -s say on this platform?
$ uname -s
GNU/kFreeBSD
It is indeed a Debian with FreeBSD kernel.
If you want, I can try to fix this issue.
I'm following up on this. Debian GNU/kFreeBSD is recognized as Linux by ATLAS because "uname -s" returns "GNU/kFreeBSD", and therefore matches strstr(res, "GNU") in CONFIG/src/probe_OS.c.
An easy fix would be to run the FreeBSD test before the Linux test in CONFIG/src/probe_OS.c.
The amusing part is that a patch for accepting HURD as Linux by Sylvestre was what broke it, if you read the comments of the if :)
If you look on git, I have taken your suggestion to move the GNU == HURD == Linux assumption to dead last.
Can you confirm that the attached probe_OS.c (extracted from git basefiles) fixes the problem?
Thanks, I confirm that the patch fixes the build on GNU/kFreeBSD (without breaking GNU/Hurd).