From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 9B9161F619 for ; Mon, 24 Feb 2020 18:34:26 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=ZXI E10U9lP+ZvjmLkZMfINlfBak9+1IB2kLSJM+XhkPLAE0DXg/pxKMY670hPgSWO+i h6oZ38gpbdCzPC3DdYZQTsyySkRnHsk+E8S3YDVCjUzyBHCDIrf9JRufEEw5nCJp e83RSIpwlTXfYaskfAnCw2AFPHIOPNAOLfE3zVMM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=W0iu5UO1K OXXkyw/iWCeTHh4Wjg=; b=Dqu3joutpZ1fNTFA/G7mY1PriG29pKJhNvBPb7MxN Gu9nOXSQi2fu4/ekZ4OZypzmxPE7xJtWzzFjxXk+PvGBX20kBE8Tr5Pqqj8PpPwq bHjN+rTzIHUcSekNtKUmKebCWdu758CaRPmV3AmpzLwzpdZZhqW5O+LyhkdLv/rA VY= Received: (qmail 10805 invoked by alias); 24 Feb 2020 18:34:24 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 10797 invoked by uid 89); 24 Feb 2020 18:34:23 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtprelay-out1.synopsys.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1582569261; bh=+DXCnfjaFK638fGlWaC+q6ownQXOxyuLJMqngqdt4bs=; h=From:To:Cc:Subject:Date:From; b=XHKeuGEpKfg9uey+iaxssV9uqhbiMOEX6Mdo9izMltEDiuXuKLIj3RzjYCWOF/cyQ iFRk4W9o2lBpzr6oyc8PGYhaPvZmjpKeMlRPAYKOAHX/el6vLOzzEM/csdfATOaOUp F4xwepc+IT7q4QGDHT+kzRzPF3x9XCtU+iw2N+GO9HXvVSGRLIEGGZmcjWoMr4ECty fKWleo9hWlSefpgqh0x5mQcM+SCtoydEgqxBZ/gIntVzQlP7+n2pXucrYhtgHEXbW6 LXlnR6scSa17xpOx869WF8dr8pFCOfSaeCg6Qw0iyUKzBKtO4Cn0/3c8A1sW39R9wT MhGTB6nBRK8uA== From: Vineet Gupta To: libc-alpha@sourceware.org, arnd@arndb.de Cc: linux-snps-arc@lists.infradead.org, alistair23@gmail.com, lukma@denx.de, Vineet Gupta Subject: [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches Date: Mon, 24 Feb 2020 10:34:13 -0800 Message-Id: <20200224183413.13629-1-vgupta@synopsys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This provides better out-of-box support for 32-bit arches with 64-bit time_t Signed-off-by: Vineet Gupta --- sysdeps/unix/sysv/linux/generic/sysdep.h | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h index 23defce7c3e1..27b0079a2a71 100644 --- a/sysdeps/unix/sysv/linux/generic/sysdep.h +++ b/sysdeps/unix/sysv/linux/generic/sysdep.h @@ -17,6 +17,7 @@ . */ #include +#include #include #include #include @@ -33,3 +34,50 @@ #define __NR_pread __NR_pread64 #define __NR_pwrite __NR_pwrite64 #endif + +/* Override syscalls for asm-generic ABIs with 64-bit time. */ +#if __WORDSIZE == 32 && __TIMESIZE == 64 + +# undef __NR_futex +# define __NR_futex __NR_futex_time64 + +# undef __NR_rt_sigtimedwait +# define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64 + +# undef __NR_ppoll +# define __NR_ppoll __NR_ppoll_time64 + +# undef __NR_utimensat +# define __NR_utimensat __NR_utimensat_time64 + +# undef __NR_pselect6 +# define __NR_pselect6 __NR_pselect6_time64 + +# undef __NR_recvmmsg +# define __NR_recvmmsg __NR_recvmmsg_time64 + +# undef __NR_semtimedop +# define __NR_semtimedop __NR_semtimedop_time64 + +# undef __NR_mq_timedreceive +# define __NR_mq_timedreceive __NR_mq_timedreceive_time64 + +# undef __NR_mq_timedsend +# define __NR_mq_timedsend __NR_mq_timedsend_time64 + +# undef __NR_clock_getres +# define __NR_clock_getres __NR_clock_getres_time64 + +# undef __NR_timerfd_settime +# define __NR_timerfd_settime __NR_timerfd_settime64 + +# undef __NR_timerfd_gettime +# define __NR_timerfd_gettime __NR_timerfd_gettime64 + +# undef __NR_sched_rr_get_interval +# define __NR_sched_rr_get_interval __NR_sched_rr_get_interval_time64 + +# undef __NR_clock_adjtime +# define __NR_clock_adjtime __NR_clock_adjtime64 + +#endif -- 2.20.1