Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
b8b2253a
Commit
b8b2253a
authored
Feb 04, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/dist: fix build
TBR=golang-dev CC=golang-dev
https://golang.org/cl/5630049
parent
961f96b5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
src/cmd/dist/build.c
src/cmd/dist/build.c
+9
-6
src/cmd/dist/unix.c
src/cmd/dist/unix.c
+2
-6
src/cmd/dist/windows.c
src/cmd/dist/windows.c
+3
-3
src/make.bash
src/make.bash
+2
-1
No files found.
src/cmd/dist/build.c
View file @
b8b2253a
...
...
@@ -21,7 +21,7 @@ char *gochar;
char
*
goroot_final
;
char
*
goversion
;
char
*
slash
;
// / for unix, \ for windows
char
*
default_goroot
;
char
*
default_goroot
=
DEFAULT_GOROOT
;
static
bool
shouldbuild
(
char
*
,
char
*
);
static
void
copy
(
char
*
,
char
*
);
...
...
@@ -487,7 +487,7 @@ install(char *dir)
Buf
b
,
b1
,
path
;
Vec
compile
,
files
,
link
,
go
,
missing
,
clean
,
lib
,
extra
;
Time
ttarg
,
t
;
int
i
,
j
,
k
,
n
;
int
i
,
j
,
k
,
n
,
doclean
;
binit
(
&
b
);
binit
(
&
b1
);
...
...
@@ -747,6 +747,8 @@ install(char *dir)
vadd
(
&
compile
,
bprintf
(
&
b
,
"-DGOARCH_%s"
,
goos
));
}
bpathf
(
&
b
,
"%s/%s"
,
workdir
,
lastelem
(
files
.
p
[
i
]));
doclean
=
1
;
if
(
!
isgo
&&
streq
(
gohostos
,
"darwin"
))
{
// To debug C programs on OS X, it is not enough to say -ggdb
// on the command line. You have to leave the object files
...
...
@@ -755,8 +757,8 @@ install(char *dir)
bpathf
(
&
b1
,
"%s/pkg/obj/%s"
,
goroot
,
dir
);
xmkdirall
(
bstr
(
&
b1
));
bpathf
(
&
b
,
"%s/%s"
,
bstr
(
&
b1
),
lastelem
(
files
.
p
[
i
]));
}
else
bpathf
(
&
b
,
"%s/%s"
,
workdir
,
lastelem
(
files
.
p
[
i
]));
doclean
=
0
;
}
b
.
p
[
b
.
len
-
1
]
=
'o'
;
// was c or s
vadd
(
&
compile
,
"-o"
);
...
...
@@ -765,6 +767,7 @@ install(char *dir)
bgrunv
(
bstr
(
&
path
),
CheckExit
,
&
compile
);
vadd
(
&
link
,
bstr
(
&
b
));
if
(
doclean
)
vadd
(
&
clean
,
bstr
(
&
b
));
}
bgwait
();
...
...
@@ -1144,7 +1147,7 @@ cmdenv(int argc, char **argv)
binit
(
&
b
);
binit
(
&
b1
);
format
=
"%s=
\"
%s
\"
"
;
format
=
"%s=
\"
%s
\"
\n
"
;
pflag
=
0
;
ARGBEGIN
{
case
'p'
:
...
...
src/cmd/dist/unix.c
View file @
b8b2253a
...
...
@@ -475,6 +475,8 @@ fatal(char *msg, ...)
vfprintf
(
stderr
,
msg
,
arg
);
va_end
(
arg
);
fprintf
(
stderr
,
"
\n
"
);
bgwait
();
exit
(
1
);
}
...
...
@@ -624,16 +626,10 @@ xsetenv(char *name, char *value)
int
main
(
int
argc
,
char
**
argv
)
{
char
*
p
;
Buf
b
;
struct
utsname
u
;
binit
(
&
b
);
p
=
argv
[
0
];
if
(
hassuffix
(
p
,
"bin/tool/dist"
))
{
default_goroot
=
xstrdup
(
p
);
default_goroot
[
strlen
(
p
)
-
strlen
(
"bin/tool/dist"
)]
=
'\0'
;
}
slash
=
"/"
;
...
...
src/cmd/dist/windows.c
View file @
b8b2253a
...
...
@@ -688,6 +688,8 @@ fatal(char *msg, ...)
va_end
(
arg
);
xprintf
(
"go tool dist: %s
\n
"
,
buf1
);
bgwait
();
ExitProcess
(
1
);
}
...
...
@@ -800,7 +802,7 @@ xstrlen(char *p)
void
xexit
(
int
n
)
{
exit
(
n
);
ExitProcess
(
n
);
}
void
...
...
@@ -831,8 +833,6 @@ main(int argc, char **argv)
setvbuf
(
stdout
,
nil
,
_IOLBF
,
0
);
setvbuf
(
stderr
,
nil
,
_IOLBF
,
0
);
default_goroot
=
DEFAULT_GOROOT
;
slash
=
"
\\
"
;
gohostos
=
"windows"
;
...
...
src/make.bash
View file @
b8b2253a
...
...
@@ -47,7 +47,8 @@ done
echo
'# Building C bootstrap tool.'
mkdir
-p
../bin/tool
gcc
-O2
-Wall
-Werror
-o
../bin/tool/dist
-Icmd
/dist cmd/dist/
*
.c
DEFGOROOT
=
'-DDEFAULT_GOROOT="'
"
$(
cd
..
&&
pwd
)
"
'"'
gcc
-O2
-Wall
-Werror
-o
../bin/tool/dist
-Icmd
/dist
"
$DEFGOROOT
"
cmd/dist/
*
.c
echo
echo
'# Building compilers and Go bootstrap tool.'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment