# File src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb, line 113
    def self.cpu_architectures
      uname = uname_command
      raise "The 'uname' command cannot be found" if !uname
      if os_name_simple == "macosx"
        arch = `#{uname} -p`.strip
        if arch == "i386"
          # Macs have been x86 since around 2007. I think all of them come with
          # a recent enough Intel CPU that supports both x86 and x86_64, and I
          # think every OS X version has both the x86 and x86_64 runtime installed.
          major, minor, *rest = `sw_vers -productVersion`.strip.split(".")
          major = major.to_i
          minor = minor.to_i
          if major >= 10 || (major == 10 && minor >= 6)
            # Since Snow Leopard x86_64 is the default.
            ["x86_64", "x86"]
          else
            # Before Snow Leopard x86 was the default.
            ["x86", "x86_64"]
          end
        else
          arch
        end
      else
        arch = `#{uname} -p`.strip
        # On some systems 'uname -p' returns something like
        # 'Intel(R) Pentium(R) M processor 1400MHz' or
        # 'Intel(R)_Xeon(R)_CPU___________X7460__@_2.66GHz'.
        if arch == "unknown" || arch =~ / / || arch =~ /Hz$/
          arch = `#{uname} -m`.strip
        end
        if arch =~ /^i.86$/
          arch = "x86"
        elsif arch == "amd64"
          arch = "x86_64"
        end

        if arch == "x86"
          # Most x86 operating systems nowadays are probably running on
          # a CPU that supports both x86 and x86_64, but we're not gonna
          # go through the trouble of checking that. The main architecture
          # is what we usually care about.
          ["x86"]
        elsif arch == "x86_64"
          # I don't think there's a single x86_64 CPU out there
          # that doesn't support x86 as well.
          ["x86_64", "x86"]
        else
          [arch]
        end
      end
    end