From patchwork Tue Sep 10 12:22:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 1983166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=q62a7c7o; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.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 4X32sr1pGdz1y1C for ; Tue, 10 Sep 2024 22:23:12 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1FC52385DC32 for ; Tue, 10 Sep 2024 12:23:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 435863858C98 for ; Tue, 10 Sep 2024 12:22:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 435863858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 435863858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725970973; cv=none; b=neldE29HqPipABZgOWQxfiL47yoZw5rcFo/Rqi+D67UiLl9DGOml7bV0nx0iMzejVySmIy9yRSjGCcAMHAY1x62Uw72WB1qM2qhqfpHfBeObBjrLsxrIxskTi+ISHrz+tGNfoJ0MnprD5kvKi0f6YPy5QcgJ5dxj9jO7+MsnHVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725970973; c=relaxed/simple; bh=83DmYuUrjUy4On8n4g/dzBsXkr8gMT/Col6RkVmuu+U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wqQP4mRKEDTmFMqbm4lLh+eS+J/iYFh857vC9oyoX7238H9BhT6zCJqom89l3mbPbxRvtDjzdt2O/aelI2LvwkCbE7RS6zfXtjZasLvbNTyYnnpYdhEGQ9m+6gbuKbrKr11JCHoFWF+CHtUP2aTw0wh7B3TtVfrKN34kn5RQFJQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2d87176316eso4639639a91.0 for ; Tue, 10 Sep 2024 05:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725970969; x=1726575769; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MUE+I+MiTVp6cfZTFHkjekPONYhWoLNkuTGcWC36grI=; b=q62a7c7oYCFtBIfwo9365zSFIseNUqbfzEymeuI+9Yk0IiHDcU0PZpRNJ+Fv3FmBva S9ICvb/YLEChzC7SPfZwOpYDjMH9t08vI4IjaXNNZYZK4dn7heRvJrMLOK5lMXqwwIlB tNYQCkgRpSthEga45BIRswZgDVtd6Uugh4Rxxj28Ux0HHLlcYrRDG+7zSnB5Wo2itpw9 4LPAjwFDgNoiIkzzKoTHdVfCYN0q1/Nm2cceGXOVxOUQmJ3oxNdcxtU94mBMTV0yJ28f vkm8n0eibknoI2g7BrWPWicjvmqaFNTS57Dd2hwYE5gnhP9dC7QZzyrA2au4vsDYO9Fm s6pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725970969; x=1726575769; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MUE+I+MiTVp6cfZTFHkjekPONYhWoLNkuTGcWC36grI=; b=F6MNnAEtWaBQuWmHbme86uWfMnU8gh/7Bi2KWogvGD6XaafL8nalfOQakw0UzfIBee c5sr0sJO9uFniqRfxQiKaPBi6XdAX7Fo4eReR+kNtBDEWIgD5aHPvuN2bYVfbw2AQubj N/js9mac/3xMtbq20lRdcxD21Zp1P5gd2Sf2sRV1wobOF/NTxJ6AyQUbb360LbMqiTkI wpy22odAfEBgdf5F0CNoHmadywqB/cEDzky53NjquXSYf9tTrpBCEXoSx/b7B1aZopod hY0vgLmpmadWkjwwbtHfsUN7aF89LNKvBKf04ViXYqKwXxkjHHuPPsRX8Upmzn7UQoOd oN1A== X-Gm-Message-State: AOJu0YxqO1VkkxQH02PmUcvm/vCKtX9+OuWQ0by5JB9yVr1aYgJmHN5s geUe8kUmpKo8gqlap9HK36w5RWB6jpq1gBsLz8CJw2h4gFoC8l3F9P8Qka/rRyVeIDnTttIKSrs v X-Google-Smtp-Source: AGHT+IGJnysA6SZ3R1vWfenf9gSyrWbgmCoRDK7kBusMHs15iKD94ORJmZ9qIkK2VlL6j/5TH+Onqw== X-Received: by 2002:a17:90b:3006:b0:2c9:6abd:ca64 with SMTP id 98e67ed59e1d1-2db671c17c9mr4403467a91.9.1725970969613; Tue, 10 Sep 2024 05:22:49 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:80ff:f471:9688:94c:da67]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2db6dca2773sm552804a91.1.2024.09.10.05.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 05:22:49 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Simon Chopin Subject: [PATCH 0/3] Allow glibc to build with gcc that defaults to fortify, LFS, and 64-bit time_t Date: Tue, 10 Sep 2024 09:22:16 -0300 Message-ID: <20240910122244.1995107-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org Even though building glibc with fortify, LFS, and 64-bit time_t flags are not supported, and the usual way is to patch the build system to avoid it [1]; some systems do enable it by default (like Debian/Ubuntu), and failing to build with such compiler increases the requirements on how to proper build and tests glibc. it also does not help newcomers when trying to build glibc, and it has generated some questions on libc-help, along with the bug reports. This patch aims to detect if the compiler defaults to invalid flags to build glibc itself and disables it. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=31624 Adhemerval Zanella (3): Do not use -Wp to disable fortify (BZ 31928) Disable _FILE_OFFSET_BITS if the compiler defaults to it Disable _TIME_BITS if the compiler defaults to it Makeconfig | 6 ++++ configure | 66 +++++++++++++++++++++++++++++++++++++++++-- configure.ac | 28 ++++++++++++++++-- conform/Makefile | 2 +- debug/Makefile | 19 +++++++------ io/Makefile | 2 +- stdio-common/Makefile | 2 +- wcsmbs/Makefile | 2 +- 8 files changed, 110 insertions(+), 17 deletions(-)