From patchwork Mon Nov 6 10:07:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 55977 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3454227BBE2; Mon, 6 Nov 2023 10:11:43 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F03E027BBE9 for ; Mon, 6 Nov 2023 10:11:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzwZr-0007Nf-Sm; Mon, 06 Nov 2023 05:11:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzwZp-0007FM-DT for guix-patches@gnu.org; Mon, 06 Nov 2023 05:11:26 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzwZp-0002cV-5W for guix-patches@gnu.org; Mon, 06 Nov 2023 05:11:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzwaQ-0002mu-4K for guix-patches@gnu.org; Mon, 06 Nov 2023 05:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Nov 2023 10:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66965 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66965@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169926548810674 (code B ref -1); Mon, 06 Nov 2023 10:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Nov 2023 10:11:28 +0000 Received: from localhost ([127.0.0.1]:38656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzwZr-0002m6-Gn for submit@debbugs.gnu.org; Mon, 06 Nov 2023 05:11:28 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzwZo-0002ln-J8 for submit@debbugs.gnu.org; Mon, 06 Nov 2023 05:11:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzwZ4-0006uk-N0 for guix-patches@gnu.org; Mon, 06 Nov 2023 05:10:38 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzwZ2-0002Kf-1Q for guix-patches@gnu.org; Mon, 06 Nov 2023 05:10:38 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40859dee28cso33218935e9.0 for ; Mon, 06 Nov 2023 02:10:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699265433; x=1699870233; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=mjPi23uW79qas3+yWwO7rtLQq5T1DOGwkTN8k3rSHDg=; b=faqiGmoyrkp+TEqIDD6pDnU1FQ9rNUqZphsrzH2FCKfNptwSioyxxu8+pEFowwa2/9 SjIxbOjHeHfP7Q5FsQpdOpmsnPfp/80VygJwJlZHQsRduFrBGAqdmJ0bPnfnrpKwAjCE HPsQve2/mf6oe8gY1APTWHBtsNhfr0M5NoX/WtZOF4bNuqiS6cPcossiFBp1NC2VYoo/ GT70CnqH3EIHfJJvRL1npYzxGsZN21alMaanIjBpHDvPaaJ6sYiga0l1Va6eZp6Lo1Q3 Yygjlb+I6ACMM/uPx+ctikZqat7zSiMqAreWQNU4KA+Oujn37fgjd65KX65Wb08y+ojl uLLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699265433; x=1699870233; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mjPi23uW79qas3+yWwO7rtLQq5T1DOGwkTN8k3rSHDg=; b=NxURUEnwKE7YixVQdxhbQ/ddEUIxXqQdhr0zWl1eehiMnnVPbA3tzRiDrvPVktWBat jShhWXBRlsPBvOPhR7D2Zve1fe5W6F3rNCcSUUpuJ2z62ehtOgzCP0Pma9Df8cdWkWkO xmavgY8etjjBNgoLLmUMlefkfY6bJFSEZ8uNShDn0c6IO1is6PHXembDzJKE9+5eh+om ZWYkabDeDmjT9DGF76UIN0CcZWKeccfsIL4WNAKt5JHBzn/pNoKuYrHPGPdZJY9A/IGv f3U+880iuPh++TzDSSxIVnoWHfif9u3vQGyRXMjH1E9VtFCrDr5UZTJ8xF/j+1wrznYM 7qgA== X-Gm-Message-State: AOJu0YyOrtmyGSNjNsIRLF3hylKy8gRREN69z73oa6J/gWAuUmvd0z9D us3T0u3KIWJd+OQqLUt5OYa4//c79N88sQ== X-Google-Smtp-Source: AGHT+IGKxS93tbh884meJ3keiCAeYSHfdyB//C29EF4+O5AsZxaXG9I8J+tHg8p5dIGuf0X6uDcbcw== X-Received: by 2002:a05:600c:3146:b0:406:53ab:a9af with SMTP id h6-20020a05600c314600b0040653aba9afmr24295013wmo.10.1699265432818; Mon, 06 Nov 2023 02:10:32 -0800 (PST) Received: from localhost ([2a02:ed3:910:f600:f823:ecb4:394c:b4a3]) by smtp.gmail.com with ESMTPSA id h10-20020adff18a000000b003258934a4bcsm9032137wro.42.2023.11.06.02.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:10:32 -0800 (PST) From: Efraim Flashner Date: Mon, 6 Nov 2023 12:07:47 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gcc.scm (gcc-4.7)[configure-flags]: Adjust the enable-languages flag to also enable objc, obj-c++. [native-search-paths]: Add fields for OBJC_INCLUDE_PATH, OJBCPLUS_INCLUDE_PATH. (gcc-objc-4.8, gcc-objc-4.9, gcc-objc-5, gcc-objc-6, gcc-objc-7, gcc-objc-8, gcc-objc-9, gcc-objc-10, gcc-objc-11, gcc-objc-12, gcc-objc, gcc-objc++-4.8, gcc-objc++-4.9, gcc-objc++-5, gcc-objc++-6, gcc-objc++-7, gcc-objc++-8, gcc-objc++-9, gcc-objc++-10, gcc-objc++-11, gcc-objc++-12, gcc-objc++, %objc-search-paths, %objc++-search-paths): Remove variables. Change-Id: Ib4cd176eb88c733a82f2d31e8cc45b9c61720f8f --- Currently we have separate gcc-objc and gcc-objc++ packages, but they need the gcc frontend to use their library files. The output of the base-commit: d52ee267ee8245a6edfcd137c73d20b036ec08d1 diff between the lib outputs of gcc-10 and gcc-objc-10 is below. The net difference in size is 368 KB. This would allow us to drop 20 gcc derivations per architecture, seeing that objc and objc++ should probably be joined together anyway, and no one can really use them as they are currently. This patch would cause a full world rebuild, all the way down to gcc-boot0. 1c1 < /gnu/store/sxnv230gv2mj5x9v3gfadw118gkl2rcf-gcc-10.5.0-lib/ --- > /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/ 78a79,89 > │   │   │   ├── objc > │   │   │   │   ├── message.h > │   │   │   │   ├── NXConstStr.h > │   │   │   │   ├── objc-decls.h > │   │   │   │   ├── objc-exception.h > │   │   │   │   ├── objc.h > │   │   │   │   ├── objc-sync.h > │   │   │   │   ├── Object.h > │   │   │   │   ├── Protocol.h > │   │   │   │   ├── runtime.h > │   │   │   │   └── thr.h 645a657,661 > │   ├── libobjc.a > │   ├── libobjc.la > │   ├── libobjc.so -> libobjc.so.4.0.0 > │   ├── libobjc.so.4 -> libobjc.so.4.0.0 > │   ├── libobjc.so.4.0.0 682c698 < │   └── gcc-10.5.0 --- > │   └── gcc-objc-10.5.0 697c713 < 34 directories, 661 files --- > 35 directories, 676 files $ du -sch /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.* 164K /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.a 4.0K /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.la 4.0K /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.so 4.0K /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.so.4 92K /gnu/store/1p8hc8mrigismnndycwih2k2015v0z1q-gcc-objc-10.5.0-lib/lib/libobjc.so.4.0.0 268K total --- gnu/packages/gcc.scm | 109 ++++--------------------------------------- 1 file changed, 8 insertions(+), 101 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index e352cff5f9..e7dc79c00a 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -127,7 +127,7 @@ (define-public gcc-4.7 (list 'quasiquote (append '("--enable-plugin" - "--enable-languages=c,c++" + "--enable-languages=c,c++,objc,obj-c++" "--disable-multilib" "--with-system-zlib" @@ -377,6 +377,13 @@ (define-public gcc-4.7 ;; Add 'include/c++' here so that 's "#include_next ;; " finds GCC's , not libc's. (files '("include/c++" "include"))) + ;; Also Objective-C and Objective-C++ + (search-path-specification + (variable "OBJC_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "OBJCPLUS_INCLUDE_PATH") + (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) @@ -1240,106 +1247,6 @@ (define-public gccgo-12 (define-public gccgo-13 (make-gccgo gcc-13)) -(define %objc-search-paths - (list (search-path-specification - (variable "OBJC_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib" "lib64"))))) - -(define-public gcc-objc-4.8 - (custom-gcc gcc-4.8 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-4.9 - (custom-gcc gcc-4.9 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-5 - (custom-gcc gcc-5 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-6 - (custom-gcc gcc-6 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-7 - (custom-gcc gcc-7 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-8 - (custom-gcc gcc-8 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-9 - (custom-gcc gcc-9 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-10 - (custom-gcc gcc-10 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-11 - (custom-gcc gcc-11 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc-12 - (custom-gcc gcc-12 "gcc-objc" '("objc") - %objc-search-paths)) - -(define-public gcc-objc gcc-objc-11) - -(define %objc++-search-paths - (list (search-path-specification - (variable "OBJCPLUS_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib" "lib64"))))) - -(define-public gcc-objc++-4.8 - (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-4.9 - (custom-gcc gcc-4.9 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-5 - (custom-gcc gcc-5 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-6 - (custom-gcc gcc-6 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-7 - (custom-gcc gcc-7 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-8 - (custom-gcc gcc-8 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-9 - (custom-gcc gcc-9 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-10 - (custom-gcc gcc-10 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-11 - (custom-gcc gcc-11 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++-12 - (custom-gcc gcc-12 "gcc-objc++" '("obj-c++") - %objc++-search-paths)) - -(define-public gcc-objc++ gcc-objc++-11) - (define (make-libstdc++-doc gcc) "Return a package with the libstdc++ documentation for GCC." (package