Link error compiling SQLite for aarch64

Home Forums Forum Link error compiling SQLite for aarch64

This topic contains 3 replies, has 2 voices, and was last updated by  uroni 4 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #27478



    really useful project! I tried to manually compile e.g. STLPort with an old glibc version and failed in all my endeavours, while ellcc worked without much hassle once I discovered it.

    With the latest SQLite release ( I get following linker error with target aarch64:

    ecc shell.c sqlite3.c -o sqlite -target aarch64-linux-eng
    /tmp/sqlite3-2570ba.o: In function `sqlite3AtoF’:
    sqlite3.c:(.text+0x33b8c): undefined reference to `__floatditf’
    sqlite3.c:(.text+0x33bc4): undefined reference to `__floatditf’
    sqlite3.c:(.text+0x33cb8): undefined reference to `__floatditf’
    sqlite3.c:(.text+0x33cd4): undefined reference to `__floatditf’
    /tmp/sqlite3-2570ba.o: In function `sqlite3IntFloatCompare’:
    sqlite3.c:(.text+0x43358): undefined reference to `__floatditf’
    ecc: error: linker command failed with exit code 1 (use -v to see invocation)

    Not too much of an issue. I’ll just skip this architecture. I would not be able to test it anyway since I don’t have a ARM64 board.




    Hi uroni,

    I found the problem with the missing library functions. Thanks for reporting it. I’ll add the library functions in the next release.




    This should fix aarch64’s c libcompiler-rt.a. In ellcc/libecc/src/compiler-rt/, add this at the end:

    ifeq ($(ARCH),aarch64)
      VPATH := $(VPATH):$(SRCPATH)/compiler-rt/lib/builtins
      SRCS += comparetf2.c extenddftf2.c extendsftf2.c fixtfdi.c \
        fixtfsi.c fixtfti.c fixunstfdi.c fixunstfsi.c fixunstfti.c \
        floatditf.c floatsitf.c floatunditf.c floatunsitf.c multc3.c \
        trunctfdf2.c trunctfsf2.c

    Then go into ellcc/libecc and type make.
    Or, wait until the nest release.


    • This reply was modified 4 years, 10 months ago by  rich.


    Thanks for the fix!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.