public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] libgomp: Use libiberty environ.h to declare the environment pointer.
@ 2022-09-12 7:22 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-09-12 7:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:7fbe23803a00cfb714073a25a095db645c61a405
commit 7fbe23803a00cfb714073a25a095db645c61a405
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Mon Sep 12 09:18:58 2022 +0200
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 <iain@sandoe.co.uk>
libgomp/ChangeLog:
* env.c (initialize_env): Include libiberty environ.h.
(cherry picked from commit 7d37c7f67c1bb75f85ad0c07bfff51ca579e1476)
Diff:
---
libgomp/ChangeLog.omp | 7 +++++++
libgomp/env.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 4eb6cfaf1b1..e25a9ad8c49 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,10 @@
+2022-09-12 Tobias Burnus <tobias@codesourcery.com>
+
+ Backport from mainline:
+ 2022-09-10 Iain Sandoe <iain@sandoe.co.uk>
+
+ * env.c (initialize_env): Include libiberty environ.h.
+
2022-09-12 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline:
diff --git a/libgomp/env.c b/libgomp/env.c
index 92f32f72020..ac8c764db60 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 7:22 [gcc/devel/omp/gcc-12] libgomp: Use libiberty environ.h to declare the environment pointer Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).