premake/patches/709.patch
author Ryan C. Gordon
Tue, 05 Jan 2016 05:22:35 -0500
changeset 10031 2b3baddd9afa
parent 7925 f090a47eb7f7
permissions -rwxr-xr-x
Patched to compile.
icculus@7925
     1
# HG changeset patch
icculus@7925
     2
# User Ben Henning
icculus@7925
     3
# Date 1375901577 25200
icculus@7925
     4
#      Wed Aug 07 11:52:57 2013 -0700
icculus@7925
     5
# Node ID 1d820b5754a9bc79b5c4c6a26d1acc170ebf4784
icculus@7925
     6
# Parent  0af3bf0e3755477eafb247935db77b2765df2d19
icculus@7925
     7
Updated the GCC make option to handle its linker cmomand generation a bit
icculus@7925
     8
differently. Rather than putting the sibling libraries before the linker
icculus@7925
     9
flags, they are put after. This allows for some extra flexibility in putting
icculus@7925
    10
custom linker libraries before the list of sibling libraries, in case one of
icculus@7925
    11
them depends on it.
icculus@7925
    12
icculus@7925
    13
diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua
icculus@7925
    14
--- a/src/actions/make/make_cpp.lua
icculus@7925
    15
+++ b/src/actions/make/make_cpp.lua
icculus@7925
    16
@@ -267,11 +267,12 @@
icculus@7925
    17
 				_p('  LINKCMD    = $(AR) -rcs $(TARGET) $(OBJECTS)')
icculus@7925
    18
 			end
icculus@7925
    19
 		else
icculus@7925
    20
+			-- Ben: changed order of ALL_LDFLAGS and LIBS (switched them)
icculus@7925
    21
 			-- this was $(TARGET) $(LDFLAGS) $(OBJECTS)
icculus@7925
    22
 			--  but had trouble linking to certain static libs so $(OBJECTS) moved up
icculus@7925
    23
 			-- then $(LDFLAGS) moved to end
icculus@7925
    24
 			--   https://sourceforge.net/tracker/?func=detail&aid=3430158&group_id=71616&atid=531880
icculus@7925
    25
-			_p('  LINKCMD    = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS)', iif(cfg.language == "C", "CC", "CXX"))
icculus@7925
    26
+			_p('  LINKCMD    = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', iif(cfg.language == "C", "CC", "CXX"))
icculus@7925
    27
 		end
icculus@7925
    28
 	end
icculus@7925
    29