Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108871 - glibc-2.3.5-r2 crosscompile setup_flags called before CFLAGS are set
Summary: glibc-2.3.5-r2 crosscompile setup_flags called before CFLAGS are set
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 07:33 UTC by Jan Kobler
Modified: 2005-10-11 08:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kobler 2005-10-11 07:33:26 UTC
This is the function setup_env from the file glibc-2.3.5-r2.ebuild.
When crosscompiling I think there are two bugs:

setup_env ()
{
    if is_crosscompile || tc-is-cross-compiler; then
        multilib_env ${CTARGET};
    fi;
    export ABI=${ABI:-${DEFAULT_ABI:-default}};

    #setup_flags;   ## ERROR: I think this is to early, move it to the end
                    ## CFLAGS has the value of the CFLAGS of the build machine here

    if is_crosscompile || tc-is-cross-compiler; then
        MULTILIB_ABIS=${MULTILIB_ABIS:-DEFAULT_ABI};
        local VAR1=CFLAGS_${CTARGET//[-.]/_} VAR2=CFLAGS_${ABI};
        export CFLAGS="${CFLAGS} ${!VAR1-${!VAR2--O2 -pipe}}";
	
	### ERROR: To the current value of CFLAGS the value of VAR1 or VAR2 or -O2 -pipe 
	###        is appended
	### It guess it should be something like 
	### export CFLAGS="${CFLAGS}:-${!VAR1-${!VAR2--O2 -pipe}}";
    fi
    
    setup_flags;  # proposed BUGFIX: I think setup_flags should go here, because it
                  # checks and changes CFLAGS
}


The environment before crossdev is called:
ABI=ppc
CFLAGS_ppc='-O2 -mtune=G3 -fno-strict-aliasing -pipe'
CFLAGS='-O2 -march=pentium4 -fomit-frame-pointer'

The values when glibc is build:

CFLAGS='-freorder-blocks -O2 -O2 -mtune=G3 -fno-strict-aliasing -pipe'
CFLAGS_BASE='-O2 -march=pentium4 -fomit-frame-pointer'    <--- this is from the
build machine CBUILD


Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2005-10-11 08:32:52 UTC
no, current behavior is correct