From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id D7FEB3858D28 for ; Mon, 31 Jan 2022 13:38:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D7FEB3858D28 Received: by mail-pl1-x634.google.com with SMTP id j16so12346098plx.4 for ; Mon, 31 Jan 2022 05:38:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=x/K+F52w2BErx+IjTpBaAmIyz1YSpEe2UQiKHBDQPGs=; b=3XIqo3aP03Kodc4EtEx9ul105txE/UYJd9NZZn8PS47QPuliaj2XuxZkfqoseEtJ9i tikie6eCfGIouH3gWn+3k+FSliHBpKjol+cbNIdBD2K2SgVUqE1YObRjTdd2hzc9QbFx yzHxpTOXP/bGstmM+IU0c+fY0QPiKVKrsqzZ/AtoxcMdMD1cXW4WbPy/r3KkedA5FFyJ DU1hWvUfD8jEmYuUVsoXM/McAQSgLLfrQZG4KsimaKt4o7b9RNQmITmX0OFilgjBR1/Z nVcFCmYcmoSsoyaNHk+rXHLj0HA+UVAmRt4V/3RvpzcI3oSYI2duWAh6cpvFjyi9cz5a dEMA== X-Gm-Message-State: AOAM533gosiNkN+NaO5SCKmNDD8TMStOqdUwL8F5Rh532YFMRpkWchDG 9LAcm16dIhT9uipMjeqduo2x3ztIIwdD5g== X-Google-Smtp-Source: ABdhPJzgIYyF5PgIn6yzVvrGSSmP9Y+EB7uVu8SE/7Name7zPY21j7CtXZ7jiCRSuWojtiG0Aizo2w== X-Received: by 2002:a17:902:70cb:: with SMTP id l11mr20611189plt.128.1643636298398; Mon, 31 Jan 2022 05:38:18 -0800 (PST) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id q15sm11464306pjj.19.2022.01.31.05.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 05:38:17 -0800 (PST) From: Stafford Horne To: GCC patches Cc: Openrisc , Bernd Kuhls Subject: [PATCH] gcc: define _REENTRANT for OpenRISC when -pthread is passed Date: Mon, 31 Jan 2022 22:38:13 +0900 Message-Id: <20220131133813.1142801-1-shorne@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2022 13:38:21 -0000 From: Bernd Kuhls The detection of pthread support fails on OpenRISC unless _REENTRANT is defined. Added the CPP_SPEC definition to correct this. gcc/ChangeLog: PR target/94372 * config/or1k/linux.h (CPP_SPEC): Define. Signed-off-by: Bernd Kuhls --- This was brought up on the buildroot list and somehow I missed it. Sending it now. I plan to commit soon. gcc/config/or1k/linux.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h index 52909af41a6..80f77c72232 100644 --- a/gcc/config/or1k/linux.h +++ b/gcc/config/or1k/linux.h @@ -32,6 +32,8 @@ #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-or1k.so.1" +#define CPP_SPEC "%{pthread:-D_REENTRANT}" + #undef LINK_SPEC #define LINK_SPEC "%{h*} \ %{static:-Bstatic} \ -- 2.31.1