Gentoo Archives: gentoo-sparc

From: Alex McWhirter <alexmcwhirter@×××××××.us>
To: gentoo-sparc@l.g.o
Subject: Re: [gentoo-sparc] GLIBC Issues
Date: Wed, 20 Jan 2016 03:16:00
Message-Id: 569EFBE5.80700@triadic.us
In Reply to: Re: [gentoo-sparc] GLIBC Issues by Mike Frysinger
1 On 01/19/2016 05:18 PM, Mike Frysinger wrote:
2 > On 19 Jan 2016 16:23, Alex McWhirter wrote:
3 >> On 01/19/2016 04:05 PM, Mike Frysinger wrote:
4 >>> if you delete that CHOST override, do the *_OPT values end up being
5 >>> sparc-* ? if not, put `set -x` at the top of setup_env and `set +x` at
6 >>> the bottom of setup_env and send that log over. sparc is the only one
7 >>> that sets CTARGET_OPT in this sub-case, so there might be a bug in
8 >>> there. unfortunately we can't get away from overriding the tuple for
9 >>> glibc since user's can't really change it and glibc itself does no
10 >>> probing :(. my preference otherwise would be to delete this block of
11 >>> code entirely. -mike
12 >> No it doesn't seem to make any difference. multilib_env doesn't set
13 >> CTARGET or CHOST, it just sets the _$ABI variants. It seems to be a
14 >> backup in case they aren't set in the profile.
15 >>
16 >> In my profile ABI and DEFAULT_ABI are set to sparc64 and glibc changes
17 >> that to sparc32 when building multilib which is correct. The question i
18 >> have is, where is CTARGET set? glibc's ebuild doesn't seem to do it and
19 >> my profile doesn't either. multlib_env only sets CTARGET_$ABI which
20 >> isn't use here.
21 > CTARGET is set to CHOST by default by glibc itself. we might only be
22 > doing that at a higher level though, so we might have to reset it in
23 > there.
24 >
25 >> For what it's worth glibc will probe for which assembly to use based on
26 >> the value of -mpcu. I've built enough LFS builds on sparc to know what
27 >> happens when you pass glibc -mpcu=v9 and it need something more
28 >> specific. But if you use -mcpu=ultrasparc,ultrasparc3,etc... glibc will
29 >> pick the right assembly on it's own. At least the current version does
30 >> anyways. So getting rid of *_OPT vars should be fine as long as people
31 >> are something more specific than -mcpu=v9
32 > i'm like 99% sure you're not looking at the right thing :). the issue
33 > isn't multiarch/ifunc (which works), or for some feature testing (which
34 > works), or for code generation by gcc itself (which works), but for
35 > selection of subdirs which host different files. example:
36 >
37 > $ ../configure CC=sparc-unknown-linux-gnu-gcc \
38 > CFLAGS='-O2 -mcpu=niagara -pipe' \
39 > --prefix=/usr --host=sparcv9v-unknown-linux-gnu
40 > $ grep ^config-sysdirs config.make
41 > config-sysdirs = sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu/multiarch sysdeps/sparc/sparc32/sparcv9/fpu/multiarch sysdeps/sparc/sparc32/sparcv9/fpu sysdeps/sparc/sparc32/fpu sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/fpu sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9 sysdeps/unix/sysv/linux/sparc/sparc32/fpu sysdeps/unix/sysv/linux/sparc/sparc32 sysdeps/ieee754/ldbl-64-128 sysdeps/ieee754/ldbl-opt sysdeps/unix/sysv/linux/sparc sysdeps/sparc/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix sysdeps/posix sysdeps/sparc/sparc32/sparcv9/multiarch sysdeps/sparc/sparc32/sparcv9 sysdeps/sparc/sparc32 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-128 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/sparc/sparc32/soft-fp sysdeps/sparc/fpu sysdeps/sparc sysdeps/ieee754 sysdeps/generic
42 >
43 > $ ../configure CC=sparc-unknown-linux-gnu-gcc \
44 > CFLAGS='-O2 -mcpu=niagara -pipe' \
45 > --prefix=/usr --host=sparc-unknown-linux-gnu
46 > $ grep ^config-sysdirs config.make
47 > config-sysdirs = sysdeps/unix/sysv/linux/sparc/sparc32/fpu sysdeps/sparc/sparc32/fpu sysdeps/unix/sysv/linux/sparc/sparc32 sysdeps/ieee754/ldbl-64-128 sysdeps/ieee754/ldbl-opt sysdeps/unix/sysv/linux/sparc sysdeps/sparc/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix sysdeps/posix sysdeps/sparc/sparc32 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-128 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/sparc/sparc32/soft-fp sysdeps/sparc/fpu sysdeps/sparc sysdeps/ieee754 sysdeps/generic
48 >
49 > see how there is significant difference here ?
50 > -mike
51
52 Oh... yea that is a very significant difference. It seems incredibly
53 ulgy that glibc can't work this out on it's own. I wondering if we're
54 missing a check here. It seems to work fine on sparc with a 64bit
55 multilib env, but not sparc64 with a 32bit multilib env.

Replies

Subject Author
Re: [gentoo-sparc] GLIBC Issues Alex McWhirter <alexmcwhirter@×××××××.us>