]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp: Use libiberty environ.h to declare the environment pointer.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Sep 2022 07:54:37 +0000 (08:54 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Sep 2022 13:14:10 +0000 (14:14 +0100)
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.

libgomp/env.c

index 92f32f72020f398dabaf782ab42c9a1618d9fee5..ac8c764db6029ec877bb34c5abba2239e6977284 100644 (file)
@@ -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;