Menu

#19 Patch allow support of FreeBSD Kernel in Debian

developer
open-accepted
5
2017-08-28
2010-04-18
No

Hello,

I wrote this patch to allow the build of Atlas under Debian with a FreeBSD kernel.
the elf is different with this kernel.

Thanks

Discussion

  • Sylvestre Ledru

    Sylvestre Ledru - 2010-04-18

    Change the elf if freebsd system

     
  • R. Clint Whaley

    R. Clint Whaley - 2010-04-26
    • labels: --> configure improvement
    • assigned_to: nobody --> rwhaley
     
  • R. Clint Whaley

    R. Clint Whaley - 2010-04-26

    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

     
  • Sylvestre Ledru

    Sylvestre Ledru - 2010-04-29

    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.

     
  • R. Clint Whaley

    R. Clint Whaley - 2010-04-29

    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

     
  • Sylvestre Ledru

    Sylvestre Ledru - 2010-04-29

    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='
    [...]

     
  • R. Clint Whaley

    R. Clint Whaley - 2010-04-29

    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?

     
  • Sylvestre Ledru

    Sylvestre Ledru - 2010-04-30

    $ uname -s
    GNU/kFreeBSD

    It is indeed a Debian with FreeBSD kernel.

    If you want, I can try to fix this issue.

     
  • Sébastien Villemot

    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.

     
  • R. Clint Whaley

    R. Clint Whaley - 2017-08-25

    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?

     
  • R. Clint Whaley

    R. Clint Whaley - 2017-08-25
    • status: open --> open-accepted
    • Group: --> developer
     
  • Sébastien Villemot

    Thanks, I confirm that the patch fixes the build on GNU/kFreeBSD (without breaking GNU/Hurd).

     

Log in to post a comment.