Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/make/make_cpp.lua12
-rw-r--r--tests/test_gmake_cpp.lua6
2 files changed, 11 insertions, 7 deletions
diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua
index 0efd321..479e36d 100644
--- a/src/actions/make/make_cpp.lua
+++ b/src/actions/make/make_cpp.lua
@@ -267,11 +267,15 @@
_p(' LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)')
end
else
+
-- this was $(TARGET) $(LDFLAGS) $(OBJECTS)
- -- but had trouble linking to certain static libs so $(OBJECTS) moved up
- -- then $(LDFLAGS) moved to end
- -- https://sourceforge.net/tracker/?func=detail&aid=3430158&group_id=71616&atid=531880
- _p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)', iif(cfg.language == "C", "CC", "CXX"))
+ -- but had trouble linking to certain static libs; $(OBJECTS) moved up
+ -- $(LDFLAGS) moved to end (http://sourceforge.net/p/premake/patches/107/)
+ -- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/)
+
+ local tool = iif(cfg.language == "C", "CC", "CXX")
+ _p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)
+
end
end
diff --git a/tests/test_gmake_cpp.lua b/tests/test_gmake_cpp.lua
index 2844567..dde8033 100644
--- a/tests/test_gmake_cpp.lua
+++ b/tests/test_gmake_cpp.lua
@@ -85,7 +85,7 @@ ifeq ($(config),debug)
ALL_LDFLAGS += $(LDFLAGS) -s
LDDEPS +=
LIBS += $(LDDEPS)
- LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)
+ LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
define PRELINKCMDS
@@ -119,7 +119,7 @@ ifeq ($(config),debugps3)
ALL_LDFLAGS += $(LDFLAGS) -s
LDDEPS +=
LIBS += $(LDDEPS)
- LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)
+ LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
define PRELINKCMDS
@@ -150,7 +150,7 @@ ifeq ($(config),debug64)
ALL_LDFLAGS += $(LDFLAGS) -s -m64 -L/usr/lib64
LDDEPS +=
LIBS += $(LDDEPS)
- LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)
+ LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
define PRELINKCMDS