Skip to content

Commit

Permalink
OS-8584 Introduce gcc14 as the shadow-compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Toomas Soome committed Nov 12, 2024
1 parent bfb0665 commit 941fdba
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
35 changes: 35 additions & 0 deletions gcc14/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2021 Joyent, Inc.
# Copyright 2024 MNX Cloud, Inc.
#

#
# The tarball is from a specific tagged release of
# https://github.com/illumos/gcc repository. This includes all of the
# illumos-specific modifications we need. We could probably do a git clone
# instead, but the tarball method is easier given these Makefiles.
#

include ../Makefile.defs

BUILD64=yes
BUILD32=

GCC_VER = 14
VER = gcc-14.2.0-il-1
MPFR_VER = mpfr-4.2.1
GMP_VER = gmp-6.3.0
MPC_VER = mpc-1.3.1

include ../Makefile.gcc
41 changes: 41 additions & 0 deletions gcc14/Patches/1000-ld-flags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 6d60d54cd43708f73bc54aa464047c5e5c15c7ab Mon Sep 17 00:00:00 2001
From: Andy Fiddaman <[email protected]>
Date: Thu, 9 May 2019 13:43:30 +0000
Subject: OOCE: Adjust default library paths for OmniOS

---
gcc/config/sol2.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index 0e1fbaeaf863..3bfeab05bc40 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -304,12 +304,15 @@ along with GCC; see the file COPYING3. If not see
"%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}} \
%(endfile_arch) %(endfile_vtv) %(endfile_crtend) crtn.o%s"

+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+#define GNUCMAJOR TOSTRING(__GNUC__)
+
#undef LINK_ARCH32_SPEC_BASE
#define LINK_ARCH32_SPEC_BASE \
"%{YP,*} \
%{R*} \
- %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp%R/lib:%R/usr/lib} \
- %{!p:%{!pg:-Y P,%R/lib:%R/usr/lib}}}"
+ %{!YP,*:-Y P,%R/usr/gcc/" GNUCMAJOR "/lib:%R/lib:%R/usr/lib -L %R/usr/gcc/" GNUCMAJOR "/lib -R %R/usr/gcc/" GNUCMAJOR "/lib}"

#undef LINK_ARCH32_SPEC
#define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE
@@ -320,8 +323,7 @@ along with GCC; see the file COPYING3. If not see
#define LINK_ARCH64_SPEC_BASE \
"%{YP,*} \
%{R*} \
- %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
- %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
+ %{!YP,*:-Y P,%R/usr/gcc/" GNUCMAJOR "/lib/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR " -L %R/usr/gcc/" GNUCMAJOR "/lib/" ARCH64_SUBDIR " -R %R/usr/gcc/" GNUCMAJOR "/lib/" ARCH64_SUBDIR "}"

#undef LINK_ARCH64_SPEC
#ifndef USE_GLD
1 change: 1 addition & 0 deletions gcc14/gcc-14.2.0-il-1.tar.gz.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
52f7a39caeae0d14f8a94b600fd6b8e436b57b69
1 change: 1 addition & 0 deletions gcc14/gmp-6.3.0.tar.bz2.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
32d21c4fae046de45e8fce37bf4002236d283b71
1 change: 1 addition & 0 deletions gcc14/mpc-1.3.1.tar.gz.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bac1c1fa79f5602df1e29e4684e103ad55714e02
1 change: 1 addition & 0 deletions gcc14/mpfr-4.2.1.tar.bz2.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f9dbe49b092e4c8e0a039e6d46c059696cc2f51c

0 comments on commit 941fdba

Please sign in to comment.