e2fsprogs: fix glibc compile issue (FS#1749,FS#1796)
authorHans Dedecker <[email protected]>
Mon, 8 Oct 2018 14:57:01 +0000 (16:57 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 18 Dec 2018 16:48:05 +0000 (17:48 +0100)
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 <[email protected]>
(backported from 16c712501cdcb10f333f4abc027a0dcdb8f8101b)

package/utils/e2fsprogs/Makefile

index fe490b312c3cafd9354030ba29b4119cf6294082..bfcbef8e3a148e9b068b0191c94faf70f7c21c5e 100644 (file)
@@ -132,6 +132,8 @@ $(call Package/e2fsprogs)
 endef
 
 TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
+
+TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
 TARGET_LDFLAGS += -flto
 
 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)