From patchwork Fri Dec 13 17:54:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Hainque X-Patchwork-Id: 1209318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515916-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="EXXiELji"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ZJFw6ykqz9sP3 for ; Sat, 14 Dec 2019 04:54:27 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:subject:date:message-id:cc:to:mime-version; q=dns; s=default; b=NBoV+qLuk6g3rVnPCBjtX2F8DrI7vrFID6lcP7mqJgCGhwBqiX Wp56GTGMQFp45cU0+RNqLu1Cuetz8i2fRunxcFUSD7qffG8kSvtj+x4nQwjGr4Tx WpUNd9EbwxtakFqoIr1fqDWB+zBICUfWTxcmF1hX16wcK3rCoF9ZQD11E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:subject:date:message-id:cc:to:mime-version; s= default; bh=3loBKK2lFKfWYXu7eipjwEsz9OU=; b=EXXiELjijzmx98SJ85E+ wdm1wDgZ8GZQzPRqZOCk7fPLUJ82scVdBfimERoGjpTJJsiLoiDtaclrOEovEQof YKMx8ADZ7NdRLCtOCCi3LeU9MrNFqjozOaDEipMxusJsRLZOO8xjXkOk9JXap37z lME76ZCD/zWLs0eP85eu96Q= Received: (qmail 85923 invoked by alias); 13 Dec 2019 17:54:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 85906 invoked by uid 89); 13 Dec 2019 17:54:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=decade, H*c:HHHH, H*c:HHHHHHHH, our X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2019 17:54:10 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D1C6B818D7; Fri, 13 Dec 2019 18:54:06 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id srNa7EDUOJ_6; Fri, 13 Dec 2019 18:54:06 +0100 (CET) Received: from [192.168.0.12] (bny92-4-82-228-126-192.fbx.proxad.net [82.228.126.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 7D18381A12; Fri, 13 Dec 2019 18:54:06 +0100 (CET) From: Olivier Hainque Subject: [patch] Let libstdc++ know that VxWorks has_nanosleep Date: Fri, 13 Dec 2019 18:54:05 +0100 Message-Id: Cc: Olivier Hainque , Corentin Gay , libstdc++@gcc.gnu.org To: GCC Patches Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) This change adjusts the libstdc++ configuration for VxWorks to set ac_has_nanosleep=yes, which enables the use of nanosleep from the library. While this technically depends on the kernel configuration (INCLUDE_POSIX_TIMERS) this is the normal configuration in all the environments we have been given to work with for the past decade and activating this improves the library in our experience. Tested in accordance with the description in https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html Best Regards, Olivier 2019-12-13 Corentin Gay libstdc++/ * acinclude.m4 (vxworks*): New entry. Set ac_has_nanosleep=yes. * configure: Regenerate. --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1408,6 +1408,11 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ ac_has_nanosleep=yes ac_has_sched_yield=yes ;; + # VxWorks has nanosleep as soon as the kernel is configured with + # INCLUDE_POSIX_TIMERS, which is normally/most-often the case. + vxworks*) + ac_has_nanosleep=yes + ;; gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) AC_MSG_CHECKING([for at least GNU libc 2.17]) AC_TRY_COMPILE( diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index fa86ca1e731..717f5c1d21d 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -20871,6 +20871,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_has_nanosleep=yes ac_has_sched_yield=yes ;; + # VxWorks has nanosleep as soon as the kernel is configured with + # INCLUDE_POSIX_TIMERS, which is normally/most-often the case. + vxworks*) + ac_has_nanosleep=yes + ;; gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at least GNU libc 2.17" >&5 $as_echo_n "checking for at least GNU libc 2.17... " >&6; }