Finish this commit by prefixing HAVE_INITFINI_ARRAY and HAVE_INIT_FINI references in libgloss in the same way.

Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Jan 17 22:20:20 2022 -0500

    newlib: internalize HAVE_INITFINI_ARRAY

    This define is only used by newlib internally, so stop exporting it
    as HAVE_INITFINI_ARRAY since this can conflict with defines packages
    use themselves.

    We don't really need to add _ to HAVE_INIT_FINI too since it isn't
    exported in newlib.h, but might as well be consistent here.

    We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is
    because this is based on a compile-time test in the top configure,
    not on plain shell code in configure.host.  We'd have to replicate
    the test in every subdir in order to have it passed down.
This commit is contained in:
Jeff Law 2022-01-28 21:26:18 -07:00
parent 7a4bef590b
commit 063d67faf0
5 changed files with 6 additions and 6 deletions

View File

@ -36,7 +36,7 @@
#error __USER_LABEL_PREFIX is not defined
#endif
#ifdef HAVE_INITFINI_ARRAY
#ifdef _HAVE_INITFINI_ARRAY
#define _init __libc_init_array
#define _fini __libc_fini_array
#endif
@ -309,4 +309,4 @@ CommandLine: .space 256,0 /* Maximum length of 255 chars handled. */
AngelSVCArgs:
GEN_DWORD CommandLine
.dword 255
#endif
#endif

View File

@ -12,7 +12,7 @@
#error __USER_LABEL_PREFIX is not defined
#endif
#ifdef HAVE_INITFINI_ARRAY
#ifdef _HAVE_INITFINI_ARRAY
#define _init __libc_init_array
#define _fini __libc_fini_array
#endif

View File

@ -36,7 +36,7 @@
#define L(x) _ ## x
#endif
#ifdef HAVE_INITFINI_ARRAY
#ifdef _HAVE_INITFINI_ARRAY
#define _init __libc_init_array
#define _fini __libc_fini_array
#endif

View File

@ -29,7 +29,7 @@
#include "linunistd.h"
#include "newlib.h"
#ifdef HAVE_INITFINI_ARRAY
#ifdef _HAVE_INITFINI_ARRAY
#define _init __libc_init_array
#define _fini __libc_fini_array
#endif

View File

@ -97,7 +97,7 @@ _or1k_exception_stack_size: .word EXCEPTION_STACK_SIZE
*/
/* -------------------------------------------------------------------------- */
#ifdef HAVE_INITFINI_ARRAY
#ifdef _HAVE_INITFINI_ARRAY
#define _init __libc_init_array
#define _fini __libc_fini_array
#endif