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

Added gcc-10.2.0 patches #106

Open
wants to merge 1 commit 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
1 change: 1 addition & 0 deletions hashes/gcc-10.2.0.tar.xz.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8de0aecd3a52bb92b43082df8a9256356d1f03be gcc-10.2.0.tar.xz
26 changes: 26 additions & 0 deletions patches/gcc-10.2.0/0001-ssp_non_shared.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From bb1f45f53fc26714b30a14bcee55319d7c4cb1f7 Mon Sep 17 00:00:00 2001
From: Said Musaev <[email protected]>
Date: Thu, 1 Oct 2020 14:32:12 +0200
Subject: [PATCH 01/14] ssp_non_shared

---
gcc/gcc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9f790db0daf..e6887590ae2 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -877,7 +877,8 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit:}"
+ "|fstack-protector-strong|fstack-protector-explicit" \
+ ":-lssp_nonshared}"
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
2.28.0

42 changes: 42 additions & 0 deletions patches/gcc-10.2.0/0002-posix_memalign.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 9c14484ac34f8e155b1bec26abe8bd9309e8af59 Mon Sep 17 00:00:00 2001
From: Said Musaev <[email protected]>
Date: Thu, 1 Oct 2020 14:33:52 +0200
Subject: [PATCH 02/14] posix_memalign

---
gcc/config/i386/pmm_malloc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 87344d9383f..ece428df487 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
#include <stdlib.h>

/* We can't depend on <stdlib.h> since the prototype of posix_memalign
- may not be visible. */
+ may not be visible and we can't pollute the namespace either. */
#ifndef __cplusplus
-extern int posix_memalign (void **, size_t, size_t);
+extern int _mm_posix_memalign (void **, size_t, size_t)
#else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
#endif
+__asm__("posix_memalign");

static __inline void *
_mm_malloc (size_t __size, size_t __alignment)
@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
return malloc (__size);
if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
__alignment = sizeof (void *);
- if (posix_memalign (&__ptr, __alignment, __size) == 0)
+ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
return __ptr;
else
return NULL;
--
2.28.0

72 changes: 72 additions & 0 deletions patches/gcc-10.2.0/0003-libitm-test-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
From 0198bee3c490b2beec24a411b7060be273924e1f Mon Sep 17 00:00:00 2001
From: Said Musaev <[email protected]>
Date: Thu, 1 Oct 2020 14:34:55 +0200
Subject: [PATCH 03/14] libitm-test-fix

---
libitm/testsuite/Makefile.am | 6 ++++++
libitm/testsuite/Makefile.in | 5 +++++
libitm/testsuite/lib/libitm.exp | 3 +++
3 files changed, 14 insertions(+)

diff --git a/libitm/testsuite/Makefile.am b/libitm/testsuite/Makefile.am
index 41cfbc46e4b..16f82bdf691 100644
--- a/libitm/testsuite/Makefile.am
+++ b/libitm/testsuite/Makefile.am
@@ -11,3 +11,9 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS)
+
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
+
+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > [email protected]
+ mv [email protected] $@
diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in
index 120696d1c25..18633fd748a 100644
--- a/libitm/testsuite/Makefile.in
+++ b/libitm/testsuite/Makefile.in
@@ -286,6 +286,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)

RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS)
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
all: all-am

.SUFFIXES:
@@ -493,6 +494,10 @@ uninstall-am:
.PRECIOUS: Makefile


+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > [email protected]
+ mv [email protected] $@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp
index b3d247b9f98..47c2cd55dac 100644
--- a/libitm/testsuite/lib/libitm.exp
+++ b/libitm/testsuite/lib/libitm.exp
@@ -77,6 +77,7 @@ proc libitm_init { args } {
global ALWAYS_CFLAGS
global CFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS
+ global BUILD_CC
global GCC_UNDER_TEST
global TESTING_IN_BUILD_TREE
global target_triplet
@@ -92,6 +93,8 @@ proc libitm_init { args } {
if ![info exists GCC_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] {
set GCC_UNDER_TEST $TOOL_EXECUTABLE
+ } elseif [info exists BUILD_CC] {
+ set GCC_UNDER_TEST $BUILD_CC
} else {
set GCC_UNDER_TEST "[find_gcc]"
}
--
2.28.0

72 changes: 72 additions & 0 deletions patches/gcc-10.2.0/0004-libvtv-test-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
From b31c41313b956fa4bbe0c05792a1483c43eb5fc3 Mon Sep 17 00:00:00 2001
From: Said Musaev <[email protected]>
Date: Thu, 1 Oct 2020 14:35:11 +0200
Subject: [PATCH 04/14] libvtv-test-fix

---
libvtv/testsuite/Makefile.am | 6 ++++++
libvtv/testsuite/Makefile.in | 5 +++++
libvtv/testsuite/lib/libvtv.exp | 3 +++
3 files changed, 14 insertions(+)

diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am
index 41cfbc46e4b..16f82bdf691 100644
--- a/libvtv/testsuite/Makefile.am
+++ b/libvtv/testsuite/Makefile.am
@@ -11,3 +11,9 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS)
+
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
+
+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > [email protected]
+ mv [email protected] $@
diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
index cb804c442d6..6984c568260 100644
--- a/libvtv/testsuite/Makefile.in
+++ b/libvtv/testsuite/Makefile.in
@@ -281,6 +281,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)

RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS)
+EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
all: all-am

.SUFFIXES:
@@ -488,6 +489,10 @@ uninstall-am:
.PRECIOUS: Makefile


+extra.exp:
+ echo 'set BUILD_CC "$(CC)"' > [email protected]
+ mv [email protected] $@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp
index 4b71c9ce7bc..ef06e4a3199 100644
--- a/libvtv/testsuite/lib/libvtv.exp
+++ b/libvtv/testsuite/lib/libvtv.exp
@@ -76,6 +76,7 @@ proc libvtv_init { args } {
global ALWAYS_CFLAGS
global CFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS
+ global BUILD_CC
global GCC_UNDER_TEST
global TESTING_IN_BUILD_TREE
global target_triplet
@@ -91,6 +92,8 @@ proc libvtv_init { args } {
if ![info exists GCC_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] {
set GCC_UNDER_TEST $TOOL_EXECUTABLE
+ } elseif [info exists BUILD_CC] {
+ set GCC_UNDER_TEST $BUILD_CC
} else {
set GCC_UNDER_TEST "[find_gcc]"
}
--
2.28.0

Loading