[hg] cnd-main: #224229 - Can't add GCC(ARM - armv5tejl) toolchain

  • From: Andrew Krasny < >
  • To:
  • Subject: [hg] cnd-main: #224229 - Can't add GCC(ARM - armv5tejl) toolchain
  • Date: Wed, 26 Dec 2012 06:05:12 -0800

changeset 5e2ed2476257 in cnd-main ((none))
details: http://hg.netbeans.org/cnd-main/rev/5e2ed2476257
description:
        #224229 - Can't add GCC(ARM - armv5tejl) toolchain

diffstat:

 
dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/pty/PtySupport.java
       |   3 +-
 
dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/UnbufferSupport.java
 |  38 ++++-----
 
dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/NbStartUtility.java
       |   6 +-
 3 files changed, 24 insertions(+), 23 deletions(-)

diffs (122 lines):

diff --git 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/pty/PtySupport.java
 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/pty/PtySupport.java
--- 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/pty/PtySupport.java
+++ 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/pty/PtySupport.java
@@ -45,6 +45,7 @@
 import org.netbeans.modules.nativeexecution.ExProcessInfoProvider;
 import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
 import org.netbeans.modules.nativeexecution.api.HostInfo;
+import org.netbeans.modules.nativeexecution.api.HostInfo.CpuFamily;
 import org.netbeans.modules.nativeexecution.api.NativeProcess;
 import org.netbeans.modules.nativeexecution.api.util.ConnectionManager;
 import 
org.netbeans.modules.nativeexecution.api.util.ConnectionManager.CancellationException;
@@ -176,7 +177,7 @@
                 case MACOSX:
                     return true;
                 case LINUX:
-                    return true;
+                    return hostInfo.getCpuFamily().equals(CpuFamily.X86);
                 case SUNOS:
                     return true;
                 default:
diff --git 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/UnbufferSupport.java
 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/UnbufferSupport.java
--- 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/UnbufferSupport.java
+++ 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/UnbufferSupport.java
@@ -50,6 +50,7 @@
 import java.util.logging.Level;
 import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
 import org.netbeans.modules.nativeexecution.api.HostInfo;
+import org.netbeans.modules.nativeexecution.api.HostInfo.CpuFamily;
 import org.netbeans.modules.nativeexecution.api.NativeProcessBuilder;
 import 
org.netbeans.modules.nativeexecution.api.util.CommonTasksSupport.UploadStatus;
 import 
org.netbeans.modules.nativeexecution.api.util.ConnectionManager.CancellationException;
@@ -61,7 +62,7 @@
 
 /*
  * Used to unbuffer application's output in case OutputWindow is used.
- * 
+ *
  */
 public class UnbufferSupport {
 
@@ -86,16 +87,23 @@
             return;
         }
 
-        boolean isMacOS = hinfo.getOSFamily() == HostInfo.OSFamily.MACOSX;
+        boolean isWindows = false;
 
-        // Bug 179172 - unbuffer.dylib not found
-        // Will disable unbuffer on Mac as seems it is not required...
-        if (isMacOS) {
-            return;
+        switch (hinfo.getOSFamily()) {
+            case MACOSX:
+                // No unbuffer on MacOS - see IZ179172
+                return;
+            case LINUX:
+                if (!hinfo.getCpuFamily().equals(CpuFamily.X86)) {
+                    // Unbuffer is available for x86 only
+                    return;
+                }
+                break;
+            case WINDOWS:
+                isWindows = true;
+                break;
         }
 
-        boolean isWindows = hinfo.getOSFamily() == HostInfo.OSFamily.WINDOWS;
-
         final MacroExpander macroExpander = 
MacroExpanderFactory.getExpander(execEnv);
         // Setup LD_PRELOAD to load unbuffer library...
 
@@ -167,9 +175,6 @@
                 if (isWindows) {
                     ldLibraryPathEnv = "PATH"; // NOI18N
                     ldPreloadEnv = "LD_PRELOAD"; // NOI18N
-                } else if (isMacOS) {
-                    ldLibraryPathEnv = "DYLD_LIBRARY_PATH"; // NOI18N
-                    ldPreloadEnv = "DYLD_INSERT_LIBRARIES"; // NOI18N
                 } else {
                     ldLibraryPathEnv = "LD_LIBRARY_PATH"; // NOI18N
                     ldPreloadEnv = "LD_PRELOAD"; // NOI18N
@@ -191,13 +196,6 @@
                         // will not set LD_PRELOAD
                         return;
                     }
-
-                } else if (isMacOS) {
-                    // TODO: FIXME (?) For Mac and Windows just put unbuffer
-                    // with path to it to LD_PRELOAD/DYLD_INSERT_LIBRARIES
-                    // Reason: no luck to make it work using PATH ;(
-                    ldPreload = ((ldPreload == null) ? "" : (ldPreload + 
":")) + // NOI18N
-                            unbufferPath + "/" + unbufferLib; // NOI18N
                 } else {
                     ldPreload = ((ldPreload == null) ? "" : (ldPreload + 
":")) + // NOI18N
                             unbufferLib;
@@ -205,9 +203,7 @@
 
                 env.put(ldPreloadEnv, ldPreload);
 
-                if (isMacOS) {
-                    env.put("DYLD_FORCE_FLAT_NAMESPACE", "yes"); // NOI18N
-                } else if (isWindows) {
+                if (isWindows) {
 //                    String ldLibPath = env.get(ldLibraryPathEnv);
 //                    ldLibPath = ((ldLibPath == null) ? "" : (ldLibPath + 
";")) + // NOI18N
 //                            unbufferPath + ";" + unbufferPath + "_64"; // 
NOI18N
diff --git 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/NbStartUtility.java
 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/NbStartUtility.java
--- 
a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/NbStartUtility.java
+++ 
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/NbStartUtility.java
@@ -110,7 +110,11 @@
                 case MACOSX:
                 case SUNOS:
                 case LINUX:
-                    return true;
+                    try {
+                        return getLocalFile(hostInfo) != null;
+                    } catch (MissingResourceException ex) {
+                    }
+                    return false;
                 case WINDOWS:
                     // For now will disable it on Windows, as there are some
                     // side-effects with paths (need deeper studying)

[hg] cnd-main: #224229 - Can't add GCC(ARM - armv5tejl) toolchain

Andrew Krasny 12/26/2012

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close