From 538120bb7fb8ba739a58890ff6caf5202c05edc7 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Mon, 8 Dec 2014 09:05:44 -0800 Subject: [PATCH] wrap mbgl-core and mbgl-linux in -Wl,--start-group/-Wl,--end-group --- utils/mbgl-config/mbgl-config.template.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/mbgl-config/mbgl-config.template.sh b/utils/mbgl-config/mbgl-config.template.sh index 84fce43c1..89e28f64a 100644 --- a/utils/mbgl-config/mbgl-config.template.sh +++ b/utils/mbgl-config/mbgl-config.template.sh @@ -24,6 +24,12 @@ if test $# -eq 0; then usage 1 fi +if [ ${CONFIG_MBGL_PLATFORM} == 'linux' ]; then + LIBS="-Wl,--start-group -lmbgl-core -lmbgl-${CONFIG_MBGL_PLATFORM} -Wl,--end-group -lmbgl-headless" +else + LIBS="-lmbgl-core -lmbgl-${CONFIG_MBGL_PLATFORM} -lmbgl-headless" +fi + while test $# -gt 0; do case "$1" in esac @@ -43,7 +49,7 @@ while test $# -gt 0; do ;; --libs) - echo -L${CONFIG_MBGL_PREFIX}/lib -lmbgl-core -lmbgl-${CONFIG_MBGL_PLATFORM} -lmbgl-headless ${CONFIG_MBGL_LDFLAGS} + echo -L${CONFIG_MBGL_PREFIX}/lib ${LIBS} ${CONFIG_MBGL_LDFLAGS} ;; --includedir)