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: 826977 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp274592wrc; Tue, 10 Sep 2024 05:23:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWouzVKAxiDrAby3zgwYqecRP+BR1fwWXt9xUyinW+tIno43lGAAN+ZHTFkskIdorByzIIQwg==@linaro.org X-Google-Smtp-Source: AGHT+IHrMMNlihPYnAdW+kdHTHypFlvXrlDGafLuT5tfeUGk6Du6BL/HLU5mjWWH8ityhv6Fib8C X-Received: by 2002:a05:6214:5d84:b0:6c3:61c3:5d47 with SMTP id 6a1803df08f44-6c554d59336mr59183696d6.17.1725970984214; Tue, 10 Sep 2024 05:23:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725970984; cv=pass; d=google.com; s=arc-20240605; b=kg3Yv1hOWpg1t549kOTNGusI+if0n/DsS+XNoRHra7U0PzBcUOK2Tzlvy0U2njrIjX rNb94mhYdO1P4ZR8FU4S6vp82ZDWwEqnsDt9rBfmbHTRyksOlWuLqnmChaBlDjEmDkug VqtnSW6+Fl4Im4slIiv+r9jD17JKudLDj5U7Hp/8qSvd9TTtsg11Ai2CnAza8I+Yu8Yb CEWLjuZaxFurGIGrUKgO/rszv6H74MTRQ8mCrrsNBeUvYr79CxyqpGZJS3f29vMsinx3 agCPDqf6APm+l9Q67OVObatzhEuQ/50Ap2WrjdyQDFHa3e7+0aoxkns9On7yPqnlfm5s kg6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=MUE+I+MiTVp6cfZTFHkjekPONYhWoLNkuTGcWC36grI=; fh=GNAnomGb44Vc67//YEj4j5r10Zx6jLxEj1JVNOU+ZEM=; b=T/8Q3UqOXt2nyY0quFEXXAEW/l6S7A0GYLwKiD8AzfviR1llIW6sz0JgMQQE/EKNY5 9vM2uhgSbKAB/L9ewsWGw9+dCq2sYrnVxfl9ccmUSSbjvcuuYuThNLBniStsVyM3ZJN/ kyGtZj+mwuAjmjOJ//1tinMOzOjgYePaMI83mBWbQzr4INqOGscxI3l9pdRR3hf0vx4x wKM6bI2WYo3Xk/GXlufJJQ+uk6l1xOoCZ00z+SCaV3pWPCCB0nGFU3mqwInafWEQSp/J IQjpOSrnmy6TpseVsP0s3xIf2vWyTceFTnQ2ZqCR/NKN/oDgqooWhK6VP84u1Fq8LzAg DLjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q62a7c7o; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6c53476f61fsi76905376d6.236.2024.09.10.05.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 05:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q62a7c7o; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D00D8385842A for ; Tue, 10 Sep 2024 12:23:03 +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-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~patch=linaro.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(-)