Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 356166 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), 5.19 KB, created by
Ryan Hill (RETIRED)
on 2013-08-16 05:27:34 UTC
(
hide
)
Description:
toolchain.eclass.ldflags.diff
Filename:
MIME Type:
Creator:
Ryan Hill (RETIRED)
Created:
2013-08-16 05:27:34 UTC
Size:
5.19 KB
patch
obsolete
>Index: toolchain.eclass >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v >retrieving revision 1.600 >diff -u -r1.600 toolchain.eclass >--- toolchain.eclass 15 Aug 2013 04:39:24 -0000 1.600 >+++ toolchain.eclass 16 Aug 2013 05:26:32 -0000 >@@ -1291,31 +1291,27 @@ > 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: >+# The following variables control the flags the compiler is built with: > # >-# LDFLAGS >-# Flags to pass to ld >+# STAGE1_{C,LD}FLAGS >+# CFLAGS/LDFLAGS used during stage 1 of a gcc bootstrap. > # >-# STAGE1_CFLAGS >-# CFLAGS to use during stage1 of a gcc bootstrap >-# >-# BOOT_CFLAGS >-# CFLAGS to use during stages 2+3 of a gcc bootstrap. >-# >-# Travis Tilley <lv@gentoo.org> (04 Sep 2004) >+# BOOT_{C,LD}FLAGS >+# CFLAGS/LDFLAGS used during stages 2/3 of a gcc bootstrap. > # >+# {C,LD}FLAGS_FOR_TARGET >+# CFLAGS/LDFLAGS used building libs (libgcc, libgomp, libstdc++, etc.) >+ > gcc_do_make() { >- # Set make target to $1 if passed >- [[ -n $1 ]] && GCC_MAKE_TARGET=$1 >- # default target >+ [[ -n $1 ]] && GCC_MAKE_TARGET=${1} >+ > if is_crosscompile || tc-is-cross-compiler ; then > # 3 stage bootstrapping doesnt quite work when you cant run the > # resulting binaries natively ^^; >@@ -1327,37 +1323,40 @@ > # the gcc docs state that parallel make isnt supported for the > # profiledbootstrap target, as collisions in profile collecting may occur. > # boundschecking also seems to introduce parallel build issues. >- if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] || >- use_if_iuse boundschecking >- then >+ if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] || use_if_iuse boundschecking ; then > export MAKEOPTS="${MAKEOPTS} -j1" > fi > >- if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then >- STAGE1_CFLAGS=${STAGE1_CFLAGS-"${CFLAGS}"} >- elif [[ $(gcc-version) == "3.4" && ${GCC_BRANCH_VER} == "3.4" ]] && gcc-specs-ssp ; then >+ if [[ $(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"} >+ if is_crosscompile ; then >+ CFLAGS="-O2 -pipe" >+ FFLAGS=${CFLAGS} >+ FCFLAGS=${CFLAGS} >+ local VAR="CFLAGS_"${CTARGET//-/_} >+ CXXFLAGS=${!VAR} > else >- # we only want to use the system's CFLAGS if not building a >- # cross-compiler. >- BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"} >+# STAGE1_CFLAGS=${STAGE1_CFLAGS-${CFLAGS}} >+ STAGE1_LDFLAGS=${STAGE1_LDFLAGS-${LDFLAGS}} >+ 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}" > >@@ -1444,44 +1443,14 @@ > esac > > strip-unsupported-flags >- >- # TODO: Move to gcc_do_make() >- >- # CFLAGS logic (verified with 3.4.3): >- # CFLAGS: >- # This conflicts when creating a crosscompiler, so set to a sane >- # default in this case: >- # used in ./configure and elsewhere for the native compiler >- # used by gcc when creating libiberty.a >- # used by xgcc when creating libstdc++ (and probably others)! >- # this behavior should be removed... >- # >- # CXXFLAGS: >- # used by xgcc when creating libstdc++ >- # >- # STAGE1_CFLAGS (not used in creating a crosscompile gcc): >- # used by ${CHOST}-gcc for building stage1 compiler >- # >- # BOOT_CFLAGS (not used in creating a crosscompile gcc): >- # used by xgcc for building stage2/3 compiler >- >- if is_crosscompile ; then >- # Set this to something sane for both native and target >- CFLAGS="-O2 -pipe" >- FFLAGS=${CFLAGS} >- FCFLAGS=${CFLAGS} >- >- local VAR="CFLAGS_"${CTARGET//-/_} >- CXXFLAGS=${!VAR} >- fi >- >- export GCJFLAGS=${GCJFLAGS:-${CFLAGS}} > } > > toolchain_src_compile() { > 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