diff options
author | andrew <andrew@FreeBSD.org> | 2013-01-19 04:34:33 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-01-19 04:34:33 +0000 |
commit | ce40a2ab5fdd2887aa211030b3f009b398129810 (patch) | |
tree | a2f4eb603e3856b1860e076a6e2f6ea63bb2aeff /libexec/rtld-elf | |
parent | 363335d53e3c955602378aa434d0054c48a6e0d6 (diff) | |
download | FreeBSD-src-ce40a2ab5fdd2887aa211030b3f009b398129810.zip FreeBSD-src-ce40a2ab5fdd2887aa211030b3f009b398129810.tar.gz |
When building for ARM EABI link against libgcc for the __aeabi_* functions.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r-- | libexec/rtld-elf/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index e41477d..31cbfdd 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -42,6 +42,16 @@ LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +# Some of the required math functions (div & mod) are implemented in libgcc +# on ARM. The library also needs to be placed first to be correctly linked. +# As some of the functions are used before we have shared libraries. +DPADD+= ${LIBGCC} +LDADD+= -lgcc +.endif + + + .if ${MK_SYMVER} == "yes" LIBCDIR= ${TOPSRCDIR}/lib/libc VERSION_DEF= ${LIBCDIR}/Versions.def |