From: Iain Sandoe <iain@sandoe.co.uk>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Rainer Orth <ro@cebitec.uni-bielefeld.de>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Marcel Vollweiler <marcel@codesourcery.com>
Subject: Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.
Date: Sat, 10 Sep 2022 14:17:36 +0100 [thread overview]
Message-ID: <05D498D3-589A-43FD-98FF-4B3538C62532@sandoe.co.uk> (raw)
In-Reply-To: <Yxu7h//Zaxy+4jRL@tucnak>
Hi Jakub, Rainer,
> On 9 Sep 2022, at 23:17, Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Fri, Sep 09, 2022 at 11:13:52PM +0100, Iain Sandoe wrote:
>> We already have such a header …
>> include/environ.h
>
> Ah, ok, then please just use it. Seems libgomp Makefile.am
> already includes -I$(top_srcdir)/../include
>
> So just include that and remove the extern char **environ;
> from the constructor.
done as below, tested on powerpc64-linux, x86_64-darwin11/15 confirming that
the bootstrap succeeds on all and there are no new libgomp fails. Pushed to
master
thanks
Iain
[pushed] 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.
---
libgomp/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.24.1
next prev parent reply other threads:[~2022-09-10 13:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 15:22 Marcel Vollweiler
2022-01-18 16:10 ` [PATCH] " Marcel Vollweiler
2022-05-04 15:12 ` Jakub Jelinek
2022-05-04 15:52 ` Tobias Burnus
2022-06-10 13:59 ` Marcel Vollweiler
2022-06-30 11:40 ` Jakub Jelinek
2022-06-30 13:21 ` Jakub Jelinek
2022-06-30 17:13 ` Jakub Jelinek
2022-07-04 15:14 ` Jakub Jelinek
2022-07-25 13:38 ` Marcel Vollweiler
2022-08-02 7:52 ` Marcel Vollweiler
2022-08-22 15:35 ` Jakub Jelinek
2022-08-31 10:56 ` Marcel Vollweiler
2022-09-06 11:51 ` Jakub Jelinek
2022-09-09 20:50 ` Rainer Orth
2022-09-09 22:08 ` Jakub Jelinek
2022-09-09 22:13 ` Iain Sandoe
2022-09-09 22:17 ` Jakub Jelinek
2022-09-10 13:17 ` Iain Sandoe [this message]
2022-09-09 11:50 ` [committed] libgomp: Fix up OMP_PROC_BIND handling [PR106894] Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=05D498D3-589A-43FD-98FF-4B3538C62532@sandoe.co.uk \
--to=iain@sandoe.co.uk \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=marcel@codesourcery.com \
--cc=ro@cebitec.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).