bebbo / binutils-gdb

Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git
GNU General Public License v2.0
3 stars 3 forks source link

[Solaris 11.4] binutils/bfd/aout-amiga.c unknown type name PTR for alloca #35

Closed nbriggs closed 1 year ago

nbriggs commented 1 year ago
/export/home/briggs/amiga-gcc/projects/binutils/bfd/aout-amiga.c:51:8: error: unknown type name ‘PTR’
   51 | extern PTR alloca PARAMS ((size_t));
      |        ^~~
/export/home/briggs/amiga-gcc/projects/binutils/bfd/aout-amiga.c:51:12: warning: conflicting types for built-in function ‘alloca’; expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch]
   51 | extern PTR alloca PARAMS ((size_t));
      |            ^~~~~~
make[4]: *** [Makefile:1761: aout-amiga.lo] Error 1
make binutils bfd...failed

The actual program text around this is:

#ifndef alloca
extern PTR alloca PARAMS ((size_t));
#endif

It looks as though this probably got broken in

(binutils/bfd/ChangeLog)

2021-04-05  Alan Modra  <amodra@gmail.com>

        * configure.ac: Don't check for long long or long double type.
        Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h,
        strings.h, time.h, wchar.h, wctype.h or sys/time.h.  Don't check
        for strtoull, free, malloc, realloc, getenv, strstr, snprintf,
        vsnprintf, strlen or setitimer.  Sort AC_CHECK_DECLS.
nbriggs commented 1 year ago

Autoconf 2.60 AC_FUNC_ALLOCA

isoriano1968 commented 1 year ago

Same error (on Solaris 11.4.42 CBE x86) also with the 13.1.1 branch using gcc 11.2.0 to build amiga-gcc ..

git clone https://github.com/bebbo/amiga-gcc cd amiga-gcc make update-gcc pushd projects/gcc git fetch origin amiga13.1:amiga13.1 --depth=10 git checkout amiga13.1 popd make clean make min -j$(nproc)

nbriggs commented 1 year ago

@isoriano1968 - the quick workaround is #include <alloca.h> in projects/binutils/bfd/aout-amiga.c -- if the aim is just to build the compiler etc., one doesn't need the complication of fixing the autoconf scripts and source for the general case.

bebbo commented 1 year ago

alloca is not needed at all -> removed that