Line
Link Here
|
0 |
-- toolchain.eclass |
0 |
++ toolchain.eclass |
Lines 1271-1297
Link Here
|
1271 |
popd >/dev/null |
1271 |
popd >/dev/null |
1272 |
} |
1272 |
} |
1273 |
|
1273 |
|
1274 |
# This function accepts one optional argument, the make target to be used. |
1274 |
# This function accepts one optional argument: the make target to be used. |
1275 |
# If ommitted, gcc_do_make will try to guess whether it should use all, |
1275 |
# If omitted, gcc_do_make will try to guess whether it should use make "all" |
1276 |
# profiledbootstrap, or bootstrap-lean depending on CTARGET and arch. An |
1276 |
# or "bootstrap-lean" depending on CTARGET and arch. An example of how to use |
1277 |
# example of how to use this function: |
1277 |
# this function: |
1278 |
# |
1278 |
# |
1279 |
# gcc_do_make all-target-libstdc++-v3 |
1279 |
# gcc_do_make all-target-libstdc++-v3 |
1280 |
# |
1280 |
# |
1281 |
# In addition to the target to be used, the following variables alter the |
1281 |
# The following variables control the flags the compiler is built with: |
1282 |
# behavior of this function: |
|
|
1283 |
# |
1284 |
# LDFLAGS |
1285 |
# Flags to pass to ld |
1286 |
# |
1282 |
# |
1287 |
# STAGE1_CFLAGS |
1283 |
# STAGE1_CFLAGS |
1288 |
# CFLAGS to use during stage1 of a gcc bootstrap |
1284 |
# Compiler flags used on the host for stage 1 / crosscompiling. |
|
|
1285 |
# |
1286 |
# STAGE1_LDFLAGS |
1287 |
# Linker flags used on the host for stage 1 / crosscompiling. (Note this |
1288 |
# wasn't added until around ~4.6 - older versions will just use LDFLAGS). |
1289 |
# |
1290 |
# * Note that we do not set either of these ourselves if we're bootstrapping. |
1291 |
# * It's created bugs in the past and the stage 1 compiler just gets thrown |
1292 |
# * out in the end anyways. |
1289 |
# |
1293 |
# |
1290 |
# BOOT_CFLAGS |
1294 |
# BOOT_CFLAGS |
1291 |
# CFLAGS to use during stages 2+3 of a gcc bootstrap. |
1295 |
# Compiler flags used on the host for stage2+ when bootstrapping. |
1292 |
# |
1296 |
# |
1293 |
# Travis Tilley <lv@gentoo.org> (04 Sep 2004) |
1297 |
# BOOT_LDFLAGS |
|
|
1298 |
# Linker flags used on the host for stage2+ when bootstrapping. |
1294 |
# |
1299 |
# |
|
|
1300 |
# CFLAGS_FOR_TARGET |
1301 |
# Compiler flags to use building libraries. |
1302 |
# |
1303 |
# LDFLAGS_FOR_TARGET |
1304 |
# Linker flags to use building libraries. |
1305 |
|
1295 |
gcc_do_make() { |
1306 |
gcc_do_make() { |
1296 |
# Set make target to $1 if passed |
1307 |
# Set make target to $1 if passed |
1297 |
[[ -n $1 ]] && GCC_MAKE_TARGET=$1 |
1308 |
[[ -n $1 ]] && GCC_MAKE_TARGET=$1 |
Lines 1315-1343
Link Here
|
1315 |
|
1326 |
|
1316 |
if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then |
1327 |
if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then |
1317 |
STAGE1_CFLAGS=${STAGE1_CFLAGS-"${CFLAGS}"} |
1328 |
STAGE1_CFLAGS=${STAGE1_CFLAGS-"${CFLAGS}"} |
|
|
1329 |
STAGE1_LDFLAGS=${STAGE1_LDFLAGS-"${LDFLAGS}"} |
1318 |
elif [[ $(gcc-version) == "3.4" && ${GCC_BRANCH_VER} == "3.4" ]] && gcc-specs-ssp ; then |
1330 |
elif [[ $(gcc-version) == "3.4" && ${GCC_BRANCH_VER} == "3.4" ]] && gcc-specs-ssp ; then |
1319 |
# See bug #79852 |
1331 |
# See bug #79852 |
1320 |
STAGE1_CFLAGS=${STAGE1_CFLAGS-"-O2"} |
1332 |
STAGE1_CFLAGS=${STAGE1_CFLAGS-"-O2"} |
1321 |
fi |
1333 |
fi |
1322 |
|
1334 |
|
1323 |
if is_crosscompile; then |
1335 |
if ! is_crosscompile ; then |
1324 |
# In 3.4, BOOT_CFLAGS is never used on a crosscompile... |
|
|
1325 |
# but I'll leave this in anyways as someone might have had |
1326 |
# some reason for putting it in here... --eradicator |
1327 |
BOOT_CFLAGS=${BOOT_CFLAGS-"-O2"} |
1328 |
else |
1329 |
# we only want to use the system's CFLAGS if not building a |
1330 |
# cross-compiler. |
1331 |
BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"} |
1336 |
BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"} |
|
|
1337 |
BOOT_LDFLAGS=${BOOT_LDFLAGS-"${LDFLAGS}"} |
1338 |
CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-"${CFLAGS}"} |
1339 |
LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET-"${LDFLAGS}"} |
1332 |
fi |
1340 |
fi |
1333 |
|
1341 |
|
1334 |
pushd "${WORKDIR}"/build >/dev/null |
1342 |
pushd "${WORKDIR}"/build >/dev/null |
1335 |
|
1343 |
|
1336 |
emake \ |
1344 |
emake \ |
1337 |
LDFLAGS="${LDFLAGS}" \ |
|
|
1338 |
STAGE1_CFLAGS="${STAGE1_CFLAGS}" \ |
1345 |
STAGE1_CFLAGS="${STAGE1_CFLAGS}" \ |
1339 |
LIBPATH="${LIBPATH}" \ |
1346 |
STAGE1_LDFLAGS="${STAGE1_LDFLAGS}" \ |
1340 |
BOOT_CFLAGS="${BOOT_CFLAGS}" \ |
1347 |
BOOT_CFLAGS="${BOOT_CFLAGS}" \ |
|
|
1348 |
BOOT_LDFLAGS="${BOOT_LDFLAGS}" \ |
1349 |
CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET}" \ |
1350 |
LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET}" \ |
1351 |
LIBPATH="${LIBPATH}" \ |
1341 |
${GCC_MAKE_TARGET} \ |
1352 |
${GCC_MAKE_TARGET} \ |
1342 |
|| die "emake failed with ${GCC_MAKE_TARGET}" |
1353 |
|| die "emake failed with ${GCC_MAKE_TARGET}" |
1343 |
|
1354 |
|
Lines 1453-1458
Link Here
|
1453 |
gcc_do_filter_flags |
1464 |
gcc_do_filter_flags |
1454 |
einfo "CFLAGS=\"${CFLAGS}\"" |
1465 |
einfo "CFLAGS=\"${CFLAGS}\"" |
1455 |
einfo "CXXFLAGS=\"${CXXFLAGS}\"" |
1466 |
einfo "CXXFLAGS=\"${CXXFLAGS}\"" |
|
|
1467 |
einfo "LDFLAGS=\"${LDFLAGS}\"" |
1456 |
|
1468 |
|
1457 |
# Force internal zip based jar script to avoid random |
1469 |
# Force internal zip based jar script to avoid random |
1458 |
# issues with 3rd party jar implementations. #384291 |
1470 |
# issues with 3rd party jar implementations. #384291 |