From: Iain Sandoe Date: Mon, 12 Sep 2022 07:18:58 +0000 (+0200) Subject: libgomp: Use libiberty environ.h to declare the environment pointer. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fbe23803a00cfb714073a25a095db645c61a405;p=thirdparty%2Fgcc.git libgomp: Use libiberty environ.h to declare the environment pointer. This allows for target-specific mechanisms for finding the pointer. Signed-off-by: Iain Sandoe libgomp/ChangeLog: * env.c (initialize_env): Include libiberty environ.h. (cherry picked from commit 7d37c7f67c1bb75f85ad0c07bfff51ca579e1476) --- diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 4eb6cfaf1b1e..e25a9ad8c497 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,10 @@ +2022-09-12 Tobias Burnus + + Backport from mainline: + 2022-09-10 Iain Sandoe + + * env.c (initialize_env): Include libiberty environ.h. + 2022-09-12 Tobias Burnus Backport from mainline: diff --git a/libgomp/env.c b/libgomp/env.c index 92f32f72020f..ac8c764db602 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -60,6 +60,7 @@ #endif /* LIBGOMP_OFFLOADED_ONLY */ #include "secure_getenv.h" +#include "environ.h" /* Default values of ICVs according to the OpenMP standard. */ const struct gomp_default_icv gomp_default_icv_values = { @@ -2033,7 +2034,6 @@ startswith (const char *str, const char *prefix) static void __attribute__((constructor)) initialize_env (void) { - extern char **environ; char **env; int omp_var, dev_num = 0, dev_num_len = 0, i; bool ignore = false;