e2fsprogs: fix glibc compile issue (FS#1749,FS#1796)
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 8 Oct 2018 14:57:01 +0000 (16:57 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 8 Oct 2018 19:25:09 +0000 (21:25 +0200)
Fixes the following build error:

.../toolchain-i386_pentium4_gcc-7.3.0_glibc/lib/gcc/i486-openwrt-linux-gnu/7.3.0/../../../../i486-openwrt-linux-gnu/bin/ld: ../lib/libcom_err.so: undefined reference to `sem_post’
.../toolchain-i386_pentium4_gcc-7.3.0_glibc/lib/gcc/i486-openwrt-linux-gnu/7.3.0/../../../../i486-openwrt-linux-gnu/bin/ld: ../lib/libcom_err.so: undefined reference to `sem_wait'
.../toolchain-i386_pentium4_gcc-7.3.0_glibc/lib/gcc/i486-openwrt-linux-gnu/7.3.0/../../../../i486-openwrt-linux-gnu/bin/ld: ../lib/libcom_err.so: undefined reference to `sem_init’
.../toolchain-i386_pentium4_gcc-7.3.0_glibc/lib/gcc/i486-openwrt-linux-gnu/7.3.0/../../../../i486-openwrt-linux-gnu/bin/ld: ../lib/libcom_err.so: undefined reference to `sem_destroy’

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/utils/e2fsprogs/Makefile

index 3411bea740d9d903e23e9fdc006767de0d65e704..0ef0dbca34dc53c4412ac6a2401b6350c6cb61db 100644 (file)
@@ -133,6 +133,8 @@ endef
 
 TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
 
+TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
+
 CONFIGURE_ARGS += \
        --disable-testio-debug \
        --enable-elf-shlibs     \