protobuf: link against libm under glibc 11447/head
authorRosen Penev <rosenp@gmail.com>
Thu, 27 Feb 2020 04:19:01 +0000 (20:19 -0800)
committerRosen Penev <rosenp@gmail.com>
Thu, 27 Feb 2020 04:29:25 +0000 (20:29 -0800)
Fixes compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/protobuf/Makefile

index 7d23a379d5184ab4f58b1e855325e90c6030c4a4..0b9bab9e87bdf4e837362b578aada9b754b02694 100644 (file)
@@ -81,7 +81,7 @@ CMAKE_OPTIONS += \
        -Dprotobuf_WITH_ZLIB=ON \
        -DBUILD_SHARED_LIBS=ON
 
-TARGET_LDFLAGS += -latomic
+TARGET_LDFLAGS += -latomic $(if $(CONFIG_USE_GLIBC),-lm)
 
 define Build/InstallDev
        $(call Build/InstallDev/cmake,$(1))