From patchwork Thu Feb 22 19:48:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 1902937 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TgkHB4PM6z23d2 for ; Fri, 23 Feb 2024 06:49:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 877D03858417 for ; Thu, 22 Feb 2024 19:49:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from einhorn-mail-out.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by sourceware.org (Postfix) with ESMTPS id 7EB053858425 for ; Thu, 22 Feb 2024 19:48:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EB053858425 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=debian.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7EB053858425 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.109.42.8 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708631331; cv=none; b=XVNYbL7+JQxi0U5JZGtpRkDEMU4cLD1neYxf+zOOdMImT1d/V1PwH1GYMnbKRl/KAavqn8WnQLTEvPCS2D+HwlowmASU2JWWPbHJ15DxTFbsGKt9NOxp9F+GLJXcN8FWQyYxL/2noElsWVzFuA6t2dMGzLL86MMqHb4BEhsXGXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708631331; c=relaxed/simple; bh=EsYsf1o5xWWavgcz4lc3tBzFTXYaICe/KrwNZYpDZXA=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=sNV8KOtFBToJnAvEomD9xKcL6/VGp7wbCZlty4EXkdtg493dlTpcy3aSghnQszBd45waMdvn8HecDt3JA8juRLINugSXTdQqfOATy6Af1nVx0bANA04yYwPcgmmAnO8HD7J+0/aXib6uBHFk1eYR617wiX4NEGsI727celWzieo= ARC-Authentication-Results: i=1; server2.sourceware.org X-Envelope-From: doko@debian.org Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 41MJmhSX3079242 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 20:48:46 +0100 Message-ID: Date: Thu, 22 Feb 2024 20:48:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches@gcc.gnu.org, ro@CeBiTec.Uni-Bielefeld.DE From: Matthias Klose Subject: [patch] fix libsanitizer build with -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 on 32bit architectures X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org libsanitizer fails to build with -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64, triggering an #error in /usr/include/features-time64.h // Must go after undef _FILE_OFFSET_BITS. The patch to sanitizer_platform_limits_posix.cpp is already present in trunk, but missing from the branches. Because all platform files are built in GCC, you also see the failure in sanitizer_procmaps_solaris.cpp. Just doing the same as for the posix files fixes the issue and libsanitizer builds again. Does this have any effect on the solaris builds? If not, ok for the trunk and the branches? Matthias --- a/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp @@ -11,6 +11,7 @@ // Before Solaris 11.4, doesn't work in a largefile environment. #undef _FILE_OFFSET_BITS +#undef _TIME_BITS #include "sanitizer_platform.h" #if SANITIZER_SOLARIS # include --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp @@ -18,6 +18,7 @@ // depends on _FILE_OFFSET_BITS setting. // To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. #undef _FILE_OFFSET_BITS +#undef _TIME_BITS #endif