Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS-8584 Introduce gcc14 as the shadow-compiler #125

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions coreutils/Patches/0002-memset_s-needs-prototype.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- a/lib/memset_explicit.c 2023-01-01 13:39:11.000000000 +0000
+++ b/lib/memset_explicit.c 2024-11-01 19:32:28.993075042 +0000
@@ -14,13 +14,10 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */

-#include <config.h>
-
-/* memset_s need this define */
-#if HAVE_MEMSET_S
+/* memset_s need this define before config.h */
# define __STDC_WANT_LIB_EXT1__ 1
-#endif

+#include <config.h>
#include <string.h>

/* Set S's bytes to C, where S has LEN bytes. The compiler will not
2 changes: 2 additions & 0 deletions dialog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ AUTOCONF_OPTS += \

include ../Makefile.targ
include ../Makefile.targ.autoconf

PATCHES = Patches/*
20 changes: 20 additions & 0 deletions dialog/Patches/0001-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/configure 2011-10-20 21:27:48.000000000 +0000
+++ b/configure 2024-11-01 21:24:35.301726636 +0000
@@ -9442,7 +9442,7 @@
int
main ()
{
-initscr(); tgoto("?", 0,0)
+initscr(); endwin()
;
return 0;
}
@@ -10780,7 +10780,7 @@
int
main ()
{
-initscr(); tgoto("?", 0,0)
+initscr(); endwin()
;
return 0;
}
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
Loading