Skip to content

Commit

Permalink
gh-38905: Update the gcc spkg to version 14.2.0 using iains/gcc-14-br…
Browse files Browse the repository at this point in the history
…anch

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
This PR updates the gcc spkg (and hence the gfortran spkg) to version
14.2.0.  I tested that the spkg builds cleanly on macOS 15.1 (Sequoia)
using XCode 16.1 with both Intel and M1 CPUs.  I also tested that it
builds cleanly on Ubuntu 22.04 using the system gmp and gcc.  The
openblas spkg also builds on all three of those systems, although I
could not determine whether Sage was using the system gfortran or its
own gfortran for building openblas on Ubuntu.

There is a caveat.  The gcc project does not currently have official
support for Apple Silicon.  However, the gcc maintainer for darwin, Iain
Sandoe , maintains a [github site](https://github.com/iains/) containing
gcc source code with "experimental" support for Apple silicon, in
addition to Intel.  This PR uses the
[gcc-14-branch](https://github.com/iains/gcc-14-branch) repository from
that site.  The  spkg fetches the tag [gcc-14.2-darwin-
r2](https://github.com/iains/gcc-14-branch/releases/tag/gcc-14.2-darwin-
r2) as a tarball and names the tarball as gfortran-14.2.0.tar.gz.  The
github api does not support publishing hashes of tag downloads.  So I
downloaded the tag tarball twice and verified that the files were the
same for both downloads.  I used hashes of that file in checksums.ini.

<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->
No patches are needed for building on macOS with either CPU or on
Ubuntu.  (cf  PR #38855)


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
    
URL: #38905
Reported by: Marc Culler
Reviewer(s): John H. Palmieri
  • Loading branch information
Release Manager committed Nov 14, 2024
2 parents 69a8c02 + edd5553 commit 1b8ac9c
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 14,863 deletions.
2 changes: 2 additions & 0 deletions build/pkgs/_prereq/distros/debian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ binutils
make
m4
perl
# flex is needed to build gcc
flex
# python3-minimal is not enough on debian buster, ubuntu bionic - it does not have urllib
# system python for bootstrapping the build
python3
Expand Down
2 changes: 2 additions & 0 deletions build/pkgs/_prereq/distros/fedora.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ which
diffutils
# Needed for openssl 3.0
perl-IPC-Cmd
# Needed to build gcc
flex
67 changes: 67 additions & 0 deletions build/pkgs/ecm/patches/assembler.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
*** a/x86_64/Makefile.in Mon Nov 4 14:08:05 2024
--- b/x86_64/Makefile.in Mon Nov 4 14:15:46 2024
***************
*** 355,361 ****
all: all-am

.SUFFIXES:
! .SUFFIXES: .asm .lo .o .obj .s
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
--- 355,361 ----
all: all-am

.SUFFIXES:
! .SUFFIXES: .asm .lo .o .obj .sx
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
***************
*** 406,418 ****
distclean-compile:
-rm -f *.tab.c

! .s.o:
$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $<

! .s.obj:
$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

! .s.lo:
$(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $<

mostlyclean-libtool:
--- 406,418 ----
distclean-compile:
-rm -f *.tab.c

! .sx.o:
$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $<

! .sx.obj:
$(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

! .sx.lo:
$(AM_V_CCAS)$(LTCCASCOMPILE) -c -o $@ $<

mostlyclean-libtool:
***************
*** 706,713 ****
mulredc1_20.asm: mulredc1.m4
$(M4) -DLENGTH=20 $< > $@

! .asm.s:
! $(M4) -I../ -DOPERATION_$* `test -f $< || echo '$(srcdir)/'`$< >$*.s
# Nothing here needs the C preprocessor, and including this rule causes
# "make" to build .S, then .s files which fails on case-insensitive
# filesystems
--- 706,713 ----
mulredc1_20.asm: mulredc1.m4
$(M4) -DLENGTH=20 $< > $@

! .asm.sx:
! $(M4) -I../ -DOPERATION_$* `test -f $< || echo '$(srcdir)/'`$< >$*.sx
# Nothing here needs the C preprocessor, and including this rule causes
# "make" to build .S, then .s files which fails on case-insensitive
# filesystems
8 changes: 4 additions & 4 deletions build/pkgs/gcc/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=gcc-VERSION.tar.xz
sha1=6501872415823c95d48be28853ce3ebd6c1040c4
sha256=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083
upstream_url=https://mirrors.kernel.org/gnu/gcc/gcc-VERSION/gcc-VERSION.tar.xz
tarball=gcc-VERSION.tar.gz
sha1=c25c11e209fbfa795e80e354f8f48f181decd83b
sha256=23c2a1b2ce01e9d51948339869453229173c6889758137e7e517b545ae8bfc02
upstream_url=https://github.com/iains/gcc-14-branch/archive/refs/tags/gcc-14.2-darwin-r2.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/gcc/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.3.0
14.2.0
Loading

0 comments on commit 1b8ac9c

Please sign in to comment.