DEV: libowfat - ugh!

Discussion in 'Tomato Firmware' started by rhester72, Apr 16, 2010.

  1. rhester72

    rhester72 Network Guru Member

    libowfat is failing compile with the K26 SDK because of missing atomic builtins:

    Code:
    mipsel-uclibc-gcc -g -o t t.o libowfat.a `cat libsocket` -lpthread
    t.o: In function `compare_and_swap':
    t.c:(.text.compare_and_swap+0xc): undefined reference to `__sync_bool_compare_and_swap_4'
    t.o: In function `main':
    t.c:(.text.main+0x28): undefined reference to `__sync_add_and_fetch_4'
    t.c:(.text.main+0x64): undefined reference to `__sync_add_and_fetch_4'
    collect2: ld returned 1 exit status
    make: *** [t] Error 1
    The strange part is that these are a part of GCC 4.1.2 or better (we are using GCC 4.2.4) and I have confirmed they are indeed present in the mipsel cross-compiler cc1 and ccplus binaries. I'm sure my path to mipsel-uclibc-gcc is correct.

    Anyone seen anything like this before? OpenWRT doesn't seem to have special-cased this library at all, I am utterly lost as to why it isn't using the builtins (I'm obviously not using -fno-builtin and I am not using -march, the two "gotchas" as documented in the GCC manual).

    This really should "just work", but it doesn't. :/

    Help?

    Rodney
     
  2. teddy_bear

    teddy_bear Network Guru Member

    Just tried - compiled with no hiccup:
    Code:
    make -C libowfat-0.28 CROSS=mipsel-linux- DIET=
     
  3. rhester72

    rhester72 Network Guru Member

    It's CVS that blows up. Where did you get 0.28? Per their home page, there are no "releases" yet.

    Rodney
     
  4. teddy_bear

    teddy_bear Network Guru Member

  5. rhester72

    rhester72 Network Guru Member

    You're right, works with non-CVS. A hint of things to come? :)

    Rodney
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice