[Bug binutils/24028] New: PPC_INT_FMT should be "ll" on Mojave.

2018-12-23 Thread pjb at informatimago dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24028

Bug ID: 24028
   Summary: PPC_INT_FMT should be "ll" on Mojave.
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: pjb at informatimago dot com
  Target Milestone: ---

With binutils-gdb git head, compiling on Mojave, we get errors:
```
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./../include
-I./../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow
-Wstack-usage=262144 -Werror -I/usr/local/gcc/include -I/opt/local/include -MT
ppc-dis.lo -MD -MP -MF .deps/ppc-dis.Tpo -c ppc-dis.c -o ppc-dis.o
ppc-dis.c: In function 'print_insn_powerpc':
ppc-dis.c:764:43: error: format '%ld' expects argument of type 'long int', but
argument 3 has type 'int64_t' {aka 'long long int'} [-Werror=format=]
  (*info->fprintf_func) (info->stream, "r%" PPC_INT_FMT "d", value);
   ^~~~  ~
ppc-dis.c:764:61: note: format string is defined here
  (*info->fprintf_func) (info->stream, "r%" PPC_INT_FMT "d", value);
 ^
ppc-dis.c:766:43: error: format '%ld' expects argument of type 'long int', but
argument 3 has type 'int64_t' {aka 'long long int'} [-Werror=format=]
... etc ...
```
PPC_INT_FMT is defined to be "l" instead of "ll" because 
BFD_HOST_64BIT_LONG is defined as 1 (and BFD_HOST_64BIT_LONG_LONG as 0).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/24029] New: Failure to compile plural.c (libintl) on Mojave.

2018-12-23 Thread pjb at informatimago dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24029

Bug ID: 24029
   Summary: Failure to compile plural.c (libintl) on Mojave.
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: pjb at informatimago dot com
  Target Milestone: ---

Compiling binutil-gdb git HEAD on Mojave, we get those errors:
```
gcc -c  -g -O2 -DHAVE_CONFIG_H  -I. -I. plural.c
In file included from plural.y:35:
plural-exp.h:102:23: error: conflicting types for 'libintl_gettextparse'
 # define PLURAL_PARSE libintl_gettextparse
   ^~~~
plural.y:40:25: note: in expansion of macro 'PLURAL_PARSE'
 # define __gettextparse PLURAL_PARSE
 ^~~~

plural.c:190:5: note: in expansion of macro '__gettextparse'
 int __gettextparse (void);

plural.c:190:5: note: in expansion of macro '__gettextparse'
 int __gettextparse (void);
 ^~
plural-exp.h:102:23: note: previous declaration of 'libintl_gettextparse' was
here
 # define PLURAL_PARSE libintl_gettextparse
   ^~~~
plural-exp.h:114:12: note: in expansion of macro 'PLURAL_PARSE'
 extern int PLURAL_PARSE PARAMS ((void *arg));
^~~~
plural-exp.h:102:23: error: conflicting types for 'libintl_gettextparse'
 # define PLURAL_PARSE libintl_gettextparse
   ^~~~
plural.y:40:25: note: in expansion of macro 'PLURAL_PARSE'
 # define __gettextparse PLURAL_PARSE
 ^~~~
plural.c:66:25: note: in expansion of macro '__gettextparse'
 #define yyparse __gettextparse
 ^~
plural.c:1127:1: note: in expansion of macro 'yyparse'
 yyparse (void)
 ^~~
plural-exp.h:102:23: note: previous declaration of 'libintl_gettextparse' was
here
 # define PLURAL_PARSE libintl_gettextparse
   ^~~~
plural-exp.h:114:12: note: in expansion of macro 'PLURAL_PARSE'
 extern int PLURAL_PARSE PARAMS ((void *arg));
^~~~
plural.c: In function 'libintl_gettextparse':
plural.c:67:25: error: too few arguments to function '__gettextlex'
 #define yylex   __gettextlex
 ^~~~
plural.c:1295:16: note: in expansion of macro 'yylex'
   yychar = yylex (&yylval);
^
plural.c:67:25: note: declared here
 #define yylex   __gettextlex
 ^~~~
plural.y:69:12: note: in expansion of macro 'yylex'
 static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
^
plural.y:178:29: error: 'arg' undeclared (first use in this function)
  ((struct parse_args *) arg)->res = $1;
 ^~~
plural.y:178:29: note: each undeclared identifier is reported only once for
each function it appears in
make[2]: *** [Makefile:133: plural.o] Error 1
make[2]: Leaving directory '/usr/local/gcc/src/binutils-gdb/intl'
make[1]: *** [Makefile:5940: all-intl] Error 2
make[1]: Leaving directory '/usr/local/gcc/src/binutils-gdb'
make: *** [Makefile:878: all] Error 2
```

I would say that "YFLAGS = --name-prefix=__gettext" in the Makefile is at
fault...  See the comment in plural-exp.h, we are in the case IN_LIBINTL, not
in the case_LIBC!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils