OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [go/] [build/] [build.go] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2011 The Go Authors.  All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
// Package build provides tools for building Go packages.
6
package build
7
 
8
import "errors"
9
 
10
// ArchChar returns the architecture character for the given goarch.
11
// For example, ArchChar("amd64") returns "6".
12
func ArchChar(goarch string) (string, error) {
13
        switch goarch {
14
        case "386":
15
                return "8", nil
16
        case "amd64":
17
                return "6", nil
18
        case "arm":
19
                return "5", nil
20
        }
21
        return "", errors.New("unsupported GOARCH " + goarch)
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.