Lines 39-44
src_prepare() {
Link Here
|
39 |
} |
39 |
} |
40 |
|
40 |
|
41 |
src_configure() { |
41 |
src_configure() { |
|
|
42 |
tc-ld-disable-gold-for-libtool |
42 |
econf \ |
43 |
econf \ |
43 |
INIT_D_PATH="${EPREFIX}/etc/init.d" \ |
44 |
INIT_D_PATH="${EPREFIX}/etc/init.d" \ |
44 |
MOUNT_FUSE_PATH="${EPREFIX}/sbin" \ |
45 |
MOUNT_FUSE_PATH="${EPREFIX}/sbin" \ |
Lines 82-84
src_install() {
Link Here
|
82 |
#user_allow_other |
83 |
#user_allow_other |
83 |
EOF |
84 |
EOF |
84 |
} |
85 |
} |
|
|
86 |
|
87 |
# @FUNCTION: tc-ld-disable-gold-for-libtool |
88 |
# @USAGE: [toolchain prefix] |
89 |
# @DESCRIPTION: |
90 |
# If the gold linker is currently selected, configure the compilation |
91 |
# settings so that we use the older bfd linker instead. |
92 |
# Special version that prepends '-Xlinker' for libtool |
93 |
tc-ld-disable-gold-for-libtool() { |
94 |
if ! tc-ld-is-gold "$@" ; then |
95 |
# They aren't using gold, so nothing to do! |
96 |
return |
97 |
fi |
98 |
|
99 |
ewarn "Forcing usage of the BFD linker instead of GOLD" |
100 |
|
101 |
# Set up LD to point directly to bfd if it's available. |
102 |
# We need to extract the first word in case there are flags appended |
103 |
# to its value (like multilib). #545218 |
104 |
local ld=$(tc-getLD "$@") |
105 |
local bfd_ld="${ld%% *}.bfd" |
106 |
local path_ld=$(which "${bfd_ld}" 2>/dev/null) |
107 |
[[ -e ${path_ld} ]] && export LD=${bfd_ld} |
108 |
|
109 |
# Set up LDFLAGS to select gold based on the gcc version. |
110 |
local major=$(gcc-major-version "$@") |
111 |
local minor=$(gcc-minor-version "$@") |
112 |
if [[ ${major} -lt 4 ]] || [[ ${major} -eq 4 && ${minor} -lt 8 ]] ; then |
113 |
# <=gcc-4.7 requires some coercion. Only works if bfd exists. |
114 |
if [[ -e ${path_ld} ]] ; then |
115 |
local d="${T}/bfd-linker" |
116 |
mkdir -p "${d}" |
117 |
ln -sf "${path_ld}" "${d}"/ld |
118 |
export LDFLAGS="${LDFLAGS} -Xlinker -B${d}" |
119 |
else |
120 |
die "unable to locate a BFD linker to bypass gold" |
121 |
fi |
122 |
else |
123 |
# gcc-4.8+ supports -fuse-ld directly. |
124 |
export LDFLAGS="${LDFLAGS} -Xlinker -fuse-ld=bfd" |
125 |
fi |
126 |
} |
127 |
|