From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 9274E3858284 for ; Tue, 9 Jan 2024 18:30:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9274E3858284 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 9274E3858284 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704825017; cv=none; b=aXl4s9GSE3/8iy4BQdW0XANlQUZ/LO5bnqs+mnAof54SUnFPNENwzsyIU1lRg0jNrNPYMzoH+0fFyczZkfBCwNQvGteJrHmWcDtoUMf/tAcOnMQiebiigl578KdA97gXHrLqOVqxE5Pwf8HqOnJ3IhJr4sXTLvXz2QrZvzlMolk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704825017; c=relaxed/simple; bh=3qCbVN8yaZ5uWAQwMwT2cKGAOhqXmzlwdj+34L9C/+4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=OdWhQBznQlWel9vvj5A0+a8CLNopCdjw2JrahXY1TJa9lzttjQ++2u/dE54g8uSup/5v7k3XFTOi91NF25f/y0wh0eYOEvyBGx4zKdA2bHUNHlZuntKfcr2n2L9qqxpCXwsH2Wh5lFF7H+ewipeYLnC/B2jdyLy5MFt49YRI9Dk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1d4df66529bso15462695ad.1 for ; Tue, 09 Jan 2024 10:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704825013; x=1705429813; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ozBHlrmOmVUhsdHynF/ZvyGNdwWqxCNzp3QVJ8VOPOE=; b=rSOrY6ZVjammWLuP0qMQX3MQCm1mnX1wOUGOqJfsUdmdJp2jBnVatLbFsQRszI8iU5 1NB/GXGfLgOM37fWAwrCDxaA/LxMed4A5cREPSO9PM1lsb22dd6jiRK6b2Z5ZbxRaZkC y/IkWTCPABktMbdy6lrPFFc+CYxF0MJMzerwWuwsvkTYghbUiYFJlke0xLdUbWTWmVkq Xkr8siAyuAc01SNKmIZEaOSt0j1M2CSO9fL+ly3OzNnKkl/g+qZZW1X02XxxJ8Zcxi+V hz0QnT0GJc01s5v4xCgoZtU13UMzhRwex4BA6+xYbJVJtwJmji1yjHu7XP7y62QuQGSR pckA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704825013; x=1705429813; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ozBHlrmOmVUhsdHynF/ZvyGNdwWqxCNzp3QVJ8VOPOE=; b=OjEYBgT12fvVyyGPVlhi0RxFz5jQO+uHIuTYUJFhtrTXm9qteuyRsdgKBRy94+oeTp DbNxjLwEJdDD1sMO2KcC6C5gmgUmX5bWILB1sIOm1fq9DbHsBgZbMO+ID6tm40HN9uf+ RBmPgAr43cKoUeU0yP1oTxSOF6eYUVP1lg4a27wLQMeTE7fBSYoW87nqDVVB8MyJ64nm ySC5ZXU3nB1w2TaRd944+vRDrztRzDHsTFjqqLx2m7882QBiBthrBbgYZG0mEsbmgRRf bou/6wRoGWWlHaV40cLdviox3y38UGugWJHW1KY+KoCJ8IWurTS+qvRbjaee4Vg6ZGR5 TvxQ== X-Gm-Message-State: AOJu0Yyn6tnFI/4fUCVCOXxcZnLa52Uo1oaeRI6sATRydw9sqERhMu0W h9+0nZQQJCkRCLPtpUq6+grJmgQXbHDmPSvAwLzl4yguJ3I= X-Google-Smtp-Source: AGHT+IE1m+5t2Fl6K21JqIkp/WK1x+hq68tVV3//aHEO4D4/YCLGf10iUgkgQgzXynb/kzfmc77tVw== X-Received: by 2002:a17:902:6bc2:b0:1d4:7687:833a with SMTP id m2-20020a1709026bc200b001d47687833amr2698252plt.17.1704825013530; Tue, 09 Jan 2024 10:30:13 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c1:9dd2:f11f:b3ee:9e0f:d420? ([2804:1b3:a7c1:9dd2:f11f:b3ee:9e0f:d420]) by smtp.gmail.com with ESMTPSA id m1-20020a1709026bc100b001d3f5cfa741sm2095856plt.283.2024.01.09.10.30.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jan 2024 10:30:13 -0800 (PST) Message-ID: <667836d1-90c4-4285-bd9f-4bdd983ba362@linaro.org> Date: Tue, 9 Jan 2024 15:30:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Remove installed header rule on $(..)include/%.h Content-Language: en-US To: "H.J. Lu" , libc-alpha@sourceware.org References: <20240109182520.2166103-1-hjl.tools@gmail.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240109182520.2166103-1-hjl.tools@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 09/01/24 15:25, H.J. Lu wrote: > On x86-64 machine with > > [hjl@gnu-cfl-3 x86-glibc]$ ls -l /usr/include/asm/prctl.h sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > -rw-r--r-- 1 hjl hjl 825 Jan 9 09:41 sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h > -rw-r--r-- 1 root root 1170 Nov 27 16:00 /usr/include/asm/prctl.h > [hjl@gnu-cfl-3 x86-glibc]$ > > glibc configured with --enable-cet build failed: > > make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > ../Makerules:327: update target > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.h' > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.stmp > : > ../Makeconfig:1216: update target > '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.h' > due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.stmp > : > ../Makerules:1126: update target '/usr/include/asm/prctl.h' due to: > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > force-install > /usr/bin/install -c -m 644 > ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h > /usr/include/asm/prctl.h > /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied > make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 > make[2]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' > make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 > make[1]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc' > make: *** [Makefile:9: all] Error 2 > > This is triggered by the rule in Makerules: > > $(inst_includedir)/%.h: $(..)include/%.h $(+force) > $(do-install) > > Since no files under include/ should be installed, remove it from > Makerules. > > Tested it on x86-64. There are no differences in the installed header > files. I stumbled on this for my clang/glibc branch [1] and I was puzzled why this rule was initially added (I couldn't find it on git history nor it seems obvious why). LGTM, thanks. Although It would be good to know why if was required in first place. > --- > Makerules | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/Makerules b/Makerules > index a000bf7b5e..00365bc58b 100644 > --- a/Makerules > +++ b/Makerules > @@ -1122,8 +1122,6 @@ $(inst_includedir)/%.h: $(common-objpfx)%.h $(+force) > $(do-install) > $(inst_includedir)/%.h: %.h $(+force) > $(do-install) > -$(inst_includedir)/%.h: $(..)include/%.h $(+force) > - $(do-install) > headers-nonh := $(filter-out %.h,$(headers)) > ifdef headers-nonh > $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \ [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9059d804d9870f6e937bf8073fa9af6a911f8c97