From bf0ce309d12976a2c36335118b183cc5d38bdc00 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Sun, 9 Jul 2006 05:14:01 +0000 Subject: [PATCH 1/1] Fixed GCC ld issue git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@842 6f19259b-4bc3-4df7-8a09-765794883524 --- .../cpptasks/userdefine/CommandLineUserDefine.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/CommandLineUserDefine.java b/Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/CommandLineUserDefine.java index b77f2db624..1e4c0ce2b7 100644 --- a/Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/CommandLineUserDefine.java +++ b/Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/CommandLineUserDefine.java @@ -39,6 +39,7 @@ public class CommandLineUserDefine { String outputDelimiter = null; public void command(CCTask cctask, UserDefineDef userdefine){ + boolean isGccCommand = userdefine.getFamily().equalsIgnoreCase("GCC"); File workdir; Project project = cctask.getProject(); if(userdefine.getWorkdir() == null) { @@ -117,6 +118,9 @@ public class CommandLineUserDefine { String[] libSet = userdefine.get_libset(); if (libSet != null && libSet.length > 0){ cmdLen = cmdLen + libSet.length; + if (isGccCommand) { + cmdLen += 2; // we need -( and -) to group libs for GCC + } } // @@ -190,9 +194,15 @@ public class CommandLineUserDefine { } if (libSet != null && libSet.length > 0){ + if (isGccCommand) { + cmd[index++] = "-("; + } for (int k = 0; k < libSet.length ; k++){ cmd[index++] = libSet[k]; } + if (isGccCommand) { + cmd[index++] = "-)"; + } } for (int j = 0; j < fileNames.length; j++){ // execute the command -- 2.39.2