summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-09 05:14:01 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-09 05:14:01 +0000
commitbf0ce309d12976a2c36335118b183cc5d38bdc00 (patch)
tree6bc7f83a89207d85a39e2395b928b53503f273ea /Tools
parent4c29d43304de904175ffa3b771533f0dd93beff9 (diff)
downloadedk2-platforms-bf0ce309d12976a2c36335118b183cc5d38bdc00.tar.xz
Fixed GCC ld issue
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@842 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/CommandLineUserDefine.java10
1 files changed, 10 insertions, 0 deletions
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