From patchwork Mon Nov 8 09:56:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 47200 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AE72A385781E for ; Mon, 8 Nov 2021 09:56:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id A6B4E3858401 for ; Mon, 8 Nov 2021 09:56:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6B4E3858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rasmusvillemoes.dk Received: by mail-lj1-x234.google.com with SMTP id e9so7892850ljl.5 for ; Mon, 08 Nov 2021 01:56:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qoqYog+ywJPXeRFXCB9odVZsmpL1qNnGvmV8PSVxJcM=; b=OJsxe5oHbDuYKmpfEwcpxf2F2EtN/PVP4sC/pMsxkRAKCZGoRoqvlgTJwuZC23JwJ7 uijGtbY6kHQbtnqTAPguMiehRM/lfRB0xLlegBchyk/8X8cKt+DGLk0BkPVmqQebuZx4 4Q5T5YEMf5ouh35RM8p6VCpglWR89zM2yBoEw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=qoqYog+ywJPXeRFXCB9odVZsmpL1qNnGvmV8PSVxJcM=; b=asXXGXI5eiwMkrCgJG1odaBSjsD9ZDzMlGZhlXcObxY551FMidpflfrXnwvxy876xn Wc1FyJAzemsmEOrNitORJYTXAcpGx4XWfNrBun8gvImQoS4Zm5AETUWnDpWC0buFm+u7 DmTc09GeBP3q0WGM4S9thDXpvF0dl/tCqjFbxx6VzhTMeiObhc6rImtFgv4m9mWYfowa 76ciIC+O7YUDs7oIcF43wMgZg9xJp+2L4fpzeTRbvQCnmUo705eY9tTd2JqbtdBQ3S6M OYXyGCvvTRs/YVM2M16iGvt3fzfaNV7HDD7ga7pDsh4kHgQ/iDe1XH8AROi3q46G/jbm LYCw== X-Gm-Message-State: AOAM533vpOAkjiE1/BLj+u8wv3E3sMSJUUErHs9h43xXlTg4WANJw6Hw qlvKR8hCfQDfmQ1/iV46OUXxtYGZb9WWjQGI X-Google-Smtp-Source: ABdhPJy7GCu96FJVrCgmi7qWi9laQc83YVvCTuZAi1+8I+1f7BQwHqfOUsaQuBBe4L6tyyVbqiGf4g== X-Received: by 2002:a2e:b17a:: with SMTP id a26mr62834940ljm.69.1636365385909; Mon, 08 Nov 2021 01:56:25 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id w36sm1763723lfu.81.2021.11.08.01.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 01:56:25 -0800 (PST) From: Rasmus Villemoes X-Google-Original-From: Rasmus Villemoes To: gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6 Date: Mon, 8 Nov 2021 10:56:13 +0100 Message-Id: <20211108095613.1214963-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Cc: Jerome Lambourg , Rasmus Villemoes Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" According to https://gcc.gnu.org/legacy-ml/gcc-patches/2008-03/msg01698.html, the TLS support, including the __tls_lookup function, was added to VxWorks in 6.6. It certainly doesn't exist on our VxWorks 5 platform, but the fallback code in eh_globals.cc using __gthread_key_create() etc. used to work just fine. libstdc++-v3/ChangeLog: * config/os/vxworks/os_defines.h (_GLIBCXX_HAVE_TLS): Only define for VxWorks >= 6.6. --- libstdc++-v3/config/os/vxworks/os_defines.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/config/os/vxworks/os_defines.h b/libstdc++-v3/config/os/vxworks/os_defines.h index c881b2b4b9e..75a68bc605b 100644 --- a/libstdc++-v3/config/os/vxworks/os_defines.h +++ b/libstdc++-v3/config/os/vxworks/os_defines.h @@ -45,8 +45,10 @@ #define _GLIBCXX_USE_WEAK_REF 0 #endif -// We support TLS on VxWorks (either directly or with emutls) +// We support TLS on VxWorks >= 6.6 (either directly or with emutls) +#if !_VXWORKS_PRE(6, 6) #define _GLIBCXX_HAVE_TLS 1 +#endif // VxWorks7 comes with a DinkumWare library and the system headers which we // are going to include for libstdc++ have a few related intrinsic