Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
ndk
Commits
cc48bbff
Commit
cc48bbff
authored
11 years ago
by
Andrew Hsieh
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Symlink ld.bfd if ld.gold isn't available"
parents
628b3942
05592764
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
build/tools/build-gcc.sh
build/tools/build-gcc.sh
+12
-5
build/tools/build-host-gcc.sh
build/tools/build-host-gcc.sh
+3
-1
No files found.
build/tools/build-gcc.sh
View file @
cc48bbff
...
...
@@ -504,18 +504,25 @@ done
# $1: Source file prefix (e.g. 'c++')
# $2: Destination file prefix (e.g. 'g++')
# $3: Alternative file prefix if $2 doesn't exist (eg. ld.bfd)
do_relink_bin
()
{
local
DST_FILE
=
$2
if
[
!
-f
"
$TOOLCHAIN_PATH
/bin/
$ABI_CONFIGURE_TARGET
-
$DST_FILE$HOST_EXE
"
]
;
then
DST_FILE
=
$3
fi
if
[
!
-f
"
$TOOLCHAIN_PATH
/bin/
$ABI_CONFIGURE_TARGET
-
$DST_FILE$HOST_EXE
"
]
;
then
echo
"ERROR: Can't relink
$1
to
$DST_FILE
because
$DST_FILE
doesn't exist"
exit
1
fi
do_relink
\
$TOOLCHAIN_PATH
/bin/
$ABI_CONFIGURE_TARGET
-
$1$HOST_EXE
\
$ABI_CONFIGURE_TARGET
-
$
2
$HOST_EXE
$ABI_CONFIGURE_TARGET
-
$
DST_FILE
$HOST_EXE
}
do_relink_bin c++ g++
do_relink_bin gcc-
$GCC_VERSION
gcc
# Gold is the default except for 4.4.3
if
[
"
$GCC_VERSION
"
!=
"4.4.3"
]
;
then
do_relink_bin ld ld.gold
fi
# symlink ld to either ld.gold or ld.bfd
do_relink_bin ld ld.gold ld.bfd
# copy SOURCES file if present
if
[
-f
"
$SRC_DIR
/SOURCES"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
build/tools/build-host-gcc.sh
View file @
cc48bbff
...
...
@@ -1579,8 +1579,10 @@ install_gcc ()
# Also relink a few files under $INSTALL_DIR/bin/
do_relink
"
$INSTALL_DIR
"
/bin/
$TARGET
-c
++
$TARGET
-g
++
&&
do_relink
"
$INSTALL_DIR
"
/bin/
$TARGET
-gcc-
$GCC_VERSION
$TARGET
-gcc
&&
if
[
"
$GCC_VERSION
"
!=
"4.4.3"
]
;
then
if
[
-f
"
$INSTALL_DIR
"
/bin/
$TARGET
-ld
.gold
]
;
then
do_relink
"
$INSTALL_DIR
"
/bin/
$TARGET
-ld
$TARGET
-ld
.gold
else
do_relink
"
$INSTALL_DIR
"
/bin/
$TARGET
-ld
$TARGET
-ld
.bfd
fi
fail_panic
...
...
This diff is collapsed.
Click to expand it.
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