1 |
On 19 Jan 2016 16:23, Alex McWhirter wrote: |
2 |
> On 01/19/2016 04:05 PM, Mike Frysinger wrote: |
3 |
> > if you delete that CHOST override, do the *_OPT values end up being |
4 |
> > sparc-* ? if not, put `set -x` at the top of setup_env and `set +x` at |
5 |
> > the bottom of setup_env and send that log over. sparc is the only one |
6 |
> > that sets CTARGET_OPT in this sub-case, so there might be a bug in |
7 |
> > there. unfortunately we can't get away from overriding the tuple for |
8 |
> > glibc since user's can't really change it and glibc itself does no |
9 |
> > probing :(. my preference otherwise would be to delete this block of |
10 |
> > code entirely. -mike |
11 |
> |
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 |
|
22 |
CTARGET is set to CHOST by default by glibc itself. we might only be |
23 |
doing that at a higher level though, so we might have to reset it in |
24 |
there. |
25 |
|
26 |
> For what it's worth glibc will probe for which assembly to use based on |
27 |
> the value of -mpcu. I've built enough LFS builds on sparc to know what |
28 |
> happens when you pass glibc -mpcu=v9 and it need something more |
29 |
> specific. But if you use -mcpu=ultrasparc,ultrasparc3,etc... glibc will |
30 |
> pick the right assembly on it's own. At least the current version does |
31 |
> anyways. So getting rid of *_OPT vars should be fine as long as people |
32 |
> are something more specific than -mcpu=v9 |
33 |
|
34 |
i'm like 99% sure you're not looking at the right thing :). the issue |
35 |
isn't multiarch/ifunc (which works), or for some feature testing (which |
36 |
works), or for code generation by gcc itself (which works), but for |
37 |
selection of subdirs which host different files. example: |
38 |
|
39 |
$ ../configure CC=sparc-unknown-linux-gnu-gcc \ |
40 |
CFLAGS='-O2 -mcpu=niagara -pipe' \ |
41 |
--prefix=/usr --host=sparcv9v-unknown-linux-gnu |
42 |
$ grep ^config-sysdirs config.make |
43 |
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 |
44 |
|
45 |
$ ../configure CC=sparc-unknown-linux-gnu-gcc \ |
46 |
CFLAGS='-O2 -mcpu=niagara -pipe' \ |
47 |
--prefix=/usr --host=sparc-unknown-linux-gnu |
48 |
$ grep ^config-sysdirs config.make |
49 |
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 |
50 |
|
51 |
see how there is significant difference here ? |
52 |
-mike |