diff options
author | Cole Scott <colescottsf@gmail.com> | 2017-04-08 02:12:22 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-04-09 01:06:34 +0200 |
commit | ff1e372849c74ed60eac1969d57c487c0042296a (patch) | |
tree | 20a1b0d7db0564373d994c9c5fe39e97272c47b1 /pkgs/development | |
parent | 1d7a478c92e3ca3b952008e16cceafe4e831036b (diff) | |
download | nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar.gz nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar.bz2 nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar.lz nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar.xz nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.tar.zst nixpkgs-ff1e372849c74ed60eac1969d57c487c0042296a.zip |
arm-frc-linux-gnueabi-gcc: init at 4.9.4
fixes #24578
Diffstat (limited to 'pkgs/development')
3 files changed, 169 insertions, 0 deletions
diff --git a/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/default.nix b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/default.nix new file mode 100755 index 00000000000..6fa25df5e03 --- /dev/null +++ b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/default.nix @@ -0,0 +1,98 @@ +{stdenv, fetchurl +, arm-frc-linux-gnueabi-binutils, arm-frc-linux-gnueabi-eglibc, arm-frc-linux-gnueabi-linux-api-headers +, elfutils +, libmpc, gmp, mpfr, zlib, isl_0_15, cloog}: + +stdenv.mkDerivation rec { + _target = "arm-frc-linux-gnueabi"; + + version = "4.9.4"; + name = "${_target}-gcc-${version}"; + + src = fetchurl { + url = "ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/gcc-${version}.tar.bz2"; + sha256 = "6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092"; + }; + + patches = [ + ./minorSOname.patch + ./no-nested-deprecated-warnings.patch + ]; + + hardeningDisable = [ "format" ]; + + buildInputs = [ + arm-frc-linux-gnueabi-binutils + arm-frc-linux-gnueabi-eglibc + arm-frc-linux-gnueabi-linux-api-headers + elfutils + libmpc + gmp + mpfr + zlib + isl_0_15 + cloog + ]; + + + configurePhase = '' + mkdir gcc-build + cd gcc-build + ../configure \ + --prefix=$out \ + --host=$CHOST \ + --build=$CHOST \ + --program-prefix=${_target}- \ + --target=${_target} \ + --enable-shared \ + --disable-nls \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-multiarch \ + --with-sysroot=${arm-frc-linux-gnueabi-eglibc}/${_target} \ + --with-build-sysroot=${arm-frc-linux-gnueabi-eglibc}/${_target} \ + --with-as=${arm-frc-linux-gnueabi-binutils}/${_target}/bin/as \ + --with-ld=${arm-frc-linux-gnueabi-binutils}/${_target}/bin/ld \ + --with-cpu=cortex-a9 \ + --with-float=softfp \ + --with-fpu=vfp \ + --with-specs='%{save-temps:-fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}' \ + --enable-lto \ + --with-pkgversion='GCC-for-FRC' \ + --with-cloog \ + --enable-poison-system-directories \ + --enable-plugin \ + --with-system-zlib \ + --disable-libmudflap \ + --disable-libsanitizer + ''; + + makeFlags = [ + "all-gcc" + "all-target-libgcc" + "all-target-libstdc++-v3" + ]; + + installPhase = '' + make install-gcc install-target-libgcc install-target-libstdc++-v3 + ''; + + postInstall = '' + rm -rf $out/share/{man/man7,info}/ "$out/share/gcc-${version}/python" + ''; + + meta = with stdenv.lib; { + description = "FRC cross compiler"; + longDescription = '' + arm-frc-linux-gnueabi-gcc is a cross compiler for building + code for FIRST Robotics Competition. Used as a cross compiler + for the NI RoboRio. + ''; + license = licenses.gpl2; + maintainers = [ maintainers.colescott ]; + platforms = platforms.linux; + + priority = 4; + }; +} diff --git a/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/minorSOname.patch b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/minorSOname.patch new file mode 100755 index 00000000000..d97d12bc629 --- /dev/null +++ b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/minorSOname.patch @@ -0,0 +1,49 @@ +Description: Make the default SONAME include minor numbers (c++) + This patch adds .0.20 to the end of the SONAME for libstdc++ to support + independent side-by-side usage of .17 and .20. + . + gcc-armel (4.9.1-0frc2) trusty; urgency=low + . + * Fixing dependency ambiguity yet again... +Author: Patrick Plenefisch <phplenefisch@wpi.edu> + +--- + +--- gcc-armel-4.9.1.orig/libstdc++-v3/configure ++++ gcc-armel-4.9.1/libstdc++-v3/configure +@@ -10698,7 +10698,7 @@ gnu*) + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' ++ soname_spec='${libname}${release}${shared_ext}$versuffix' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; +@@ -10824,7 +10824,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' ++ soname_spec='${libname}${release}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no +@@ -14382,7 +14382,7 @@ gnu*) + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' ++ soname_spec='${libname}${release}${shared_ext}$versuffix' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; +@@ -14508,7 +14508,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' ++ soname_spec='${libname}${release}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no diff --git a/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/no-nested-deprecated-warnings.patch b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/no-nested-deprecated-warnings.patch new file mode 100755 index 00000000000..050a63e92fd --- /dev/null +++ b/pkgs/development/compilers/arm-frc-linux-gnueabi-gcc/no-nested-deprecated-warnings.patch @@ -0,0 +1,22 @@ +Description: Get rid of recursive deprecated warnings. + As is, gcc gives warnings when a function with the + deprecated attribute calls another function with + the deprecated attribute. + See http://stackoverflow.com/questions/13459602/how-can-i-get-rid-of-deprecated-warnings-in-deprecated-functions-in-gcc + +Author: James Kuszmaul <jbkuszmaul@wpi.edu> + +-- + +--- gcc-armel-4.9.1.orig/gcc/tree.c ++++ gcc-armel-4.9.1/gcc/tree.c +@@ -12063,6 +12063,9 @@ warn_deprecated_use (tree node, tree attr) + if (node == 0 || !warn_deprecated_decl) + return; + ++ if (current_function_decl && TREE_DEPRECATED(current_function_decl)) ++ return; ++ + if (!attr) + { + if (DECL_P (node)) |