Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 347684 Details for
Bug 337788
sys-devel/gcc does not respect LDFLAGS
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
toolchain.eclass.ldflags.diff
toolchain.eclass.ldflags.diff (text/plain), 3.42 KB, created by
Ryan Hill (RETIRED)
on 2013-05-08 00:55:39 UTC
(
hide
)
Description:
toolchain.eclass.ldflags.diff
Filename:
MIME Type:
Creator:
Ryan Hill (RETIRED)
Created:
2013-05-08 00:55:39 UTC
Size:
3.42 KB
patch
obsolete
>--- toolchain.eclass >+++ toolchain.eclass >@@ -1271,27 +1271,38 @@ > popd >/dev/null > } > >-# This function accepts one optional argument, the make target to be used. >-# If ommitted, gcc_do_make will try to guess whether it should use all, >-# profiledbootstrap, or bootstrap-lean depending on CTARGET and arch. An >-# example of how to use this function: >+# This function accepts one optional argument: the make target to be used. >+# If omitted, gcc_do_make will try to guess whether it should use make "all" >+# or "bootstrap-lean" depending on CTARGET and arch. An example of how to use >+# this function: > # > # gcc_do_make all-target-libstdc++-v3 > # >-# In addition to the target to be used, the following variables alter the >-# behavior of this function: >-# >-# LDFLAGS >-# Flags to pass to ld >+# The following variables control the flags the compiler is built with: > # > # STAGE1_CFLAGS >-# CFLAGS to use during stage1 of a gcc bootstrap >+# Compiler flags used on the host for stage 1 / crosscompiling. >+# >+# STAGE1_LDFLAGS >+# Linker flags used on the host for stage 1 / crosscompiling. (Note this >+# wasn't added until around ~4.6 - older versions will just use LDFLAGS). >+# >+# * Note that we do not set either of these ourselves if we're bootstrapping. >+# * It's created bugs in the past and the stage 1 compiler just gets thrown >+# * out in the end anyways. > # > # BOOT_CFLAGS >-# CFLAGS to use during stages 2+3 of a gcc bootstrap. >+# Compiler flags used on the host for stage2+ when bootstrapping. > # >-# Travis Tilley <lv@gentoo.org> (04 Sep 2004) >+# BOOT_LDFLAGS >+# Linker flags used on the host for stage2+ when bootstrapping. > # >+# CFLAGS_FOR_TARGET >+# Compiler flags to use building libraries. >+# >+# LDFLAGS_FOR_TARGET >+# Linker flags to use building libraries. >+ > gcc_do_make() { > # Set make target to $1 if passed > [[ -n $1 ]] && GCC_MAKE_TARGET=$1 >@@ -1315,29 +1326,29 @@ > > if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then > STAGE1_CFLAGS=${STAGE1_CFLAGS-"${CFLAGS}"} >+ STAGE1_LDFLAGS=${STAGE1_LDFLAGS-"${LDFLAGS}"} > elif [[ $(gcc-version) == "3.4" && ${GCC_BRANCH_VER} == "3.4" ]] && gcc-specs-ssp ; then > # See bug #79852 > STAGE1_CFLAGS=${STAGE1_CFLAGS-"-O2"} > fi > >- if is_crosscompile; then >- # In 3.4, BOOT_CFLAGS is never used on a crosscompile... >- # but I'll leave this in anyways as someone might have had >- # some reason for putting it in here... --eradicator >- BOOT_CFLAGS=${BOOT_CFLAGS-"-O2"} >- else >- # we only want to use the system's CFLAGS if not building a >- # cross-compiler. >+ if ! is_crosscompile ; then > BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"} >+ BOOT_LDFLAGS=${BOOT_LDFLAGS-"${LDFLAGS}"} >+ CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-"${CFLAGS}"} >+ LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET-"${LDFLAGS}"} > fi > > pushd "${WORKDIR}"/build >/dev/null > > emake \ >- LDFLAGS="${LDFLAGS}" \ > STAGE1_CFLAGS="${STAGE1_CFLAGS}" \ >- LIBPATH="${LIBPATH}" \ >+ STAGE1_LDFLAGS="${STAGE1_LDFLAGS}" \ > BOOT_CFLAGS="${BOOT_CFLAGS}" \ >+ BOOT_LDFLAGS="${BOOT_LDFLAGS}" \ >+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET}" \ >+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET}" \ >+ LIBPATH="${LIBPATH}" \ > ${GCC_MAKE_TARGET} \ > || die "emake failed with ${GCC_MAKE_TARGET}" > >@@ -1453,6 +1464,7 @@ > gcc_do_filter_flags > einfo "CFLAGS=\"${CFLAGS}\"" > einfo "CXXFLAGS=\"${CXXFLAGS}\"" >+ einfo "LDFLAGS=\"${LDFLAGS}\"" > > # Force internal zip based jar script to avoid random > # issues with 3rd party jar implementations. #384291
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 337788
:
247728
|
248313
|
259636
|
347684
|
356166