unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default.
@ 2023-11-06 10:07 Efraim Flashner
  2023-11-13  4:47 ` Adam Faiz via Guix-patches via
       [not found] ` <handler.66965.B.169926548810674.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Efraim Flashner @ 2023-11-06 10:07 UTC (permalink / raw)
  To: 66965; +Cc: Efraim Flashner

* 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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default.
  2023-11-06 10:07 [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default Efraim Flashner
@ 2023-11-13  4:47 ` Adam Faiz via Guix-patches via
       [not found] ` <handler.66965.B.169926548810674.ack@debbugs.gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Faiz via Guix-patches via @ 2023-11-13  4:47 UTC (permalink / raw)
  To: 66965; +Cc: Efraim Flashner

I second this patch being merged, Objective-C support in GCC is needed to package GNUstep.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#66965: Acknowledgement ([CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default.)
       [not found] ` <handler.66965.B.169926548810674.ack@debbugs.gnu.org>
@ 2023-12-10  9:34   ` Efraim Flashner
  0 siblings, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2023-12-10  9:34 UTC (permalink / raw)
  To: 66965-done, 29644-done

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

Patch pushed to core-updates with minimal changes.

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-10  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 10:07 [bug#66965] [CORE-UPDATES PATCH] gnu: gcc: Support objc, objc++ by default Efraim Flashner
2023-11-13  4:47 ` 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

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).