|
1 | 1 | Info2: <<
|
2 | 2 | Package: gcc11
|
3 | 3 | Version: 11.3.0
|
4 |
| -Revision: 2 |
| 4 | +Revision: 3 |
5 | 5 | Type: gccver (11)
|
6 | 6 | Source: mirror:gnu:gcc/gcc-%v/gcc-%v.tar.xz
|
7 | 7 | Source-Checksum: SHA256(b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39)
|
8 | 8 | PatchFile: %n-arm.patch
|
9 | 9 | PatchFile-MD5: 9988f59fbeb6d88b1d45d7ab7d243389
|
| 10 | +PatchFile2: %n-ventura.patch |
| 11 | +PatchFile2-MD5: 2961dece6a860f8952addf52798e9e72 |
10 | 12 | PatchScript: <<
|
11 | 13 | #!/bin/sh -ev
|
12 | 14 | patch -p1 < %{PatchFile}
|
| 15 | + patch -p1 < %{PatchFile2} |
13 | 16 | # don't update live infodoc dir
|
14 | 17 | find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
|
15 | 18 | <<
|
@@ -40,6 +43,7 @@ BuildDepends: <<
|
40 | 43 | fink-package-precedence,
|
41 | 44 | gettext-tools,
|
42 | 45 | gmp5 (>= 6.0.0a-3),
|
| 46 | + install-info, |
43 | 47 | isl22,
|
44 | 48 | libgettext8-dev,
|
45 | 49 | libiconv-dev,
|
@@ -185,27 +189,34 @@ InstallScript: <<
|
185 | 189 | for infofile in $(find %i/lib/gcc%type_num[gccver]/info -name '*.info*'); do
|
186 | 190 | infobase=$(basename $infofile)
|
187 | 191 | case $infofile in
|
188 |
| - *info) /usr/bin/install-info --infodir=%i/lib/gcc%type_num[gccver]/info ${infofile} ;; |
| 192 | + *info) %p/bin/install-info --infodir=%i/lib/gcc%type_num[gccver]/info ${infofile} ;; |
189 | 193 | esac
|
190 | 194 | ln -s %p/lib/gcc%type_num[gccver]/info/$infobase %i/share/info/$infobase
|
191 | 195 | done
|
192 | 196 |
|
193 | 197 | # remove build path from .la files
|
194 | 198 | perl -pi -e "s, \-L[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name '*.la'`
|
| 199 | + |
195 | 200 | if [ "%m" = "arm" ]; then
|
196 | 201 | arch=aarch64
|
197 | 202 | else
|
198 | 203 | arch=%m
|
199 | 204 | perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libasan.la'`
|
200 | 205 | perl -pi -e "s, /[^ ']*/%n-%v-%r/darwin_objdir/[^ ']*,,g" `find %i/lib/gcc%type_num[gccver]/lib -name 'libubsan.la'`
|
201 | 206 | fi
|
202 |
| - cp %b/gcc/config/darwin-sections.def %i/lib/gcc%type_num[gccver]/lib/gcc/${arch}-apple-darwin${darwinvers}/%v/plugin/include/config |
| 207 | + |
203 | 208 | # @rpath install_names are required for aarch64 build, but break some linked binaries
|
204 |
| - # - enforce actual install path here |
| 209 | + # - enforce actual install paths here; take care to update the cross-referenced dylibs. |
205 | 210 | cd %d
|
206 | 211 | for dylib in .%p/lib/gcc%type_num[gccver]/lib/lib*.[0-9].dylib; do
|
207 | 212 | install_name_tool -id ${dylib#.} $dylib
|
| 213 | + install_name_tool -change @rpath/libgcc_s.1.1.dylib %p/lib/libgcc_s.1.1.dylib \ |
| 214 | + -change @rpath/libstdc++.6.dylib %p/lib/libstdc++.6.dylib \ |
| 215 | + -change @rpath/libquadmath.0.dylib %p/lib/libquadmath.0.dylib $dylib |
208 | 216 | done
|
| 217 | + otool -L .%p/lib/gcc%type_num[gccver]/lib/lib*.[0-9].dylib | grep '@rpath' && exit 2 |
| 218 | + |
| 219 | + cp %b/gcc/config/darwin-sections.def %i/lib/gcc%type_num[gccver]/lib/gcc/${arch}-apple-darwin${darwinvers}/%v/plugin/include/config |
209 | 220 | <<
|
210 | 221 | SplitOff: <<
|
211 | 222 | Package: %N-shlibs
|
@@ -294,10 +305,12 @@ DescPackaging: <<
|
294 | 305 | need to add it's own -isysroot flag.
|
295 | 306 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
|
296 | 307 |
|
297 |
| - Homebrew patches for arm/aarch64 build from |
298 |
| - https://github.com/Homebrew/formula-patches/blob/master/gcc/gcc-11.3.0-arm.diff |
299 |
| - - libasan.* and libsubsan.* currently not built on that arch. |
300 |
| - There are both 1 and 1.1 versions of libgcc_s.dylib now, but only 1 on arm. |
| 308 | + Homebrew patches for arm/aarch64 build and macOS 13 from |
| 309 | + https://github.com/Homebrew/formula-patches/blob/master/gcc/gcc-%v-{arm,ventura}.diff |
| 310 | + - libasan.* and libsubsan.* currently not built on arm. |
| 311 | + There are both "1" and "1.1" versions of libgcc_s.dylib now, but only "1" on arm. |
| 312 | + Manual fixes of @rpath install_names required for aarch64 build to maintain downstream |
| 313 | + package compatibility. |
301 | 314 | <<
|
302 | 315 | Homepage: http://gcc.gnu.org/
|
303 | 316 | Maintainer: None < [email protected]>
|
|
0 commit comments