From: jwang36 Date: Sun, 9 Jul 2006 05:14:01 +0000 (+0000) Subject: Fixed GCC ld issue X-Git-Tag: edk2-stable201903~25007 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=bf0ce309d12976a2c36335118b183cc5d38bdc00;hp=4c29d43304de904175ffa3b771533f0dd93beff9 Fixed GCC ld issue git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@842 6f19259b-4bc3-4df7-8a09-765794883524 --- 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