git.iko.soy/typeable/nixpkgs
on master help sign in
arm-frc-linux-gnueabi-gcc: init at 4.9.4

fixes #24578

commitff1e372849c74ed60eac1969d57c487c0042296a authorCole Scott <colescottsf@gmail.com> dateSat 8 Apr 2017, 02:12 (10 years ago) parent1d7a478
4 files changed+171
pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/default.nix+98 pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/minorSOname.patch+49 pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/no-nested-deprecated-warnings.patch+22 pkgs/top-level/all-packages.nix+2
pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/default.nixnew file+98
@@ -0,0 +1,98 @@
1+{stdenv, fetchurl
2+, arm-frc-linux-gnueabi-binutils, arm-frc-linux-gnueabi-eglibc, arm-frc-linux-gnueabi-linux-api-headers
3+, elfutils
4+, libmpc, gmp, mpfr, zlib, isl_0_15, cloog}:
5+
6+stdenv.mkDerivation rec {
7+ _target = "arm-frc-linux-gnueabi";
8+
9+ version = "4.9.4";
10+ name = "${_target}-gcc-${version}";
11+
12+ src = fetchurl {
13+ url = "ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/gcc-${version}.tar.bz2";
14+ sha256 = "6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092";
15+ };
16+
17+ patches = [
18+ ./minorSOname.patch
19+ ./no-nested-deprecated-warnings.patch
20+ ];
21+
22+ hardeningDisable = [ "format" ];
23+
24+ buildInputs = [
25+ arm-frc-linux-gnueabi-binutils
26+ arm-frc-linux-gnueabi-eglibc
27+ arm-frc-linux-gnueabi-linux-api-headers
28+ elfutils
29+ libmpc
30+ gmp
31+ mpfr
32+ zlib
33+ isl_0_15
34+ cloog
35+ ];
36+
37+
38+ configurePhase = ''
39+ mkdir gcc-build
40+ cd gcc-build
41+ ../configure \
42+ --prefix=$out \
43+ --host=$CHOST \
44+ --build=$CHOST \
45+ --program-prefix=${_target}- \
46+ --target=${_target} \
47+ --enable-shared \
48+ --disable-nls \
49+ --enable-threads=posix \
50+ --enable-languages=c,c++ \
51+ --disable-multilib \
52+ --disable-multiarch \
53+ --with-sysroot=${arm-frc-linux-gnueabi-eglibc}/${_target} \
54+ --with-build-sysroot=${arm-frc-linux-gnueabi-eglibc}/${_target} \
55+ --with-as=${arm-frc-linux-gnueabi-binutils}/${_target}/bin/as \
56+ --with-ld=${arm-frc-linux-gnueabi-binutils}/${_target}/bin/ld \
57+ --with-cpu=cortex-a9 \
58+ --with-float=softfp \
59+ --with-fpu=vfp \
60+ --with-specs='%{save-temps:-fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' \
61+ --enable-lto \
62+ --with-pkgversion='GCC-for-FRC' \
63+ --with-cloog \
64+ --enable-poison-system-directories \
65+ --enable-plugin \
66+ --with-system-zlib \
67+ --disable-libmudflap \
68+ --disable-libsanitizer
69+ '';
70+
71+ makeFlags = [
72+ "all-gcc"
73+ "all-target-libgcc"
74+ "all-target-libstdc++-v3"
75+ ];
76+
77+ installPhase = ''
78+ make install-gcc install-target-libgcc install-target-libstdc++-v3
79+ '';
80+
81+ postInstall = ''
82+ rm -rf $out/share/{man/man7,info}/ "$out/share/gcc-${version}/python"
83+ '';
84+
85+ meta = with stdenv.lib; {
86+ description = "FRC cross compiler";
87+ longDescription = ''
88+ arm-frc-linux-gnueabi-gcc is a cross compiler for building
89+ code for FIRST Robotics Competition. Used as a cross compiler
90+ for the NI RoboRio.
91+ '';
92+ license = licenses.gpl2;
93+ maintainers = [ maintainers.colescott ];
94+ platforms = platforms.linux;
95+
96+ priority = 4;
97+ };
98+}
pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/minorSOname.patchnew file+49
@@ -0,0 +1,49 @@
1+Description: Make the default SONAME include minor numbers (c++)
2+ This patch adds .0.20 to the end of the SONAME for libstdc++ to support
3+ independent side-by-side usage of .17 and .20.
4+ .
5+ gcc-armel (4.9.1-0frc2) trusty; urgency=low
6+ .
7+ * Fixing dependency ambiguity yet again...
8+Author: Patrick Plenefisch <phplenefisch@wpi.edu>
9+
10+---
11+
12+--- gcc-armel-4.9.1.orig/libstdc++-v3/configure
13++++ gcc-armel-4.9.1/libstdc++-v3/configure
14+@@ -10698,7 +10698,7 @@ gnu*)
15+ need_lib_prefix=no
16+ need_version=no
17+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18+- soname_spec='${libname}${release}${shared_ext}$major'
19++ soname_spec='${libname}${release}${shared_ext}$versuffix'
20+ shlibpath_var=LD_LIBRARY_PATH
21+ hardcode_into_libs=yes
22+ ;;
23+@@ -10824,7 +10824,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
24+ need_lib_prefix=no
25+ need_version=no
26+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27+- soname_spec='${libname}${release}${shared_ext}$major'
28++ soname_spec='${libname}${release}${shared_ext}$versuffix'
29+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
30+ shlibpath_var=LD_LIBRARY_PATH
31+ shlibpath_overrides_runpath=no
32+@@ -14382,7 +14382,7 @@ gnu*)
33+ need_lib_prefix=no
34+ need_version=no
35+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36+- soname_spec='${libname}${release}${shared_ext}$major'
37++ soname_spec='${libname}${release}${shared_ext}$versuffix'
38+ shlibpath_var=LD_LIBRARY_PATH
39+ hardcode_into_libs=yes
40+ ;;
41+@@ -14508,7 +14508,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
42+ need_lib_prefix=no
43+ need_version=no
44+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
45+- soname_spec='${libname}${release}${shared_ext}$major'
46++ soname_spec='${libname}${release}${shared_ext}$versuffix'
47+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
48+ shlibpath_var=LD_LIBRARY_PATH
49+ shlibpath_overrides_runpath=no
pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/no-nested-deprecated-warnings.patchnew file+22
@@ -0,0 +1,22 @@
1+Description: Get rid of recursive deprecated warnings.
2+ As is, gcc gives warnings when a function with the
3+ deprecated attribute calls another function with
4+ the deprecated attribute.
5+ See http://stackoverflow.com/questions/13459602/how-can-i-get-rid-of-deprecated-warnings-in-deprecated-functions-in-gcc
6+
7+Author: James Kuszmaul <jbkuszmaul@wpi.edu>
8+
9+--
10+
11+--- gcc-armel-4.9.1.orig/gcc/tree.c
12++++ gcc-armel-4.9.1/gcc/tree.c
13+@@ -12063,6 +12063,9 @@ warn_deprecated_use (tree node, tree attr)
14+ if (node == 0 || !warn_deprecated_decl)
15+ return;
16+
17++ if (current_function_decl && TREE_DEPRECATED(current_function_decl))
18++ return;
19++
20+ if (!attr)
21+ {
22+ if (DECL_P (node))
pkgs/top-level/all-packages.nix+2
@@ -450,6 +450,8 @@ with pkgs;
450450
451451 arm-frc-linux-gnueabi-binutils = callPackage ../development/tools/misc/arm-frc-linux-gnueabi-binutils {};
452452
453+ arm-frc-linux-gnueabi-gcc = callPackage ../development/compilers/arm-frc-linux-gnueabi-gcc {};
454+
453455 arp-scan = callPackage ../tools/misc/arp-scan { };
454456
455457 artyFX = callPackage ../applications/audio/artyFX {};