lua: fix build issue with gcc 4.6

gcc 4.6 has become more sensitive about option ordering, especially
libraries. It requires the -l flags to be placed after the object
files that need that library. See for example
http://nick.zoic.org/art/etc/gcc-linker-libs.html. We had -llua at the
beginning of the link command line, causing build issues (here on gcc
4.6 with host-lua).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni 2012-07-20 18:55:23 +02:00
parent 2ebbec0545
commit 02f5589d6f
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ Index: b/src/Makefile
+ ln -fs $@.$(PKG_VERSION) $@
+
+$(LUA_T): $(LUA_O) $(LUA_SO)
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
+ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUA_O) -llua $(LIBS)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)

View File

@ -91,7 +91,7 @@ Index: b/src/Makefile
-$(LUAC_T): $(LUAC_O) $(LUA_A)
- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+$(LUAC_T): $(LUAC_O) $(LUA_SO)
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
+ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUAC_O) -llua $(LIBS)
clean:
$(RM) $(ALL_T) $(ALL_O)