unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 66965@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default.
Date: Mon,  6 Nov 2023 12:07:47 +0200	[thread overview]
Message-ID: <c026545f2b5fd3f9ff6dde96796d5f899f257918.1699264895.git.efraim@flashner.co.il> (raw)

* 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
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 <cstdlib>'s "#include_next
                ;; <stdlib.h>" finds GCC's <stdlib.h>, 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

base-commit: d52ee267ee8245a6edfcd137c73d20b036ec08d1
-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





             reply	other threads:[~2023-11-06 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 10:07 Efraim Flashner [this message]
2023-11-13  4:47 ` [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default Adam Faiz via Guix-patches via
     [not found] ` <handler.66965.B.169926548810674.ack@debbugs.gnu.org>
2023-12-10  9:34   ` bug#66965: Acknowledgement ([CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default.) Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c026545f2b5fd3f9ff6dde96796d5f899f257918.1699264895.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=66965@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).