mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
gcc49, gcc49Stdenv, gfortran49: remove old implementation
gcc-4.9.4 was released in Aug 3, 2016, 8 years ago. It's a branch that went out of support years ago. Numerous bugs never get backported to this version. Let's remove it.
This commit is contained in:
parent
c6932c00ca
commit
88950412bc
@ -1,10 +0,0 @@
|
||||
{ wrapCC, gcc49 }:
|
||||
wrapCC (
|
||||
gcc49.cc.override {
|
||||
name = "gfortran";
|
||||
langFortran = true;
|
||||
langCC = false;
|
||||
langC = false;
|
||||
profiledCompiler = false;
|
||||
}
|
||||
)
|
@ -29,11 +29,11 @@ let
|
||||
else if atLeast "9" then isl_0_20
|
||||
else if atLeast "7" then isl_0_17
|
||||
else if atLeast "6" then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14)
|
||||
else /* "4.9" */ isl_0_11;
|
||||
else /* "5" */ isl_0_11;
|
||||
} // lib.optionalAttrs (!(atLeast "6")) {
|
||||
cloog = if stdenv.isDarwin
|
||||
then null
|
||||
else /* 4.9 */ cloog_0_18_0;
|
||||
else /* 5 */ cloog_0_18_0;
|
||||
} // lib.optionalAttrs (atLeast "6" && !(atLeast "9")) {
|
||||
# gcc 10 is too strict to cross compile gcc <= 8
|
||||
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
|
||||
|
@ -82,7 +82,6 @@ let
|
||||
atLeast8 = versionAtLeast version "8";
|
||||
atLeast7 = versionAtLeast version "7";
|
||||
atLeast6 = versionAtLeast version "6";
|
||||
atLeast49 = versionAtLeast version "4.9";
|
||||
is14 = majorVersion == "14";
|
||||
is13 = majorVersion == "13";
|
||||
is12 = majorVersion == "12";
|
||||
@ -92,7 +91,6 @@ let
|
||||
is8 = majorVersion == "8";
|
||||
is7 = majorVersion == "7";
|
||||
is6 = majorVersion == "6";
|
||||
is49 = majorVersion == "4" && versions.minor version == "9";
|
||||
|
||||
disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler);
|
||||
|
||||
@ -277,7 +275,7 @@ pipe ((callFile ./common/builder.nix {}) ({
|
||||
outputs =
|
||||
if atLeast7
|
||||
then [ "out" "man" "info" ] ++ optional (!langJit) "lib"
|
||||
else if atLeast49 && (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"]
|
||||
else if (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"]
|
||||
else [ "out" "lib" "man" "info" ];
|
||||
|
||||
setOutputFlags = false;
|
||||
@ -460,7 +458,7 @@ pipe ((callFile ./common/builder.nix {}) ({
|
||||
badPlatforms =
|
||||
# avr-gcc8 is maintained for the `qmk` package
|
||||
if (is8 && targetPlatform.isAvr) then []
|
||||
else if !(is49 || is6) then [ "aarch64-darwin" ]
|
||||
else if !(is6) then [ "aarch64-darwin" ]
|
||||
else platforms.darwin;
|
||||
} // optionalAttrs is10 {
|
||||
badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ];
|
||||
@ -474,7 +472,7 @@ pipe ((callFile ./common/builder.nix {}) ({
|
||||
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
|
||||
} // optionalAttrs enableMultilib {
|
||||
dontMoveLib64 = true;
|
||||
} // optionalAttrs (((is49 && !stdenv.hostPlatform.isDarwin) || is6) && langJava) {
|
||||
} // optionalAttrs (is6 && langJava) {
|
||||
postFixup = ''
|
||||
target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
|
||||
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
index aec950454..5bda9b3a3 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -156,18 +156,13 @@ namespace __sanitizer {
|
||||
#elif defined(__sparc__)
|
||||
# if defined(__arch64__)
|
||||
unsigned mode;
|
||||
- unsigned short __pad1;
|
||||
-# else
|
||||
- unsigned short __pad1;
|
||||
- unsigned short mode;
|
||||
unsigned short __pad2;
|
||||
# endif
|
||||
unsigned short __seq;
|
||||
unsigned long long __unused1;
|
||||
unsigned long long __unused2;
|
||||
#else
|
||||
- unsigned short mode;
|
||||
- unsigned short __pad1;
|
||||
+ unsigned int mode;
|
||||
unsigned short __seq;
|
||||
unsigned short __pad2;
|
||||
#if defined(__x86_64__) && !defined(_LP64)
|
@ -1,61 +0,0 @@
|
||||
gcc/Makefile.in: fix parallel building failure
|
||||
|
||||
The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
|
||||
config.h which was a generated file. But no explicity rule
|
||||
to clarify the dependency. There was potential building
|
||||
failure while parallel make.
|
||||
|
||||
For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
|
||||
source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
|
||||
'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
|
||||
objects.
|
||||
|
||||
For errors.o, it is part of gengtype, and the gengtype generator program
|
||||
is special: Two versions are built. One is for the build machine, and one
|
||||
is for the host. We refered what gengtype-parse.o did (which also is part
|
||||
of gengtype).
|
||||
|
||||
[GCC #61899]
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
|
||||
|
||||
Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
gcc/Makefile.in | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index 6475cba..56e50bb 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
|
||||
opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
|
||||
hash-table.o file-find.o
|
||||
|
||||
+# Objects compiled from one C source file gcc-ar.c
|
||||
+OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
|
||||
+
|
||||
# This lists all host objects for the front ends.
|
||||
ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
|
||||
|
||||
ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
|
||||
$(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
|
||||
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
|
||||
- lto-wrapper.o
|
||||
+ lto-wrapper.o $(OBJS-gcc-ar)
|
||||
|
||||
# This lists all host object files, whether they are included in this
|
||||
# compilation or not.
|
||||
@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
|
||||
CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
|
||||
build/gengtype-parse.o: $(BCONFIG_H)
|
||||
|
||||
+errors.o : $(CONFIG_H)
|
||||
+
|
||||
gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
|
||||
gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
|
||||
$(XREGEX_H)
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -34,7 +34,6 @@ let
|
||||
atLeast8 = lib.versionAtLeast version "8";
|
||||
atLeast7 = lib.versionAtLeast version "7";
|
||||
atLeast6 = lib.versionAtLeast version "6";
|
||||
atLeast49 = lib.versionAtLeast version "4.9";
|
||||
is14 = majorVersion == "14";
|
||||
is13 = majorVersion == "13";
|
||||
is12 = majorVersion == "12";
|
||||
@ -44,7 +43,6 @@ let
|
||||
is8 = majorVersion == "8";
|
||||
is7 = majorVersion == "7";
|
||||
is6 = majorVersion == "6";
|
||||
is49 = majorVersion == "4" && lib.versions.minor version == "9";
|
||||
inherit (lib) optionals optional;
|
||||
in
|
||||
|
||||
@ -239,8 +237,7 @@ in
|
||||
|
||||
## gcc 8.0 and older ##############################################################################
|
||||
|
||||
# for 49 this is applied later
|
||||
++ optional (atLeast49 && !is49 && !atLeast9) ./libsanitizer-no-cyclades-9.patch
|
||||
++ optional (!atLeast9) ./libsanitizer-no-cyclades-9.patch
|
||||
++ optional (is7 || is8) ./9/fix-struct-redefinition-on-glibc-2.36.patch
|
||||
|
||||
# Make Darwin bootstrap respect whether the assembler supports `--gstabs`,
|
||||
@ -280,8 +277,8 @@ in
|
||||
## gcc 6.0 and older ##############################################################################
|
||||
|
||||
++ optional (is6 && langGo) ./gogcc-workaround-glibc-2.36.patch
|
||||
++ optional (is49 || is6) ./9/fix-struct-redefinition-on-glibc-2.36.patch
|
||||
++ optional (is49 || (is6 && !stdenv.targetPlatform.isRedox)) ./use-source-date-epoch.patch
|
||||
++ optional is6 ./9/fix-struct-redefinition-on-glibc-2.36.patch
|
||||
++ optional (is6 && !stdenv.targetPlatform.isRedox) ./use-source-date-epoch.patch
|
||||
++ optional (is6 && !stdenv.targetPlatform.isRedox) ./6/0001-Fix-build-for-glibc-2.31.patch
|
||||
++ optionals (is6 && langAda) [
|
||||
./gnat-cflags.patch
|
||||
@ -297,51 +294,7 @@ in
|
||||
# defaults to the impure, system location and causes the build to fail.
|
||||
++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch
|
||||
|
||||
## gcc 4.9 and older ##############################################################################
|
||||
## gcc 5.0 and older ##############################################################################
|
||||
|
||||
++ optional (!atLeast6) ./parallel-bconfig.patch
|
||||
++ optionals (is49) [
|
||||
(./. + "/${lib.versions.major version}.${lib.versions.minor version}/parallel-strsignal.patch")
|
||||
(./. + "/${lib.versions.major version}.${lib.versions.minor version}/libsanitizer.patch")
|
||||
(fetchpatch {
|
||||
name = "avoid-ustat-glibc-2.28.patch";
|
||||
url = "https://gitweb.gentoo.org/proj/gcc-patches.git/plain/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch?id=55fcb515620a8f7d3bb77eba938aa0fcf0d67c96";
|
||||
sha256 = "0b32sb4psv5lq0ij9fwhi1b4pjbwdjnv24nqprsk14dsc6xmi1g0";
|
||||
})
|
||||
# has to be applied after "avoid-ustat-glibc-2.28.patch"
|
||||
./libsanitizer-no-cyclades-9.patch
|
||||
# glibc-2.26
|
||||
./struct-ucontext.patch
|
||||
./struct-sigaltstack-4.9.patch
|
||||
]
|
||||
# Retpoline patches pulled from the branch hjl/indirect/gcc-4_9-branch (by H.J. Lu, the author of GCC upstream retpoline commits)
|
||||
++ optionals is49
|
||||
(builtins.map ({commit, sha256}: fetchpatch {url = "https://github.com/hjl-tools/gcc/commit/${commit}.patch"; inherit sha256;})
|
||||
[{ commit = "e623d21608e96ecd6b65f0d06312117d20488a38"; sha256 = "1ix8i4d2r3ygbv7npmsdj790rhxqrnfwcqzv48b090r9c3ij8ay3"; }
|
||||
{ commit = "2015a09e332309f12de1dadfe179afa6a29368b8"; sha256 = "0xcfs0cbb63llj2gbcdrvxim79ax4k4aswn0a3yjavxsj71s1n91"; }
|
||||
{ commit = "6b11591f4494f705e8746e7d58b7f423191f4e92"; sha256 = "0aydyhsm2ig0khgbp27am7vq7liyqrq6kfhfi2ki0ij0ab1hfbga"; }
|
||||
{ commit = "203c7d9c3e9cb0f88816b481ef8e7e87b3ecc373"; sha256 = "0wqn16y7wy5kg8ngfcni5qdwfphl01axczibbk49bxclwnzvldqa"; }
|
||||
{ commit = "f039c6f284b2c9ce97c8353d6034978795c4872e"; sha256 = "13fkgdb17lpyxfksz1zanxhgpsm0jrss9w61nbl7an4im22hz7ci"; }
|
||||
{ commit = "ed42606bdab1c5d9e5ad828cd6fe1a0557f193b7"; sha256 = "0gdnn8v3p03imj3qga2mzdhpgbmjcklkxdl97jvz5xia2ikzknxm"; }
|
||||
{ commit = "5278e062ef292fd2fbf987d25389785f4c5c0f99"; sha256 = "0j81x758wf8v7j4rx5wc1cy7yhkvhlhv3wmnarwakxiwsspq0vrs"; }
|
||||
{ commit = "76f1ffbbb6cd9f6ecde6c82cd16e20a27242e890"; sha256 = "1py56y6gp7fjf4f8bbsfwh5bs1gnmlqda1ycsmnwlzfm0cshdp0c"; }
|
||||
{ commit = "4ca48b2b688b135c0390f54ea9077ef10aedd52c"; sha256 = "15r019pzr3k0lpgyvdc92c8fayw8b5lrzncna4bqmamcsdz7vsaw"; }
|
||||
{ commit = "98c7bf9ddc80db965d69d61521b1c7a1cec32d9a"; sha256 = "1d7pfdv1q23nf0wadw7jbp6d6r7pnzjpbyxgbdfv7j1vr9l1bp60"; }
|
||||
{ commit = "3dc76b53ad896494ca62550a7a752fecbca3f7a2"; sha256 = "0jvdzfpvfdmklfcjwqblwq1i22iqis7ljpvm7adra5d7zf2xk7xz"; }
|
||||
{ commit = "1e961ed49b18e176c7457f53df2433421387c23b"; sha256 = "04dnqqs4qsvz4g8cq6db5id41kzys7hzhcaycwmc9rpqygs2ajwz"; }
|
||||
{ commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }])
|
||||
|
||||
++ optional (is49 && !atLeast6) [
|
||||
# gcc-11 compatibility
|
||||
(fetchpatch {
|
||||
name = "gcc4-char-reload.patch";
|
||||
url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=d57c99458933a21fdf94f508191f145ad8d5ec58";
|
||||
includes = [ "gcc/reload.h" ];
|
||||
sha256 = "sha256-66AMP7/ajunGKAN5WJz/yPn42URZ2KN51yPrFdsxEuM=";
|
||||
})
|
||||
]
|
||||
|
||||
|
||||
## gcc 4.8 only ##############################################################################
|
||||
|
||||
++ optional (!atLeast49 && hostPlatform.isDarwin) ./gfortran-darwin-NXConstStr.patch
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
|
||||
From: Iain Sandoe <iain@codesourcery.com>
|
||||
Date: Sat, 21 Dec 2013 00:30:18 +0000
|
||||
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
|
||||
|
||||
---
|
||||
gcc/config/darwin.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
|
||||
index 40804b8..0080299 100644
|
||||
--- a/gcc/config/darwin.c
|
||||
+++ b/gcc/config/darwin.c
|
||||
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
|
||||
void
|
||||
darwin_mark_decl_preserved (const char *name)
|
||||
{
|
||||
+ /* Actually we shouldn't mark any local symbol this way, but for now
|
||||
+ this only happens with ObjC meta-data. */
|
||||
+ if (darwin_label_is_anonymous_local_objc_name (name))
|
||||
+ return;
|
||||
+
|
||||
fprintf (asm_out_file, "\t.no_dead_strip ");
|
||||
assemble_name (asm_out_file, name);
|
||||
fputc ('\n', asm_out_file);
|
||||
--
|
||||
2.2.1
|
@ -1,78 +0,0 @@
|
||||
hand-resolved trivial conflicts for 4.9 from the upstream patch
|
||||
72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
index 69c9c10..8e53673 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
@@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
|
||||
return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
index 6422df1..8e111d1 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@ struct linux_dirent;
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
|
||||
__sanitizer_kernel_sigaction_t *oldact);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
index 891386dc..234e8c6 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
index 2ed5718..6f972ab 100644
|
||||
--- a/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
@@ -287,7 +287,7 @@ void InitializePlatform() {
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
|
||||
error: 'SIGSEGV' was not declared in this scope
|
||||
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
|
||||
index 0692eb1..472f734 100644
|
||||
--- a/libsanitizer/asan/asan_linux.cc
|
||||
+++ b/libsanitizer/asan/asan_linux.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
@ -1,190 +0,0 @@
|
||||
From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
|
||||
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Tue, 4 Jul 2017 10:23:57 +0000
|
||||
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
|
||||
|
||||
Current glibc no longer gives the ucontext_t type the tag struct
|
||||
ucontext, to conform with POSIX namespace rules. This requires
|
||||
various linux-unwind.h files in libgcc, that were previously using
|
||||
struct ucontext, to be fixed to use ucontext_t instead. This is
|
||||
similar to the removal of the struct siginfo tag from siginfo_t some
|
||||
years ago.
|
||||
|
||||
This patch changes those files to use ucontext_t instead. As the
|
||||
standard name that should be unconditionally safe, so this is not
|
||||
restricted to architectures supported by glibc, or conditioned on the
|
||||
glibc version.
|
||||
|
||||
Tested compilation together with current glibc with glibc's
|
||||
build-many-glibcs.py.
|
||||
|
||||
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
|
||||
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
|
||||
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
|
||||
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
|
||||
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
|
||||
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
|
||||
config/pa/linux-unwind.h (pa32_fallback_frame_state),
|
||||
config/sh/linux-unwind.h (sh_fallback_frame_state),
|
||||
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
|
||||
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
|
||||
ucontext_t instead of struct ucontext.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++
|
||||
libgcc/config/aarch64/linux-unwind.h | 2 +-
|
||||
libgcc/config/alpha/linux-unwind.h | 2 +-
|
||||
libgcc/config/bfin/linux-unwind.h | 2 +-
|
||||
libgcc/config/i386/linux-unwind.h | 4 ++--
|
||||
libgcc/config/m68k/linux-unwind.h | 2 +-
|
||||
libgcc/config/nios2/linux-unwind.h | 2 +-
|
||||
libgcc/config/pa/linux-unwind.h | 2 +-
|
||||
libgcc/config/sh/linux-unwind.h | 2 +-
|
||||
libgcc/config/tilepro/linux-unwind.h | 2 +-
|
||||
libgcc/config/xtensa/linux-unwind.h | 2 +-
|
||||
11 files changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
|
||||
index 4512efb..06de45a 100644
|
||||
--- a/libgcc/config/aarch64/linux-unwind.h
|
||||
+++ b/libgcc/config/aarch64/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe
|
||||
{
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
};
|
||||
|
||||
struct rt_sigframe *rt_;
|
||||
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
|
||||
index bdbba4a..e84812e 100644
|
||||
--- a/libgcc/config/alpha/linux-unwind.h
|
||||
+++ b/libgcc/config/alpha/linux-unwind.h
|
||||
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
}
|
||||
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
|
||||
index 77b7c23..8bf5e82 100644
|
||||
--- a/libgcc/config/bfin/linux-unwind.h
|
||||
+++ b/libgcc/config/bfin/linux-unwind.h
|
||||
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
|
||||
index 540a0a2..29efbe3 100644
|
||||
--- a/libgcc/config/i386/linux-unwind.h
|
||||
+++ b/libgcc/config/i386/linux-unwind.h
|
||||
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
|
||||
index 75b7cf7..f964e24 100644
|
||||
--- a/libgcc/config/m68k/linux-unwind.h
|
||||
+++ b/libgcc/config/m68k/linux-unwind.h
|
||||
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
/* <sys/ucontext.h> is unfortunately broken right now. */
|
||||
struct uw_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
unsigned long uc_filler[80];
|
||||
diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
|
||||
index 2304142..30f25ea 100644
|
||||
--- a/libgcc/config/nios2/linux-unwind.h
|
||||
+++ b/libgcc/config/nios2/linux-unwind.h
|
||||
@@ -38,7 +38,7 @@ struct nios2_mcontext {
|
||||
|
||||
struct nios2_ucontext {
|
||||
unsigned long uc_flags;
|
||||
- struct ucontext *uc_link;
|
||||
+ ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
struct nios2_mcontext uc_mcontext;
|
||||
sigset_t uc_sigmask; /* mask last for extensibility */
|
||||
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
|
||||
index 9a2657f..e47493d 100644
|
||||
--- a/libgcc/config/pa/linux-unwind.h
|
||||
+++ b/libgcc/config/pa/linux-unwind.h
|
||||
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *frame;
|
||||
|
||||
/* rt_sigreturn trampoline:
|
||||
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
|
||||
index e389cac..0bf43ba 100644
|
||||
--- a/libgcc/config/sh/linux-unwind.h
|
||||
+++ b/libgcc/config/sh/linux-unwind.h
|
||||
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
|
||||
index 796e976..75f8890 100644
|
||||
--- a/libgcc/config/tilepro/linux-unwind.h
|
||||
+++ b/libgcc/config/tilepro/linux-unwind.h
|
||||
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* Return if this is not a signal handler. */
|
||||
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
|
||||
index 9872492..586a9d4 100644
|
||||
--- a/libgcc/config/xtensa/linux-unwind.h
|
||||
+++ b/libgcc/config/xtensa/linux-unwind.h
|
||||
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
|
||||
struct rt_sigframe {
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_;
|
||||
|
||||
/* movi a2, __NR_rt_sigreturn; syscall */
|
||||
--
|
||||
2.9.3
|
||||
|
@ -9,7 +9,6 @@ let
|
||||
"8" = "8.5.0";
|
||||
"7" = "7.5.0";
|
||||
"6" = "6.5.0";
|
||||
"4.9"= "4.9.4";
|
||||
};
|
||||
|
||||
fromMajorMinor = majorMinorVersion:
|
||||
@ -26,7 +25,6 @@ let
|
||||
"8.5.0" = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k";
|
||||
"7.5.0" = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
|
||||
"6.5.0" = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
|
||||
"4.9.4" = "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc";
|
||||
}."${version}";
|
||||
|
||||
in {
|
||||
|
@ -48,7 +48,6 @@ with pkgs;
|
||||
sets = lib.pipe gccTests ([
|
||||
(filterAttrs (_: v: lib.meta.availableOn stdenv.hostPlatform v.stdenv.cc))
|
||||
# Broken
|
||||
(filterAttrs (n: _: n != "gcc49Stdenv"))
|
||||
(filterAttrs (n: _: n != "gccMultiStdenv"))
|
||||
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
# fails with things like
|
||||
|
@ -510,11 +510,14 @@ mapAliases ({
|
||||
garmin-plugin = throw "garmin-plugin has been removed, as it is unmaintained upstream and no longer works with modern browsers."; # Added 2024-01-12
|
||||
garmindev = throw "'garmindev' has been removed as the dependent software 'qlandkartegt' has been removed"; # Added 2023-04-17
|
||||
gcc48 = throw "'gcc48' has been removed from nixpkgs"; # Added 2024-09-10
|
||||
gcc49 = throw "'gcc49' has been removed from nixpkgs"; # Added 2024-09-11
|
||||
gcc49Stdenv = throw "'gcc49Stdenv' has been removed from nixpkgs"; # Added 2024-09-11
|
||||
gcc10StdenvCompat = if stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11" then gcc10Stdenv else stdenv; # Added 2024-03-21
|
||||
gcl_2_6_13_pre = throw "'gcl_2_6_13_pre' has been removed in favor of 'gcl'"; # Added 2024-01-11
|
||||
geekbench4 = throw "'geekbench4' has been renamed to 'geekbench_4'"; # Added 2023-03-10
|
||||
geekbench5 = throw "'geekbench5' has been renamed to 'geekbench_5'"; # Added 2023-03-10
|
||||
gfortran48 = throw "'gfortran48' has been removed from nixpkgs"; # Added 2024-09-10
|
||||
gfortran49 = throw "'gfortran49' has been removed from nixpkgs"; # Added 2024-09-11
|
||||
ghostwriter = libsForQt5.kdeGear.ghostwriter; # Added 2023-03-18
|
||||
go-dependency-manager = throw "'go-dependency-manager' is unmaintained and the go community now uses 'go.mod' mostly instead"; # Added 2023-10-04
|
||||
gotktrix = throw "'gotktrix' has been removed, as it was broken and unmaintained"; # Added 2023-12-06
|
||||
|
@ -14917,7 +14917,6 @@ with pkgs;
|
||||
extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc;
|
||||
};
|
||||
|
||||
gcc49Stdenv = overrideCC gccStdenv buildPackages.gcc49;
|
||||
gcc6Stdenv = overrideCC gccStdenv buildPackages.gcc6;
|
||||
gcc7Stdenv = overrideCC gccStdenv buildPackages.gcc7;
|
||||
gcc8Stdenv = overrideCC gccStdenv buildPackages.gcc8;
|
||||
@ -15012,7 +15011,7 @@ with pkgs;
|
||||
};
|
||||
|
||||
inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; })
|
||||
gcc49 gcc6 gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13 gcc14;
|
||||
gcc6 gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13 gcc14;
|
||||
|
||||
gcc_latest = gcc14;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user