GDB TLS testing

Mark Millard marklmi at yahoo.com
Wed Jan 23 01:06:48 UTC 2019



On 2019-Jan-22, at 16:28, Mark Millard <marklmi at yahoo.com> wrote:



> On 2019-Jan-22, at 15:52, Mark Millard <marklmi at yahoo.com> wrote:
> 
> 
> 
>> On 2019-Jan-22, at 15:07, John Baldwin <jhb at freebsd.org> wrote:
>> 
>>> On 1/22/19 2:56 PM, Mark Millard wrote:
>>>> 
>>>> . . .
>>>> 
>>>> So I'm trying:
>>>> 
>>>> # env CFLAGS="-g -O2 -I/usr/local/include" ./configure
>>>> . . .
>>>> # rm */config.cache
>>>> # make
>>> 
>>> Eh, try gmake instead of make.  I'm pretty sure the GDB repository requires
>>> GNU make.
>> 
>> Well, I started over from scratch (empty tree other than .git) and using gmake
>> got to a use of ATTRIBUTE_UNUSED that failed for lack of such a macro
>> definition:
> 
> Bad wording of my thought: I was not trying to say that it was certain that
> there was no definition. It was more like the usage/content being appropriate
> to also being supported by clang.
> 
>> cc -c -g -O2 -I/usr/local/include -DDEFAULT_INLINE=PSIM_INLINE_LOCALS  -DWITH_HOST_BYTE_ORDER=BIG_ENDIAN -DWITH_SMP=5          -DHAVE_TERMIOS_STRUCTURE -DHAVE_DEVZERO    -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb  -I./../../gdb/config  -DHAVE_COMMON_FPU -I../common -I./../common hw_htab.c
>> In file included from hw_htab.c:27:
>> /usr/local/include/bfd.h:1665:38: error: expected ')'
>> bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
>>                                     ^

Actually: the wrong bfd.h because -I/usr/local/include is too early
and overrides the local -I usage and binutils is installed:

# find / -name bfd.h -print | less
/usr/local/include/bfd.h
/usr/src/gnu/usr.bin/binutils/libbfd/bfd.h
/root/c_tests/ppc64_tls_git/bfd/bfd.h

# pkg which /usr/local/include/bfd.h
/usr/local/include/bfd.h was installed by package binutils-2.30_6,1

The 2 files do not seem to be equivalent.


>> /usr/local/include/bfd.h:1665:26: note: to match this '('
>> bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
>>                         ^
>> /usr/local/include/bfd.h:1668:3: error: use of undeclared identifier 'ptr'
>>  ptr->userdata = val;
>>  ^
>> /usr/local/include/bfd.h:1668:19: error: use of undeclared identifier 'val'
>>  ptr->userdata = val;
>>                  ^
>> /usr/local/include/bfd.h:1673:33: error: expected ')'
>> bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
>>                                ^
>> /usr/local/include/bfd.h:1673:21: note: to match this '('
>> bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
>>                    ^
>> /usr/local/include/bfd.h:1675:3: error: use of undeclared identifier 'ptr'
>>  ptr->vma = ptr->lma = val;
>>  ^
>> /usr/local/include/bfd.h:1675:14: error: use of undeclared identifier 'ptr'
>>  ptr->vma = ptr->lma = val;
>>             ^
>> /usr/local/include/bfd.h:1675:25: error: use of undeclared identifier 'val'
>>  ptr->vma = ptr->lma = val;
>>                        ^
>> /usr/local/include/bfd.h:1676:3: error: use of undeclared identifier 'ptr'
>>  ptr->user_set_vma = TRUE;
>>  ^
>> /usr/local/include/bfd.h:1681:39: error: expected ')'
>> bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
>>                                      ^
>> /usr/local/include/bfd.h:1681:27: note: to match this '('
>> bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr,
>>                          ^
>> /usr/local/include/bfd.h:1684:3: error: use of undeclared identifier 'ptr'
>>  ptr->alignment_power = val;
>>  ^
>> /usr/local/include/bfd.h:1684:26: error: use of undeclared identifier 'val'
>>  ptr->alignment_power = val;
>>                         ^
>> /usr/local/include/bfd.h:6764:3: error: type name requires a specifier or qualifier
>>  ENUM_BITFIELD (bfd_format) format : 3;
>>  ^
>> /usr/local/include/bfd.h:6764:29: error: expected ';' at end of declaration list
>>  ENUM_BITFIELD (bfd_format) format : 3;
>>                            ^
>>                            ;
>> /usr/local/include/bfd.h:6767:3: error: type name requires a specifier or qualifier
>>  ENUM_BITFIELD (bfd_direction) direction : 2;
>>  ^
>> /usr/local/include/bfd.h:6767:18: error: a parameter list without types is only allowed in a function definition
>>  ENUM_BITFIELD (bfd_direction) direction : 2;
>>                 ^
>> /usr/local/include/bfd.h:6767:3: error: duplicate member 'ENUM_BITFIELD'
>>  ENUM_BITFIELD (bfd_direction) direction : 2;
>>  ^
>> /usr/local/include/bfd.h:6764:3: note: previous declaration is here
>>  ENUM_BITFIELD (bfd_format) format : 3;
>>  ^
>> /usr/local/include/bfd.h:6767:32: error: expected ';' at end of declaration list
>>  ENUM_BITFIELD (bfd_direction) direction : 2;
>>                               ^
>>                               ;
>> /usr/local/include/bfd.h:6909:3: error: type name requires a specifier or qualifier
>>  ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
>>  ^
>> /usr/local/include/bfd.h:6909:18: error: a parameter list without types is only allowed in a function definition
>>  ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
>>                 ^
>> fatal error: too many errors emitted, stopping now [-ferror-limit=]
>> 20 errors generated.
>> gmake[3]: *** [Makefile:158: hw_htab.o] Error 1
>> gmake[3]: Leaving directory '/root/c_tests/ppc64_tls_git/sim/ppc'
>> gmake[2]: *** [Makefile:129: all] Error 1
>> gmake[2]: Leaving directory '/root/c_tests/ppc64_tls_git/sim'
>> gmake[1]: *** [Makefile:9532: all-sim] Error 2
>> gmake[1]: Leaving directory '/root/c_tests/ppc64_tls_git'
>> gmake: *** [Makefile:849: all] Error 2
>> 
>> 
>> 
>> (Again: cc here is system clang.)





===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ppc mailing list