git » libjio » commit 1e8afd7

libjio: Fix the order of the gcc arguments (objects vs. dynamic libraries)

author Alberto Bertogli
2012-02-09 00:37:18 UTC
committer Alberto Bertogli
2012-02-09 00:44:03 UTC
parent 92c8747307527541f5fe87d0e443acea22ff5bff

libjio: Fix the order of the gcc arguments (objects vs. dynamic libraries)

Newer gcc versions change the behaviour depending on whether the -l arguments
come before or after the objects.

gcc -shared -lx a.o -o s.so
  -> ldd s.so  will not show libx.so

gcc -shared a.o -lx -o s.so
  -> ldd s.so  will show libx.so

This patch changes the order of the arguments to match the last case.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libjio/Makefile +1 -1

diff --git a/libjio/Makefile b/libjio/Makefile
index 45a388c..4422545 100644
--- a/libjio/Makefile
+++ b/libjio/Makefile
@@ -106,7 +106,7 @@ sinclude $(OBJS:.o=.o.mak)
 $O/libjio.$(LIB_EXT): $O/build-flags $(OBJS)
 	$(N_CC) -shared $(ALL_LDFLAGS) \
 		-Wl,$(LIB_DEST_OPT),libjio.$(LIB_EXT).$(LIB_OBJ_VER) \
-		$(LIBS) $(OBJS) -o $O/libjio.$(LIB_EXT).$(LIB_VER)
+		$(OBJS) $(LIBS) -o $O/libjio.$(LIB_EXT).$(LIB_VER)
 	@echo "  LN  libjio.$(LIB_EXT).$(LIB_VER)"
 	@ln -fs libjio.$(LIB_EXT).$(LIB_VER) $O/libjio.$(LIB_EXT)
 	@ln -fs libjio.$(LIB_EXT).$(LIB_VER) $O/libjio.$(LIB_EXT).$(LIB_OBJ_VER)