Merge remote-tracking branch 'origin/staging'
This commit is contained in:
commit
b07e7bfc7b
@ -50,6 +50,12 @@ let
|
||||
name = "clementine-free-${version}";
|
||||
inherit patches src buildInputs;
|
||||
enableParallelBuilding = true;
|
||||
postPatch = ''
|
||||
sed -i src/CMakeLists.txt \
|
||||
-e 's,-Werror,,g' \
|
||||
-e 's,-Wno-unknown-warning-option,,g' \
|
||||
-e 's,-Wno-unused-private-field,,g'
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://www.clementine-player.org";
|
||||
description = "A multiplatform music player";
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, zip, wxGTK, gtk
|
||||
, contribPlugins ? false, hunspell, gamin, boost, libX11
|
||||
, contribPlugins ? false, hunspell, gamin, boost, libX11, cairo
|
||||
}:
|
||||
|
||||
with { inherit (stdenv.lib) optionalString optional optionals; };
|
||||
@ -14,7 +14,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "044njhps4cm1ijfdyr5f9wjyd0vblhrz9b4603ma52wcdq25093p";
|
||||
};
|
||||
|
||||
buildInputs = [ automake autoconf libtool pkgconfig file zip wxGTK gtk libX11 ]
|
||||
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
||||
|
||||
buildInputs = [ file zip wxGTK gtk libX11 cairo ]
|
||||
++ optionals contribPlugins [ hunspell gamin boost ];
|
||||
enableParallelBuilding = true;
|
||||
patches = [ ./writable-projects.patch ];
|
||||
@ -23,6 +25,9 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [ "--enable-pch=no" ]
|
||||
++ optional contribPlugins "--with-contrib-plugins";
|
||||
|
||||
# for whatever reason, the build config does not set these flag ...
|
||||
NIX_CFLAGS_COMPILE = "-lX11 -lcairo";
|
||||
|
||||
# Fix boost 1.59 compat
|
||||
# Try removing in the next version
|
||||
CPPFLAGS = "-DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED";
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, cmake, fetchurl, gnumake, pkgconfig, makeWrapper
|
||||
, boost, gettext, tclap, wxGTK
|
||||
, freeglut, glew, libXi, libXmu, mesa
|
||||
, freeglut, glew, libX11, libXi, libXmu, mesa, cairo
|
||||
, autopanosiftc, enblend-enfuse, exiv2, fftw, ilmbase, lensfun, libpng, libtiff
|
||||
, openexr, panotools, perlPackages, sqlite, vigra
|
||||
}:
|
||||
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
|
||||
|
||||
buildInputs = [ boost gettext tclap wxGTK
|
||||
freeglut glew libXi libXmu mesa
|
||||
freeglut glew libX11 libXi libXmu mesa cairo
|
||||
exiv2 fftw ilmbase lensfun libtiff libpng openexr panotools
|
||||
sqlite vigra
|
||||
perlPackages.ImageExifTool makeWrapper
|
||||
|
@ -16,8 +16,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ qt4 zlib ];
|
||||
|
||||
prefixKey="INSTALL_PREFIX=";
|
||||
prefixKey = "INSTALL_PREFIX=";
|
||||
configureScript = "qmake leocad.pro";
|
||||
postPatch = ''
|
||||
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "CAD program for creating virtual LEGO models";
|
||||
|
@ -1,15 +1,23 @@
|
||||
{ stdenv, fetchurl, pkgconfig, ncurses, readline }:
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, ncurses, readline }:
|
||||
|
||||
let version = "0.6.0pre2"; in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "abook-${version}";
|
||||
name = "abook-0.6.0pre2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://abook.sourceforge.net/devel/${name}.tar.gz";
|
||||
sha256 = "59d444504109dd96816e003b3023175981ae179af479349c34fa70bc12f6d385";
|
||||
sha256 = "11fkyq9bqw7s6jf38yglk8bsx0ar2wik0fq0ds0rdp8985849m2r";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig ncurses readline ];
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/gcc5.patch?h=packages/abook";
|
||||
name = "gcc5.patch";
|
||||
sha256 = "13n3qd6yy45i5n8ppjn9hj6y63ymjrq96280683xk7f7rjavw5nn";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ ncurses readline ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://abook.sourceforge.net/";
|
||||
|
@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||
"--enable-optimize" "--enable-strip" ])
|
||||
++ [
|
||||
"--disable-javaxpcom"
|
||||
"--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
|
||||
#"--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
|
||||
]
|
||||
++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
|
||||
in ''
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-std=gnu99" else null;
|
||||
NIX_CFLAGS_COMPILE = [ "-std=c99" ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/rcs/;
|
||||
|
@ -15,29 +15,37 @@ fi
|
||||
source @out@/nix-support/utils.sh
|
||||
|
||||
|
||||
# Figure out if linker flags should be passed. GCC prints annoying
|
||||
# warnings when they are not needed.
|
||||
# Parse command line options and set several variables.
|
||||
# For instance, figure out if linker flags should be passed.
|
||||
# GCC prints annoying warnings when they are not needed.
|
||||
dontLink=0
|
||||
getVersion=0
|
||||
nonFlagArgs=0
|
||||
[[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0
|
||||
|
||||
for i in "$@"; do
|
||||
if [ "$i" = -c ]; then
|
||||
params=("$@")
|
||||
n=0
|
||||
while [ $n -lt ${#params[*]} ]; do
|
||||
p=${params[n]}
|
||||
p2=${params[$((n+1))]}
|
||||
if [ "$p" = -c ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -S ]; then
|
||||
elif [ "$p" = -S ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -E ]; then
|
||||
elif [ "$p" = -E ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -E ]; then
|
||||
elif [ "$p" = -E ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -M ]; then
|
||||
elif [ "$p" = -M ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -MM ]; then
|
||||
elif [ "$p" = -MM ]; then
|
||||
dontLink=1
|
||||
elif [ "$i" = -x ]; then
|
||||
# At least for the cases c-header or c++-header we should set dontLink.
|
||||
# I expect no one use -x other than making precompiled headers.
|
||||
elif [[ "$p" = -x && "$p2" = *-header ]]; then
|
||||
dontLink=1
|
||||
elif [[ "$p" = -x && "$p2" = c++* && "$isCpp" = 0 ]]; then
|
||||
isCpp=1
|
||||
elif [ "$p" = -nostdlib ]; then
|
||||
isCpp=-1
|
||||
elif [ "${i:0:1}" != - ]; then
|
||||
nonFlagArgs=1
|
||||
elif [ "$i" = -m32 ]; then
|
||||
@ -45,6 +53,7 @@ for i in "$@"; do
|
||||
NIX_LDFLAGS="$NIX_LDFLAGS -dynamic-linker $(cat @out@/nix-support/dynamic-linker-m32)"
|
||||
fi
|
||||
fi
|
||||
n=$((n + 1))
|
||||
done
|
||||
|
||||
# If we pass a flag like -Wl, then gcc will call the linker unless it
|
||||
@ -58,7 +67,6 @@ fi
|
||||
|
||||
|
||||
# Optionally filter out paths not refering to the store.
|
||||
params=("$@")
|
||||
if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
|
||||
rest=()
|
||||
n=0
|
||||
@ -76,18 +84,30 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
|
||||
elif [ "$p" = -isystem ] && badPath "$p2"; then
|
||||
n=$((n + 1)); skip $p2
|
||||
else
|
||||
rest=("${rest[@]}" "$p")
|
||||
rest+=("$p")
|
||||
fi
|
||||
n=$((n + 1))
|
||||
done
|
||||
params=("${rest[@]}")
|
||||
fi
|
||||
|
||||
if [[ "@prog@" = *++ ]]; then
|
||||
if echo "$@" | grep -qv -- -nostdlib; then
|
||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${NIX_CXXSTDLIB_COMPILE-@default_cxx_stdlib_compile@}"
|
||||
NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK"
|
||||
fi
|
||||
|
||||
# Clear march/mtune=native -- they bring impurity.
|
||||
if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
|
||||
rest=()
|
||||
for i in "${params[@]}"; do
|
||||
if [[ "$i" = -m*=native ]]; then
|
||||
skip $i
|
||||
else
|
||||
rest+=("$i")
|
||||
fi
|
||||
done
|
||||
params=("${rest[@]}")
|
||||
fi
|
||||
|
||||
if [[ "$isCpp" = 1 ]]; then
|
||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${NIX_CXXSTDLIB_COMPILE-@default_cxx_stdlib_compile@}"
|
||||
NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK $NIX_CXXSTDLIB_LINK"
|
||||
fi
|
||||
|
||||
# Add the flags for the C compiler proper.
|
||||
|
@ -62,7 +62,7 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
|
||||
elif [ "${p:0:4}" = -aO/ ] && badPath "${p:3}"; then
|
||||
skip $p
|
||||
else
|
||||
rest=("${rest[@]}" "$p")
|
||||
rest+=("$p")
|
||||
fi
|
||||
n=$((n + 1))
|
||||
done
|
||||
@ -70,6 +70,20 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Clear march/mtune=native -- they bring impurity.
|
||||
if [ "$NIX_ENFORCE_NO_NATIVE" = 1 ]; then
|
||||
rest=()
|
||||
for i in "${params[@]}"; do
|
||||
if [[ "$i" = -m*=native ]]; then
|
||||
skip $i
|
||||
else
|
||||
rest+=("$i")
|
||||
fi
|
||||
done
|
||||
params=("${rest[@]}")
|
||||
fi
|
||||
|
||||
|
||||
# Add the flags for the GNAT compiler proper.
|
||||
extraAfter=($NIX_GNATFLAGS_COMPILE)
|
||||
extraBefore=()
|
||||
|
@ -146,11 +146,26 @@ if [ "$NIX_DONT_SET_RPATH" != 1 ]; then
|
||||
|
||||
# Finally, add `-rpath' switches.
|
||||
for i in $rpath; do
|
||||
extra=(${extra[@]} -rpath $i)
|
||||
extra+=(-rpath $i)
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Only add --build-id if this is a final link. FIXME: should build gcc
|
||||
# with --enable-linker-build-id instead?
|
||||
if [ "$NIX_SET_BUILD_ID" = 1 ]; then
|
||||
for p in "${params[@]}"; do
|
||||
if [ "$p" = "-r" -o "$p" = "--relocatable" -o "$p" = "-i" ]; then
|
||||
relocatable=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$relocatable" ]; then
|
||||
extra+=(--build-id)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Optionally print debug info.
|
||||
if [ -n "$NIX_DEBUG" ]; then
|
||||
echo "original flags to @prog@:" >&2
|
||||
|
@ -22,20 +22,20 @@ envHooks+=(addCVars)
|
||||
|
||||
# Note: these come *after* $out in the PATH (see setup.sh).
|
||||
|
||||
if [ -n "@cc@" ]; then
|
||||
addToSearchPath PATH @cc@/bin
|
||||
if [ -n "@binutils@" ]; then
|
||||
addToSearchPath _PATH @binutils@/bin
|
||||
fi
|
||||
|
||||
if [ -n "@binutils@" ]; then
|
||||
addToSearchPath PATH @binutils@/bin
|
||||
if [ -n "@cc@" ]; then
|
||||
addToSearchPath _PATH @cc@/bin
|
||||
fi
|
||||
|
||||
if [ -n "@libc@" ]; then
|
||||
addToSearchPath PATH @libc@/bin
|
||||
addToSearchPath _PATH @libc@/bin
|
||||
fi
|
||||
|
||||
if [ -n "@coreutils@" ]; then
|
||||
addToSearchPath PATH @coreutils@/bin
|
||||
addToSearchPath _PATH @coreutils@/bin
|
||||
fi
|
||||
|
||||
if [ -z "$crossConfig" ]; then
|
||||
|
@ -116,12 +116,14 @@ let
|
||||
grsecurityOverrider = args: grkern: {
|
||||
# Apparently as of gcc 4.6, gcc-plugin headers (which are needed by PaX plugins)
|
||||
# include libgmp headers, so we need these extra tweaks
|
||||
buildInputs = args.buildInputs ++ [ pkgs.gmp ];
|
||||
# As of gcc5 we also need libmpc
|
||||
buildInputs = args.buildInputs ++ [ pkgs.gmp pkgs.libmpc pkgs.mpfr ];
|
||||
preConfigure = ''
|
||||
extraIncludes="-I${pkgs.gmp}/include -I${pkgs.libmpc}/include -I${pkgs.mpfr}/include"
|
||||
${args.preConfigure or ""}
|
||||
sed -i 's|-I|-I${pkgs.gmp}/include -I|' scripts/gcc-plugin.sh
|
||||
sed -i 's|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
|
||||
sed -i 's|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += -I${pkgs.gmp}/include|' tools/gcc/Makefile
|
||||
sed -i "s|-I|$extraIncludes -I|" scripts/gcc-plugin.sh
|
||||
sed -i "s|HOST_EXTRACFLAGS +=|HOST_EXTRACFLAGS += $extraIncludes|" tools/gcc/Makefile
|
||||
sed -i "s|HOST_EXTRACXXFLAGS +=|HOST_EXTRACXXFLAGS += $extraIncludes|" tools/gcc/Makefile
|
||||
rm localversion-grsec
|
||||
echo ${localver grkern} > localversion-grsec
|
||||
'';
|
||||
|
@ -19,6 +19,12 @@ makeWrapper() {
|
||||
echo "export $varName=$value" >> $wrapper
|
||||
fi
|
||||
|
||||
if test "$p" = "--unset"; then
|
||||
varName=${params[$((n + 1))]}
|
||||
n=$((n + 1))
|
||||
echo "unset $varName" >> "$wrapper"
|
||||
fi
|
||||
|
||||
if test "$p" = "--run"; then
|
||||
command=${params[$((n + 1))]}
|
||||
n=$((n + 1))
|
||||
|
@ -1,5 +1,6 @@
|
||||
export NIX_LDFLAGS+=" --build-id"
|
||||
export NIX_CFLAGS_COMPILE+=" -ggdb"
|
||||
export NIX_SET_BUILD_ID=1
|
||||
export NIX_LDFLAGS+=" --compress-debug-sections=zlib"
|
||||
export NIX_CFLAGS_COMPILE+=" -ggdb -Wa,--compress-debug-sections"
|
||||
dontStrip=1
|
||||
|
||||
fixupOutputHooks+=(_separateDebugInfo)
|
||||
@ -25,18 +26,10 @@ _separateDebugInfo() {
|
||||
# Extract the debug info.
|
||||
header "separating debug info from $i (build ID $id)"
|
||||
mkdir -p "$dst/${id:0:2}"
|
||||
objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" --compress-debug-sections
|
||||
objcopy --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
|
||||
strip --strip-debug "$i"
|
||||
|
||||
# Also a create a symlink <original-name>.debug.
|
||||
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
|
||||
done < <(find "$prefix" -type f -print0)
|
||||
}
|
||||
|
||||
# - We might prefer to compress the debug info during link-time already,
|
||||
# but our ld doesn't support --compress-debug-sections=zlib (yet).
|
||||
# - Debug info may cause problems due to excessive memory usage during linking.
|
||||
# Using -Wa,--compress-debug-sections should help with that;
|
||||
# further interesting information: https://gcc.gnu.org/wiki/DebugFission
|
||||
# - Another related tool: https://fedoraproject.org/wiki/Features/DwarfCompressor
|
||||
|
||||
|
27
pkgs/desktops/kde-4.14/kdebindings/pykde4-gcc-5.patch
Normal file
27
pkgs/desktops/kde-4.14/kdebindings/pykde4-gcc-5.patch
Normal file
@ -0,0 +1,27 @@
|
||||
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb0ed8c85dd15fb18a902b22a7555ba4f7cf01cb
|
||||
|
||||
Patch created by: Erik Zeek
|
||||
|
||||
See also: https://bugs.gentoo.org/show_bug.cgi?id=567022
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ a/CMakeLists.txt
|
||||
@@ -166,7 +166,7 @@ add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${Q
|
||||
|
||||
file(GLOB kio_files_sip sip/kio/*.sip)
|
||||
set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
|
||||
-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
|
||||
+add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
|
||||
|
||||
file(GLOB kutils_files_sip sip/kutils/*.sip)
|
||||
set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
|
||||
@@ -190,7 +190,7 @@ add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNE
|
||||
|
||||
file(GLOB dnssd_files_sip sip/dnssd/*.sip)
|
||||
set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
|
||||
-add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
|
||||
+add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
|
||||
file(GLOB phonon_files_sip sip/phonon/*.sip)
|
||||
set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})
|
||||
|
@ -5,6 +5,8 @@ let pydir = "lib/python${python.majorVersion}"; in
|
||||
|
||||
kde {
|
||||
|
||||
patches = [ ./pykde4-gcc-5.patch ];
|
||||
|
||||
# todo: polkit isn't found by the build system
|
||||
|
||||
buildInputs = [
|
||||
|
@ -1,144 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
|
||||
# Thing.
|
||||
export CPP="gcc -E"
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraCFlags="-isystem /usr/include"
|
||||
extraLDFlags="-L/usr/lib64 -L/usr/lib"
|
||||
export NIX_FIXINC_DUMMY=/usr/include
|
||||
fi
|
||||
|
||||
|
||||
extraCFlags="-g0 -I$gmp/include -I$mpfr/include $extraCFlags"
|
||||
extraLDFlags="--strip-debug $extraLDFlags"
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
for i in $extraLDFlags; do
|
||||
export NIX_EXTRA_LDFLAGS="$NIX_EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
if test -z "$crossStageStatic"; then
|
||||
extraXCFlags="-B${libcCross}/lib -idirafter ${libcCross}/include"
|
||||
extraXLDFlags="-L${libcCross}/lib"
|
||||
export NIX_EXTRA_CFLAGS_TARGET=$extraXCFlags
|
||||
for i in $extraXLDFlags; do
|
||||
export NIX_EXTRA_LDFLAGS_TARGET="$NIX_EXTRA_LDFLAGS_TARGET -Wl,$i"
|
||||
done
|
||||
fi
|
||||
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
CFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" \
|
||||
LDFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" \
|
||||
)
|
||||
else
|
||||
export NIX_EXTRA_CFLAGS_TARGET=$NIX_EXTRA_CFLAGS
|
||||
export NIX_EXTRA_LDFLAGS_TARGET=$NIX_EXTRA_LDFLAGS
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
CFLAGS_FOR_BUILD="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
CFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
LDFLAGS_FOR_BUILD="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
LDFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
)
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
|
||||
# We don't want the gcc build to assume there will be a libc providing
|
||||
# limits.h in this stagae
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=false \
|
||||
)
|
||||
else
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=true \
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
# The host strip will destroy everything in the target binaries otherwise
|
||||
dontStrip=1
|
||||
fi
|
||||
|
||||
preConfigure() {
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
rm -rf $out/lib/gcc/*/*/install-tools
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rf $out/lib/gcc/*/*/include/root
|
||||
|
||||
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
|
||||
for i in $out/bin/*-gcc*; do
|
||||
if cmp -s $out/bin/gcc $i; then
|
||||
ln -sfn gcc $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/*-c++* $out/bin/*-g++*; do
|
||||
if cmp -s $out/bin/g++ $i; then
|
||||
ln -sfn g++ $i
|
||||
fi
|
||||
done
|
||||
|
||||
eval "$postInstallGhdl"
|
||||
}
|
||||
|
||||
|
||||
if test -z "$targetConfig"; then
|
||||
if test -z "$profiledCompiler"; then
|
||||
buildFlags="bootstrap $buildFlags"
|
||||
else
|
||||
buildFlags="profiledbootstrap $buildFlags"
|
||||
fi
|
||||
else
|
||||
:
|
||||
# buildFlags="all-gcc all-target-libgcc $buildFlags"
|
||||
# installTargets="install-gcc install-target-libgcc"
|
||||
fi
|
||||
|
||||
genericBuild
|
@ -1,184 +0,0 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false
|
||||
, langJava ? false
|
||||
, langVhdl ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, gmp, mpfr
|
||||
, bison ? null, flex ? null
|
||||
, zlib ? null, boehmgc ? null
|
||||
, enableMultilib ? false
|
||||
, name ? "gcc"
|
||||
, cross ? null
|
||||
, binutilsCross ? null
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, gnat ? null
|
||||
}:
|
||||
|
||||
assert langTreelang -> bison != null && flex != null;
|
||||
|
||||
assert cross != null -> profiledCompiler == false && enableMultilib == true;
|
||||
assert (cross != null && crossStageStatic) -> (langCC == false && langFortran
|
||||
== false && langTreelang == false);
|
||||
|
||||
assert langVhdl -> gnat != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
version = "4.3.6";
|
||||
|
||||
crossConfigureFlags =
|
||||
"--target=${cross.config}" +
|
||||
(if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libmudflap " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-shared"
|
||||
else
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
" --enable-threads=posix" +
|
||||
" --enable-nls"
|
||||
);
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else
|
||||
"-stage-final";
|
||||
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}-${version}" + crossNameAddon;
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src =
|
||||
optional /*langC*/ true (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
|
||||
sha256 = "0ygrfw3hgp48hkqipbl9lw38f27npigc2sm6f01g9iswpq1igbw6";
|
||||
}) ++
|
||||
optional langCC (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
|
||||
sha256 = "105xz3991b57zx3146xwlpchdb2sjmlknclvi1iac2gawm4mhxhf";
|
||||
}) ++
|
||||
optional langFortran (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
|
||||
sha256 = "12bqvf53hvhrwjnh101vn9frb5g8cr98cra4f11dzhzs4ppydpi1";
|
||||
}) ++
|
||||
optional langJava (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
|
||||
sha256 = "03w6jln9gmdv149s774rlw4rzi2zhbqna54r86cd6mql8flmy7fs";
|
||||
});
|
||||
|
||||
patches =
|
||||
[ ./pass-cxxcpp.patch ./libmudflap-cpp.patch ./siginfo_t_fix.patch ]
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
++ optional (noSysDirs && langFortran) ./no-sys-dirs-fortran.patch
|
||||
++ optional langJava ./java-jvgenmain-link.patch
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
++ optional langVhdl ./ghdl-runtime-o2.patch;
|
||||
|
||||
inherit noSysDirs profiledCompiler staticCompiler crossStageStatic
|
||||
binutilsCross libcCross;
|
||||
targetConfig = if cross != null then cross.config else null;
|
||||
|
||||
buildInputs = [texinfo gmp mpfr]
|
||||
++ (optionals langTreelang [bison flex])
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optional (boehmgc != null) boehmgc)
|
||||
++ (optionals (cross != null) [binutilsCross])
|
||||
++ (optionals langVhdl [gnat])
|
||||
;
|
||||
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
--disable-libstdcxx-pch
|
||||
--with-system-zlib
|
||||
--enable-languages=${
|
||||
concatStrings (intersperse ","
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langTreelang "treelang"
|
||||
++ optional langVhdl "vhdl"
|
||||
)
|
||||
)
|
||||
}
|
||||
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
${if cross != null then crossConfigureFlags else ""}
|
||||
";
|
||||
#Above I added a hack on making the build different than the host.
|
||||
|
||||
# Needed for the cross compilation to work
|
||||
AR = "ar";
|
||||
LD = "ld";
|
||||
CC = "gcc";
|
||||
|
||||
NIX_EXTRA_LDFLAGS = if staticCompiler then "-static" else "";
|
||||
|
||||
inherit gmp mpfr;
|
||||
|
||||
passthru = { inherit langC langCC langFortran langVhdl langTreelang
|
||||
enableMultilib; };
|
||||
|
||||
# ghdl does not build fine with parallel building
|
||||
enableParallelBuilding = !langVhdl;
|
||||
|
||||
meta = {
|
||||
homepage = "http://gcc.gnu.org/";
|
||||
license = "GPL/LGPL";
|
||||
description = "GNU Compiler Collection, 4.3.x";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
|
||||
} // (if langJava then {
|
||||
postConfigure = ''
|
||||
make configure-gcc
|
||||
sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${zlib}/include@ ; s@^LDFLAGS = .*@& -L${zlib}/lib@'
|
||||
sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${boehmgc}/include@ ; s@^LDFLAGS = .*@& -L${boehmgc}/lib -lgc@'
|
||||
'';
|
||||
} else {})
|
||||
// (if langVhdl then rec {
|
||||
name = "ghdl-0.29";
|
||||
|
||||
ghdlSrc = fetchurl {
|
||||
url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
|
||||
sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
|
||||
};
|
||||
|
||||
# Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
|
||||
# As we will change the timestamps to 1970-01-01 00:00:01, we also set the
|
||||
# content of that .cf to that value. This way ghdl does not complain on
|
||||
# the installed object files from the basic libraries (ieee, ...)
|
||||
postInstallGhdl = ''
|
||||
pushd $out
|
||||
find . -name "*.cf" -exec \
|
||||
sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
|
||||
popd
|
||||
'';
|
||||
|
||||
postUnpack = ''
|
||||
tar xvf ${ghdlSrc}
|
||||
mv ghdl-*/vhdl gcc*/gcc
|
||||
rm -Rf ghdl-*
|
||||
'';
|
||||
|
||||
passthru.isGNU = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://ghdl.free.fr/";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
description = "Complete VHDL simulator, using the GCC technology";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
|
||||
} else {}))
|
@ -1,36 +0,0 @@
|
||||
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
|
||||
index 8f481df..681ac59 100644
|
||||
--- a/gcc/vhdl/Make-lang.in
|
||||
+++ b/gcc/vhdl/Make-lang.in
|
||||
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
|
||||
AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
|
||||
-I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
|
||||
-I$(AGCC_GCCSRC_DIR)/libcpp/include
|
||||
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
|
||||
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS)
|
||||
|
||||
AGCC_LOCAL_OBJS=ortho-lang.o
|
||||
|
||||
@@ -140,7 +140,7 @@ ghdl$(exeext): force
|
||||
|
||||
# Ghdl libraries.
|
||||
ghdllib: ghdl$(exeext) $(GCC_PASSES) force
|
||||
- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
|
||||
+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
|
||||
|
||||
# Build hooks:
|
||||
|
||||
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
|
||||
index d754c6c..07abc4a 100644
|
||||
--- a/gcc/vhdl/Makefile.in
|
||||
+++ b/gcc/vhdl/Makefile.in
|
||||
@@ -80,7 +80,8 @@ T_CPPFLAGS =
|
||||
X_ADAFLAGS =
|
||||
T_ADAFLAGS =
|
||||
|
||||
-ADAC = $(CC)
|
||||
+# Never use the bootstrapped compiler, as it may not be built for ada
|
||||
+ADAC = gcc
|
||||
|
||||
ECHO = echo
|
||||
CHMOD = chmod
|
@ -1,13 +0,0 @@
|
||||
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
|
||||
index b8d2ed0..0e8bd55 100644
|
||||
--- a/gcc/vhdl/Makefile.in
|
||||
+++ b/gcc/vhdl/Makefile.in
|
||||
@@ -682,7 +682,7 @@ install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \
|
||||
PDIR=`pwd` && cd $(DESTDIR)$(VHDL_LIB_DIR) && \
|
||||
$(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. \
|
||||
LIBSRC_DIR="src" LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 \
|
||||
- ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none" \
|
||||
+ ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none -Wc,-O2" \
|
||||
std.v93 std.v87 ieee.v93 ieee.v87 synopsys.v93 synopsys.v87 mentor.v93
|
||||
# Copy std_standard (this is done after libraries, since they remove dirs).
|
||||
$(INSTALL_DATA) std87_standard.o \
|
@ -1,17 +0,0 @@
|
||||
The `jvgenmain' executable must be linked against `vec.o', among others,
|
||||
since it uses its vector API.
|
||||
|
||||
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
|
||||
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
|
||||
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
|
||||
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
|
||||
|
||||
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
|
||||
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
|
||||
rm -f $@
|
||||
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
|
||||
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
|
||||
|
||||
#
|
||||
# Build hooks:
|
@ -1,12 +0,0 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index d24c1af..b86e522 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -230,6 +229,7 @@ RAW_CXX_TARGET_EXPORTS = \
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
|
||||
CXX="$(CXX_FOR_TARGET)"; export CXX;
|
||||
|
||||
# Where to find GMP
|
@ -1,15 +0,0 @@
|
||||
diff -ru gcc-4.3.1-orig/libgfortran/configure gcc-4.3.1/libgfortran/configure
|
||||
--- gcc-4.3.1-orig/libgfortran/configure 2008-06-06 16:49:11.000000000 +0200
|
||||
+++ gcc-4.3.1/libgfortran/configure 2008-06-27 08:25:08.000000000 +0200
|
||||
@@ -35405,6 +35405,11 @@
|
||||
# A language specific compiler.
|
||||
CC=$lt_compiler
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
|
||||
+
|
||||
# Is the compiler the GNU compiler?
|
||||
with_gcc=$GCC
|
||||
|
@ -1,132 +0,0 @@
|
||||
diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
|
||||
--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -41,6 +41,10 @@
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+#undef LOCAL_INCLUDE_DIR
|
||||
+#undef SYSTEM_INCLUDE_DIR
|
||||
+#undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
|
||||
--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
|
||||
@@ -1478,10 +1478,10 @@
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 ""
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 ""
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
@@ -1515,8 +1515,8 @@
|
||||
/* For native compilers, these are well-known paths containing
|
||||
components that may be provided by the system. For cross
|
||||
compilers, these paths are not used. */
|
||||
-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
|
||||
-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
|
||||
+static const char *const standard_exec_prefix_1 = "/no-such-path/";
|
||||
+static const char *const standard_exec_prefix_2 = "/no-such-path/";
|
||||
static const char *md_exec_prefix = MD_EXEC_PREFIX;
|
||||
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
|
||||
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
|
||||
diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in
|
||||
--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -378,7 +378,11 @@
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
+# `fixinc' from fixing header files in /usr/include. However,
|
||||
+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
+# it to some dummy directory.
|
||||
+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
@@ -3277,7 +3281,7 @@
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
-DPREFIX=\"$(prefix)/\" \
|
||||
diff -ru gcc-4.3.1-orig/libgomp/configure gcc-4.3.1/libgomp/configure
|
||||
--- gcc-4.3.1-orig/libgomp/configure 2008-01-24 17:23:13.000000000 +0100
|
||||
+++ gcc-4.3.1/libgomp/configure 2008-06-26 11:23:49.000000000 +0200
|
||||
@@ -21493,6 +21493,11 @@
|
||||
# A language specific compiler.
|
||||
CC=$lt_compiler
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
|
||||
+
|
||||
# Is the compiler the GNU compiler?
|
||||
with_gcc=$GCC
|
||||
|
||||
Only in gcc-4.3.1/libgomp: configure~
|
||||
diff -ru gcc-4.3.1-orig/libmudflap/configure gcc-4.3.1/libmudflap/configure
|
||||
--- gcc-4.3.1-orig/libmudflap/configure 2008-01-24 17:30:08.000000000 +0100
|
||||
+++ gcc-4.3.1/libmudflap/configure 2008-06-26 11:23:11.000000000 +0200
|
||||
@@ -14229,6 +14229,11 @@
|
||||
# A language specific compiler.
|
||||
CC=$lt_compiler
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
|
||||
+
|
||||
# Is the compiler the GNU compiler?
|
||||
with_gcc=$GCC
|
||||
|
||||
Only in gcc-4.3.1/libmudflap: configure~
|
||||
diff -ru gcc-4.3.1-orig/libssp/configure gcc-4.3.1/libssp/configure
|
||||
--- gcc-4.3.1-orig/libssp/configure 2008-01-24 17:33:29.000000000 +0100
|
||||
+++ gcc-4.3.1/libssp/configure 2008-06-26 11:23:25.000000000 +0200
|
||||
@@ -12142,6 +12142,11 @@
|
||||
# A language specific compiler.
|
||||
CC=$lt_compiler
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
|
||||
+
|
||||
# Is the compiler the GNU compiler?
|
||||
with_gcc=$GCC
|
||||
|
||||
Only in gcc-4.3.1/libssp: configure~
|
||||
diff -ru gcc-4.3.1-orig/Makefile.in gcc-4.3.1/Makefile.in
|
||||
--- gcc-4.3.1-orig/Makefile.in 2007-12-13 10:30:49.000000000 +0100
|
||||
+++ gcc-4.3.1/Makefile.in 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -405,6 +405,14 @@
|
||||
@host_makefile_frag@
|
||||
###
|
||||
|
||||
+CFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS_TARGET)
|
||||
+CXXFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+LDFLAGS += $(NIX_EXTRA_LDFLAGS)
|
||||
+LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS_TARGET)
|
||||
+BOOT_CFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+BOOT_LDFLAGS += $(NIX_EXTRA_LDFLAGS)
|
||||
+
|
||||
# This is the list of directories that may be needed in RPATH_ENVVAR
|
||||
# so that prorgams built for the target machine work.
|
||||
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
|
@ -1,21 +0,0 @@
|
||||
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
|
||||
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
|
||||
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
|
||||
***************
|
||||
*** 213,219 ****
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
--- 213,220 ----
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
|
||||
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
@ -1,174 +0,0 @@
|
||||
https://bugs.gentoo.org/424970
|
||||
|
||||
fix from upstream for building with newer glibc versions
|
||||
|
||||
From f0cdca2bf2230005025e13e7354fedb612933c96 Mon Sep 17 00:00:00 2001
|
||||
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 20 Apr 2012 08:14:00 +0000
|
||||
Subject: [PATCH] struct siginfo vs. siginfo_t
|
||||
|
||||
Backport from trunk (but apply to gcc/):
|
||||
|
||||
2012-04-20 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
gcc/
|
||||
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
|
||||
siginfo_t instead of struct siginfo.
|
||||
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
|
||||
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
|
||||
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
|
||||
(ia64_handle_unwabi): Likewise.
|
||||
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
|
||||
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
|
||||
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
|
||||
(sh_fallback_frame_state): Likewise.
|
||||
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@186613 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/ChangeLog | 20 ++++++++++++++++++++
|
||||
gcc/config/alpha/linux-unwind.h | 4 ++--
|
||||
gcc/config/bfin/linux-unwind.h | 6 +++---
|
||||
gcc/config/i386/linux-unwind.h | 6 +++---
|
||||
gcc/config/ia64/linux-unwind.h | 6 +++---
|
||||
gcc/config/mips/linux-unwind.h | 5 +++--
|
||||
gcc/config/pa/linux-unwind.h | 4 ++--
|
||||
gcc/config/sh/linux-unwind.h | 9 +++++----
|
||||
gcc/config/xtensa/linux-unwind.h | 4 ++--
|
||||
9 files changed, 43 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
|
||||
index 4c811dc..8c04b3b 100644
|
||||
--- a/gcc/config/alpha/linux-unwind.h
|
||||
+++ b/gcc/config/alpha/linux-unwind.h
|
||||
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
|
||||
index 88c8285..15bb2f1 100644
|
||||
--- a/gcc/config/bfin/linux-unwind.h
|
||||
+++ b/gcc/config/bfin/linux-unwind.h
|
||||
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
int sig;
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
|
||||
index 36ee370..fe0ea3e 100644
|
||||
--- a/gcc/config/i386/linux-unwind.h
|
||||
+++ b/gcc/config/i386/linux-unwind.h
|
||||
@@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
int sig;
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/gcc/config/ia64/linux-unwind.h b/gcc/config/ia64/linux-unwind.h
|
||||
index 93f762d..da31259 100644
|
||||
--- a/gcc/config/ia64/linux-unwind.h
|
||||
+++ b/gcc/config/ia64/linux-unwind.h
|
||||
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigframe {
|
||||
char scratch[16];
|
||||
unsigned long sig_number;
|
||||
- struct siginfo *info;
|
||||
+ siginfo_t *info;
|
||||
struct sigcontext *sc;
|
||||
} *frame_ = (struct sigframe *)context->psp;
|
||||
struct sigcontext *sc = frame_->sc;
|
||||
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
|
||||
struct sigframe {
|
||||
char scratch[16];
|
||||
unsigned long sig_number;
|
||||
- struct siginfo *info;
|
||||
+ siginfo_t *info;
|
||||
struct sigcontext *sc;
|
||||
} *frame = (struct sigframe *)context->psp;
|
||||
struct sigcontext *sc = frame->sc;
|
||||
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
|
||||
index 02f7cd5..094ff58 100644
|
||||
--- a/gcc/config/mips/linux-unwind.h
|
||||
+++ b/gcc/config/mips/linux-unwind.h
|
||||
@@ -75,7 +76,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
u_int32_t ass[4]; /* Argument save space for o32. */
|
||||
u_int32_t trampoline[2];
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
_sig_ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
|
||||
index a0560e9..38b4eda 100644
|
||||
--- a/gcc/config/pa/linux-unwind.h
|
||||
+++ b/gcc/config/pa/linux-unwind.h
|
||||
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
int i;
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *frame;
|
||||
|
||||
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
|
||||
index 94ed95d..5a78e31 100644
|
||||
--- a/gcc/config/sh/linux-unwind.h
|
||||
+++ b/gcc/config/sh/linux-unwind.h
|
||||
@@ -80,9 +81,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
|
||||
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
@@ -179,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
&& (*(unsigned short *) (pc+14) == 0x00ad))))
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
|
||||
index 32e9349..2456497 100644
|
||||
--- a/gcc/config/xtensa/linux-unwind.h
|
||||
+++ b/gcc/config/xtensa/linux-unwind.h
|
||||
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_;
|
||||
|
||||
--
|
||||
1.7.9.7
|
||||
|
@ -1,200 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
|
||||
# Thing.
|
||||
export CPP="gcc -E"
|
||||
|
||||
if test "$staticCompiler" = "1"; then
|
||||
EXTRA_LDFLAGS="-static"
|
||||
else
|
||||
EXTRA_LDFLAGS=""
|
||||
fi
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_CC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraFlags="-isystem /usr/include"
|
||||
extraLDFlags="-L/usr/lib64 -L/usr/lib"
|
||||
glibc_libdir="/usr/lib"
|
||||
export NIX_FIXINC_DUMMY=/usr/include
|
||||
fi
|
||||
|
||||
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags"
|
||||
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
|
||||
EXTRA_FLAGS="$extraFlags"
|
||||
for i in $extraLDFlags; do
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build
|
||||
# the g++ compiler (after the specs for the cross-gcc are created).
|
||||
# Having LIBRARY_PATH= makes gcc read the specs from ., and the build
|
||||
# breaks. Having this variable comes from the default.nix code to bring
|
||||
# gcj in.
|
||||
unset LIBRARY_PATH
|
||||
unset CPATH
|
||||
if test -z "$crossStageStatic"; then
|
||||
EXTRA_FLAGS_TARGET="-g0 -O2 -B${libcCross}/lib -idirafter ${libcCross}/include"
|
||||
EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
|
||||
fi
|
||||
else
|
||||
if test -z "$NIX_CC_CROSS"; then
|
||||
EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
|
||||
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
|
||||
else
|
||||
# This the case of cross-building the gcc.
|
||||
# We need special flags for the target, different than those of the build
|
||||
# Assertion:
|
||||
test -e $NIX_CC_CROSS/nix-support/orig-libc
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||
|
||||
# The path to the Glibc binaries such as `crti.o'.
|
||||
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
|
||||
|
||||
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||
|
||||
EXTRA_FLAGS_TARGET="$extraFlags"
|
||||
for i in $extraLDFlags; do
|
||||
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS_TARGET -Wl,$i"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
|
||||
# the startfiles.
|
||||
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
|
||||
# for the startfiles.
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
CFLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
|
||||
FLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
|
||||
LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
LDFLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
|
||||
)
|
||||
|
||||
if test -z "$targetConfig"; then
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
|
||||
BOOT_LDFLAGS="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
|
||||
)
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
|
||||
# We don't want the gcc build to assume there will be a libc providing
|
||||
# limits.h in this stagae
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=false \
|
||||
)
|
||||
else
|
||||
makeFlagsArray=( \
|
||||
"${makeFlagsArray[@]}" \
|
||||
LIMITS_H_TEST=true \
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$targetConfig"; then
|
||||
# The host strip will destroy some important details of the objects
|
||||
dontStrip=1
|
||||
fi
|
||||
|
||||
preConfigure() {
|
||||
if test -n "$newlibSrc"; then
|
||||
tar xvf "$newlibSrc" -C ..
|
||||
ln -s ../newlib-*/newlib newlib
|
||||
# Patch to get armvt5el working:
|
||||
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
|
||||
fi
|
||||
# Bug - they packaged zlib
|
||||
if test -d "zlib"; then
|
||||
# This breaks the build without-headers, which should build only
|
||||
# the target libgcc as target libraries.
|
||||
# See 'configure:5370'
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
rm -rf $out/lib/gcc/*/*/install-tools
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rf $out/lib/gcc/*/*/include/root
|
||||
|
||||
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
|
||||
for i in $out/bin/*-gcc*; do
|
||||
if cmp -s $out/bin/gcc $i; then
|
||||
ln -sfn gcc $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/*-c++* $out/bin/*-g++*; do
|
||||
if cmp -s $out/bin/g++ $i; then
|
||||
ln -sfn g++ $i
|
||||
fi
|
||||
done
|
||||
|
||||
eval "$postInstallGhdl"
|
||||
}
|
||||
|
||||
|
||||
if test -z "$targetConfig" && test -z "$crossConfig"; then
|
||||
if test -z "$profiledCompiler"; then
|
||||
buildFlags="bootstrap $buildFlags"
|
||||
else
|
||||
buildFlags="profiledbootstrap $buildFlags"
|
||||
fi
|
||||
fi
|
||||
|
||||
genericBuild
|
@ -1,310 +0,0 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langJava ? false
|
||||
, langAda ? false
|
||||
, langVhdl ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, gmp, mpfr, gettext, which
|
||||
, ppl ? null, cloogppl ? null # used by the Graphite optimization framework
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, gnatboot ? null
|
||||
, enableMultilib ? false
|
||||
, name ? "gcc"
|
||||
, cross ? null
|
||||
, binutilsCross ? null
|
||||
, libcCross ? null
|
||||
, crossStageStatic ? true
|
||||
, gnat ? null
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null;
|
||||
assert langAda -> gnatboot != null;
|
||||
assert langVhdl -> gnat != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let version = "4.4.7";
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-3.1.3.jar;
|
||||
sha256 = "1f41j0y4kjydl71lqlvr73yagrs2jsg1fjymzjz66mjy7al5lh09";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && gtk != null;
|
||||
|
||||
/* Cross-gcc settings */
|
||||
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
||||
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
||||
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
|
||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||
|
||||
crossConfigureFlags =
|
||||
"--target=${cross.config}" +
|
||||
withArch +
|
||||
withCpu +
|
||||
withAbi +
|
||||
(if crossStageStatic then
|
||||
" --disable-libssp --disable-nls" +
|
||||
" --without-headers" +
|
||||
" --disable-threads " +
|
||||
" --disable-libmudflap " +
|
||||
" --disable-libgomp " +
|
||||
" --disable-shared" +
|
||||
" --disable-decimal-float" # libdecnumber requires libc
|
||||
else
|
||||
" --with-headers=${libcCross}/include" +
|
||||
" --enable-__cxa_atexit" +
|
||||
" --enable-long-long" +
|
||||
" --enable-threads=posix" +
|
||||
" --enable-nls" +
|
||||
" --disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||
);
|
||||
stageNameAddon = if crossStageStatic then "-stage-static" else
|
||||
"-stage-final";
|
||||
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert gtk != null -> (filter (x: x == null) xlibs) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}-${version}" + crossNameAddon;
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = (import ./sources.nix) {
|
||||
inherit fetchurl optional version;
|
||||
inherit langC langCC langFortran langJava langAda;
|
||||
};
|
||||
|
||||
patches =
|
||||
[ ./pass-cxxcpp.patch
|
||||
|
||||
# libmudflap and libstdc++ receive the build CPP,
|
||||
# and not the target.
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42279
|
||||
./target-cpp.patch
|
||||
|
||||
# Bad mixture of build/target flags
|
||||
./libstdc++-target.patch
|
||||
|
||||
# Compatibility with newer Glibc.
|
||||
./siginfo_t_fix.patch
|
||||
]
|
||||
++ optional noSysDirs ./no-sys-dirs.patch
|
||||
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
|
||||
# target libraries and tools.
|
||||
++ optional langAda ./gnat-cflags.patch
|
||||
++ optional langVhdl ./ghdl-ortho-cflags.patch
|
||||
++ optional (cross != null && cross.arch == "sparc64") ./pr41818.patch;
|
||||
|
||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
||||
libcCross;
|
||||
|
||||
nativeBuildInputs = [ texinfo which ];
|
||||
|
||||
buildInputs = [ gmp mpfr gettext ]
|
||||
++ (optional (ppl != null) ppl)
|
||||
++ (optional (cloogppl != null) cloogppl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optional (boehmgc != null) boehmgc)
|
||||
++ (optionals langJava [zip unzip])
|
||||
++ (optionals javaAwtGtk ([gtk pkgconfig libart_lgpl] ++ xlibs))
|
||||
++ (optionals (cross != null) [binutilsCross])
|
||||
++ (optionals langAda [gnatboot])
|
||||
++ (optionals langVhdl [gnat])
|
||||
;
|
||||
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if ppl != null then "--with-ppl=${ppl}" else ""}
|
||||
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
|
||||
${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
|
||||
--with-gmp=${gmp}
|
||||
--with-mpfr=${mpfr}
|
||||
--disable-libstdcxx-pch
|
||||
--without-included-gettext
|
||||
--with-system-zlib
|
||||
--enable-languages=${
|
||||
concatStrings (intersperse ","
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langAda "ada"
|
||||
++ optional langVhdl "vhdl"
|
||||
)
|
||||
)
|
||||
}
|
||||
${if langAda then " --enable-libada" else ""}
|
||||
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
${if cross != null then crossConfigureFlags else ""}
|
||||
";
|
||||
|
||||
targetConfig = if cross != null then cross.config else null;
|
||||
|
||||
# Needed for the cross compilation to work
|
||||
AR = "ar";
|
||||
LD = "ld";
|
||||
CC = "gcc";
|
||||
|
||||
crossAttrs = {
|
||||
AR = "${stdenv.cross.config}-ar";
|
||||
LD = "${stdenv.cross.config}-ld";
|
||||
CC = "${stdenv.cross.config}-gcc";
|
||||
CXX = "${stdenv.cross.config}-gcc";
|
||||
AR_FOR_TARGET = "${stdenv.cross.config}-ar";
|
||||
LD_FOR_TARGET = "${stdenv.cross.config}-ld";
|
||||
CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
|
||||
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
|
||||
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
|
||||
# If we are making a cross compiler, cross != null
|
||||
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
||||
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
|
||||
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||
--with-gmp=${gmp.crossDrv}
|
||||
--with-mpfr=${mpfr.crossDrv}
|
||||
--disable-libstdcxx-pch
|
||||
--without-included-gettext
|
||||
--with-system-zlib
|
||||
--enable-languages=${
|
||||
concatStrings (intersperse ","
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langAda "ada"
|
||||
++ optional langVhdl "vhdl"
|
||||
)
|
||||
)
|
||||
}
|
||||
${if langAda then " --enable-libada" else ""}
|
||||
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
${if cross != null then crossConfigureFlags else ""}
|
||||
--target=${stdenv.cross.config}
|
||||
";
|
||||
};
|
||||
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
|
||||
# the library headers and binaries, regarless of the language being
|
||||
# compiled.
|
||||
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't
|
||||
# honor `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
|
||||
# add them to $CPATH and $LIBRARY_PATH in this case.
|
||||
|
||||
CPATH = concatStrings
|
||||
(intersperse ":" (map (x: x + "/include")
|
||||
(optionals langJava [ boehmgc zlib ]
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ])));
|
||||
|
||||
LIBRARY_PATH = concatStrings
|
||||
(intersperse ":" (map (x: x + "/lib")
|
||||
(optionals langJava [ boehmgc zlib ]
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ])));
|
||||
|
||||
|
||||
passthru = { inherit langC langCC langAda langFortran langVhdl
|
||||
enableMultilib version; isGNU = true; };
|
||||
|
||||
# ghdl does not build fine with parallel building
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46173
|
||||
#enableParallelBuilding = !langVhdl && !langAda;
|
||||
|
||||
meta = {
|
||||
homepage = http://gcc.gnu.org/;
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}";
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = [
|
||||
# Add your name here!
|
||||
stdenv.lib.maintainers.viric
|
||||
];
|
||||
|
||||
# Volunteers needed for the {Cyg,Dar}win ports of *PPL.
|
||||
# gnatboot is not available out of linux platforms, so we disable the darwin build
|
||||
# for the gnat (ada compiler).
|
||||
platforms = stdenv.lib.platforms.linux ++ optionals (langAda == false) [ "i686-darwin" ];
|
||||
};
|
||||
}
|
||||
// (if langVhdl then rec {
|
||||
name = "ghdl-0.29";
|
||||
|
||||
ghdlSrc = fetchurl {
|
||||
url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
|
||||
sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
|
||||
};
|
||||
|
||||
# Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
|
||||
# As we will change the timestamps to 1970-01-01 00:00:01, we also set the
|
||||
# content of that .cf to that value. This way ghdl does not complain on
|
||||
# the installed object files from the basic libraries (ieee, ...)
|
||||
postInstallGhdl = ''
|
||||
pushd $out
|
||||
find . -name "*.cf" -exec \
|
||||
sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
|
||||
popd
|
||||
'';
|
||||
|
||||
postUnpack = ''
|
||||
tar xvf ${ghdlSrc}
|
||||
mv ghdl-*/vhdl gcc*/gcc
|
||||
rm -Rf ghdl-*
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://ghdl.free.fr/";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
|
||||
maintainers = with stdenv.lib.maintainers; [viric];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
|
||||
} else {}))
|
@ -1,111 +0,0 @@
|
||||
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
|
||||
index 8f481df..681ac59 100644
|
||||
--- a/gcc/vhdl/Make-lang.in
|
||||
+++ b/gcc/vhdl/Make-lang.in
|
||||
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
|
||||
AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
|
||||
-I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
|
||||
-I$(AGCC_GCCSRC_DIR)/libcpp/include
|
||||
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
|
||||
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
|
||||
|
||||
AGCC_LOCAL_OBJS=ortho-lang.o
|
||||
|
||||
@@ -140,7 +140,7 @@ ghdl$(exeext): force
|
||||
|
||||
# Ghdl libraries.
|
||||
ghdllib: ghdl$(exeext) $(GCC_PASSES) force
|
||||
- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
|
||||
+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
|
||||
|
||||
# Build hooks:
|
||||
|
||||
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
|
||||
index d754c6c..07abc4a 100644
|
||||
--- a/gcc/vhdl/Makefile.in
|
||||
+++ b/gcc/vhdl/Makefile.in
|
||||
@@ -80,7 +80,8 @@ T_CPPFLAGS =
|
||||
X_ADAFLAGS =
|
||||
T_ADAFLAGS =
|
||||
|
||||
-ADAC = $(CC)
|
||||
+# Never use the bootstrapped compiler, as it may not be built for ada
|
||||
+ADAC = gcc
|
||||
|
||||
ECHO = echo
|
||||
CHMOD = chmod
|
||||
diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
|
||||
index 84aeb92..8eddd42 100644
|
||||
--- a/gcc/vhdl/ortho-lang.c
|
||||
+++ b/gcc/vhdl/ortho-lang.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "options.h"
|
||||
#include "real.h"
|
||||
-#include "tree-gimple.h"
|
||||
+#include "gimple.h"
|
||||
+#include "tree.h"
|
||||
#include "function.h"
|
||||
#include "cgraph.h"
|
||||
#include "target.h"
|
||||
@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
|
||||
|
||||
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||
|
||||
-/* Tree code classes. */
|
||||
-
|
||||
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
|
||||
-
|
||||
-const enum tree_code_class tree_code_type[] = {
|
||||
-#include "tree.def"
|
||||
- 'x'
|
||||
-};
|
||||
-#undef DEFTREECODE
|
||||
-
|
||||
-/* Table indexed by tree code giving number of expression
|
||||
- operands beyond the fixed part of the node structure.
|
||||
- Not used for types or decls. */
|
||||
-
|
||||
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
|
||||
-
|
||||
-const unsigned char tree_code_length[] = {
|
||||
-#include "tree.def"
|
||||
- 0
|
||||
-};
|
||||
-#undef DEFTREECODE
|
||||
-
|
||||
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
|
||||
-const char * const tree_code_name[] = {
|
||||
-#include "tree.def"
|
||||
- "@@dummy"
|
||||
-};
|
||||
-#undef DEFTREECODE
|
||||
|
||||
union lang_tree_node
|
||||
GTY((desc ("0"),
|
||||
- chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
|
||||
+ chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
|
||||
{
|
||||
union tree_node GTY ((tag ("0"))) generic;
|
||||
};
|
||||
@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
|
||||
res = make_node (POINTER_TYPE);
|
||||
TREE_TYPE (res) = NULL_TREE;
|
||||
/* Seems necessary. */
|
||||
- TYPE_MODE (res) = Pmode;
|
||||
+ SET_TYPE_MODE (res, Pmode);
|
||||
layout_type (res);
|
||||
return res;
|
||||
}
|
||||
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
|
||||
index e201f64..f36fb97 100644
|
||||
--- a/gcc/vhdl/Make-lang.in
|
||||
+++ b/gcc/vhdl/Make-lang.in
|
||||
@@ -132,7 +132,7 @@ ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force
|
||||
-cargs $(CFLAGS) $(GHDL_ADAFLAGS)
|
||||
$(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \
|
||||
-bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
|
||||
- -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS)
|
||||
+ -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
|
||||
|
||||
# The driver for ghdl.
|
||||
ghdl$(exeext): force
|
@ -1,33 +0,0 @@
|
||||
diff --git a/libada/Makefile.in b/libada/Makefile.in
|
||||
index f5057a0..337e0c6 100644
|
||||
--- a/libada/Makefile.in
|
||||
+++ b/libada/Makefile.in
|
||||
@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
|
||||
WARN_CFLAGS = @warn_cflags@
|
||||
|
||||
TARGET_LIBGCC2_CFLAGS=
|
||||
-GNATLIBCFLAGS= -g -O2
|
||||
+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
|
||||
GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
|
||||
-DIN_RTS @have_getipinfo@
|
||||
|
||||
--- a/gcc/ada/gcc-interface/Makefile.in
|
||||
+++ b/gcc/ada/gcc-interface/Makefile.in
|
||||
@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
|
||||
SOME_ADAFLAGS =-gnata
|
||||
FORCE_DEBUG_ADAFLAGS = -g
|
||||
GNATLIBFLAGS = -gnatpg -nostdinc
|
||||
-GNATLIBCFLAGS = -g -O2
|
||||
+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
|
||||
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
|
||||
# should be autodetected during the configuration of libada and passed down to
|
||||
# here, but we need something for --disable-libada and hope for the best.
|
||||
@@ -1838,7 +1838,7 @@ ADA_INCLUDE_SRCS =\
|
||||
|
||||
LIBGNAT=../$(RTSDIR)/libgnat.a
|
||||
|
||||
-GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
|
||||
+GCC_LINK=$(CC) -static-libgcc $(CFLAGS_FOR_TARGET) $(ADA_INCLUDES)
|
||||
|
||||
# when compiling the tools, the runtime has to be first on the path so that
|
||||
# it hides the runtime files lying with the rest of the sources
|
@ -1,15 +0,0 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 245c770..8545b60 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -250,8 +250,8 @@ BASE_TARGET_EXPORTS = \
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
- CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
|
||||
- CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
|
||||
+ CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_TARGET)"; export CXX; \
|
||||
+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_TARGET) -E"; export CXXCPP;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
@ -1,66 +0,0 @@
|
||||
diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
|
||||
--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -41,6 +41,10 @@
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+#undef LOCAL_INCLUDE_DIR
|
||||
+#undef SYSTEM_INCLUDE_DIR
|
||||
+#undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
|
||||
--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
|
||||
@@ -1478,10 +1478,10 @@
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_1 ""
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
+#define STANDARD_STARTFILE_PREFIX_2 ""
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
|
||||
@@ -1515,8 +1515,8 @@
|
||||
/* For native compilers, these are well-known paths containing
|
||||
components that may be provided by the system. For cross
|
||||
compilers, these paths are not used. */
|
||||
-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
|
||||
-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
|
||||
+static const char *const standard_exec_prefix_1 = "/no-such-path/";
|
||||
+static const char *const standard_exec_prefix_2 = "/no-such-path/";
|
||||
static const char *md_exec_prefix = MD_EXEC_PREFIX;
|
||||
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
|
||||
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
|
||||
diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in
|
||||
--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
|
||||
@@ -378,7 +378,11 @@
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
+# `fixinc' from fixing header files in /usr/include. However,
|
||||
+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
+# it to some dummy directory.
|
||||
+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
@@ -3277,7 +3281,7 @@
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
-DPREFIX=\"$(prefix)/\" \
|
@ -1,21 +0,0 @@
|
||||
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
|
||||
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
|
||||
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
|
||||
***************
|
||||
*** 213,219 ****
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
--- 213,220 ----
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
|
||||
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
@ -1,26 +0,0 @@
|
||||
From <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818>. This fixes compilation
|
||||
of the sparc64-linux-gnu cross-compiler with shared libraries.
|
||||
|
||||
--- trunk/Makefile.in 2010/01/07 19:21:46 155705
|
||||
+++ trunk/Makefile.in 2010/01/07 19:53:50 155706
|
||||
@@ -259,7 +259,7 @@
|
||||
# directories built for the target.
|
||||
TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
|
||||
# This is the list of variables to export in the environment when
|
||||
-# configuring subdirectories for the host system.
|
||||
+# configuring subdirectories for the target system.
|
||||
BASE_TARGET_EXPORTS = \
|
||||
$(BASE_EXPORTS) \
|
||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||
@@ -281,7 +281,10 @@
|
||||
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
|
||||
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
|
||||
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
|
||||
- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
|
||||
+@if gcc-bootstrap
|
||||
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
|
||||
+@endif gcc-bootstrap
|
||||
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
|
||||
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
@ -1,174 +0,0 @@
|
||||
https://bugs.gentoo.org/424970
|
||||
|
||||
fix from upstream for building with newer glibc versions
|
||||
|
||||
From f0cdca2bf2230005025e13e7354fedb612933c96 Mon Sep 17 00:00:00 2001
|
||||
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 20 Apr 2012 08:14:00 +0000
|
||||
Subject: [PATCH] struct siginfo vs. siginfo_t
|
||||
|
||||
Backport from trunk (but apply to gcc/):
|
||||
|
||||
2012-04-20 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
gcc/
|
||||
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
|
||||
siginfo_t instead of struct siginfo.
|
||||
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
|
||||
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
|
||||
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
|
||||
(ia64_handle_unwabi): Likewise.
|
||||
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
|
||||
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
|
||||
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
|
||||
(sh_fallback_frame_state): Likewise.
|
||||
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@186613 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
gcc/ChangeLog | 20 ++++++++++++++++++++
|
||||
gcc/config/alpha/linux-unwind.h | 4 ++--
|
||||
gcc/config/bfin/linux-unwind.h | 6 +++---
|
||||
gcc/config/i386/linux-unwind.h | 6 +++---
|
||||
gcc/config/ia64/linux-unwind.h | 6 +++---
|
||||
gcc/config/mips/linux-unwind.h | 5 +++--
|
||||
gcc/config/pa/linux-unwind.h | 4 ++--
|
||||
gcc/config/sh/linux-unwind.h | 9 +++++----
|
||||
gcc/config/xtensa/linux-unwind.h | 4 ++--
|
||||
9 files changed, 43 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
|
||||
index 4c811dc..8c04b3b 100644
|
||||
--- a/gcc/config/alpha/linux-unwind.h
|
||||
+++ b/gcc/config/alpha/linux-unwind.h
|
||||
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
|
||||
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
|
||||
index 88c8285..15bb2f1 100644
|
||||
--- a/gcc/config/bfin/linux-unwind.h
|
||||
+++ b/gcc/config/bfin/linux-unwind.h
|
||||
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
int sig;
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
char retcode[8];
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
|
||||
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
|
||||
index 36ee370..fe0ea3e 100644
|
||||
--- a/gcc/config/i386/linux-unwind.h
|
||||
+++ b/gcc/config/i386/linux-unwind.h
|
||||
@@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
|
||||
{
|
||||
struct rt_sigframe {
|
||||
int sig;
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/gcc/config/ia64/linux-unwind.h b/gcc/config/ia64/linux-unwind.h
|
||||
index 93f762d..da31259 100644
|
||||
--- a/gcc/config/ia64/linux-unwind.h
|
||||
+++ b/gcc/config/ia64/linux-unwind.h
|
||||
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigframe {
|
||||
char scratch[16];
|
||||
unsigned long sig_number;
|
||||
- struct siginfo *info;
|
||||
+ siginfo_t *info;
|
||||
struct sigcontext *sc;
|
||||
} *frame_ = (struct sigframe *)context->psp;
|
||||
struct sigcontext *sc = frame_->sc;
|
||||
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
|
||||
struct sigframe {
|
||||
char scratch[16];
|
||||
unsigned long sig_number;
|
||||
- struct siginfo *info;
|
||||
+ siginfo_t *info;
|
||||
struct sigcontext *sc;
|
||||
} *frame = (struct sigframe *)context->psp;
|
||||
struct sigcontext *sc = frame->sc;
|
||||
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
|
||||
index 02f7cd5..094ff58 100644
|
||||
--- a/gcc/config/mips/linux-unwind.h
|
||||
+++ b/gcc/config/mips/linux-unwind.h
|
||||
@@ -75,7 +76,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct rt_sigframe {
|
||||
u_int32_t ass[4]; /* Argument save space for o32. */
|
||||
u_int32_t trampoline[2];
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
_sig_ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
sc = &rt_->uc.uc_mcontext;
|
||||
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
|
||||
index a0560e9..38b4eda 100644
|
||||
--- a/gcc/config/pa/linux-unwind.h
|
||||
+++ b/gcc/config/pa/linux-unwind.h
|
||||
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
|
||||
int i;
|
||||
struct sigcontext *sc;
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *frame;
|
||||
|
||||
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
|
||||
index 94ed95d..5a78e31 100644
|
||||
--- a/gcc/config/sh/linux-unwind.h
|
||||
+++ b/gcc/config/sh/linux-unwind.h
|
||||
@@ -80,9 +81,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
|
||||
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo *pinfo;
|
||||
+ siginfo_t *pinfo;
|
||||
void *puc;
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
@@ -179,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
|
||||
&& (*(unsigned short *) (pc+14) == 0x00ad))))
|
||||
{
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
|
||||
index 32e9349..2456497 100644
|
||||
--- a/gcc/config/xtensa/linux-unwind.h
|
||||
+++ b/gcc/config/xtensa/linux-unwind.h
|
||||
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
|
||||
struct sigcontext *sc;
|
||||
|
||||
struct rt_sigframe {
|
||||
- struct siginfo info;
|
||||
+ siginfo_t info;
|
||||
struct ucontext uc;
|
||||
} *rt_;
|
||||
|
||||
--
|
||||
1.7.9.7
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* Automatically generated by `update-gcc.sh', do not edit.
|
||||
For GCC 4.4.7. */
|
||||
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }:
|
||||
|
||||
assert version == "4.4.7";
|
||||
optional /* langC */ true (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
|
||||
sha256 = "c4663b7023909a4a075d3c2b2e17f6e082a9625aebfd0ce7f1d7817e44bf5542";
|
||||
}) ++
|
||||
optional langCC (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
|
||||
sha256 = "1882ff29be51eeb3fb349cbcda9df200a5c3cd20c97dd1d593101e0998b3c469";
|
||||
}) ++
|
||||
optional langFortran (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
|
||||
sha256 = "545a1e8e97d9364de4408c6a91830f9051ce24b4fbfbfdc56e72c7b4be17ebdd";
|
||||
}) ++
|
||||
optional langJava (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
|
||||
sha256 = "3c31ddd80f945b797d8d4ed7761426c26343781c361ec1b33bcea9874cc4c6c0";
|
||||
}) ++
|
||||
optional langAda (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
|
||||
sha256 = "fb9f30b85d48838390554b948d137487f0db09ad5f8ba73ca4d7ca35765c6ed8";
|
||||
}) ++
|
||||
[]
|
@ -1,12 +0,0 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 8545b60..1fab64d 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -231,6 +231,7 @@ BASE_TARGET_EXPORTS = \
|
||||
CC="$(CC_FOR_TARGET)"; export CC; \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
|
||||
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
|
||||
CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
|
||||
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
|
@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Usage: $(basename $0) VERSION"
|
||||
echo
|
||||
echo "Download and GPG-check component tarballs for GCC VERSION."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version="$1"
|
||||
|
||||
set -e
|
||||
|
||||
out="sources.nix"
|
||||
|
||||
declare -A options
|
||||
|
||||
options["core"]="/* langC */ true"
|
||||
options["g++"]="langCC"
|
||||
options["fortran"]="langFortran"
|
||||
options["java"]="langJava"
|
||||
options["ada"]="langAda"
|
||||
#options["go"]="langGo"
|
||||
|
||||
cat > "$out"<<EOF
|
||||
/* Automatically generated by \`$(basename $0)', do not edit.
|
||||
For GCC ${version}. */
|
||||
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
|
||||
langGo }:
|
||||
|
||||
assert version == "${version}";
|
||||
EOF
|
||||
|
||||
for component in core g++ fortran java ada #go
|
||||
do
|
||||
dir="ftp.gnu.org/gnu/gcc/gcc-${version}"
|
||||
file="gcc-${component}-${version}.tar.bz2"
|
||||
url="${dir}/${file}"
|
||||
|
||||
rm -f "${file}"
|
||||
|
||||
wget "$url"
|
||||
hash="$(nix-hash --flat --type sha256 "$file")"
|
||||
path="$(nix-store --add-fixed sha256 "$file")"
|
||||
|
||||
rm -f "${file}" "${file}.sig"
|
||||
wget "${url}.sig"
|
||||
gpg --verify "${file}.sig" "${path}" || gpg2 --verify "${file}.sig" "${path}"
|
||||
rm "${file}.sig"
|
||||
|
||||
cat >> "$out" <<EOF
|
||||
optional ${options[$component]} (fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-\${version}/gcc-${component}-\${version}.tar.bz2";
|
||||
sha256 = "${hash}";
|
||||
}) ++
|
||||
EOF
|
||||
done
|
||||
|
||||
cat >> "$out" <<EOF
|
||||
[]
|
||||
EOF
|
||||
|
||||
echo "result stored in \`$out'"
|
@ -495,6 +495,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
setupHook = ./use-old-abi.sh;
|
||||
|
||||
meta = {
|
||||
homepage = http://gcc.gnu.org/;
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
|
1
pkgs/development/compilers/gcc/5/use-old-abi.sh
Normal file
1
pkgs/development/compilers/gcc/5/use-old-abi.sh
Normal file
@ -0,0 +1 @@
|
||||
NIX_CFLAGS_COMPILE+=" -D_GLIBCXX_USE_CXX11_ABI=0"
|
@ -16,6 +16,11 @@ stdenv.mkDerivation rec {
|
||||
url = "http://gnu.spinellicreations.com/gcl/${name}.tar.gz";
|
||||
};
|
||||
|
||||
patches = [(fetchurl {
|
||||
url = https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-lisp/gcl/files/gcl-2.6.12-gcc5.patch;
|
||||
sha256 = "00jbsn0qp8ki2w7dx8caha7g2hr9076xa6bg48j3qqqncff93zdh";
|
||||
})];
|
||||
|
||||
buildInputs = [
|
||||
mpfr m4 binutils emacs gmp
|
||||
libX11 xproto inputproto libXi
|
||||
@ -38,6 +43,8 @@ stdenv.mkDerivation rec {
|
||||
# sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure
|
||||
# sed -re "s@if test -d /proc/self @if false @" -i configure
|
||||
# sed -re 's^([ \t])cpp ^\1cpp -I${stdenv.cc.cc}/include -I${stdenv.cc.libc}/include ^g' -i makefile
|
||||
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fgnu89-inline"
|
||||
'';
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
|
@ -87,6 +87,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./remove-tools-1.4.patch
|
||||
./new-binutils.patch
|
||||
];
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
|
194
pkgs/development/compilers/go/new-binutils.patch
Normal file
194
pkgs/development/compilers/go/new-binutils.patch
Normal file
@ -0,0 +1,194 @@
|
||||
https://github.com/golang/go/issues/13114
|
||||
https://gnats.netbsd.org/50777
|
||||
|
||||
--- a/src/cmd/6l/asm.c 2015-09-23 06:20:05.000000000 +0200
|
||||
+++ b/src/cmd/6l/asm.c 2016-03-10 21:00:29.032083210 +0100
|
||||
@@ -118,6 +118,8 @@
|
||||
return;
|
||||
|
||||
case 256 + R_X86_64_GOTPCREL:
|
||||
+ case 256 + R_X86_64_GOTPCRELX:
|
||||
+ case 256 + R_X86_64_REX_GOTPCRELX:
|
||||
if(targ->type != SDYNIMPORT) {
|
||||
// have symbol
|
||||
if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
|
||||
--- a/src/cmd/8l/asm.c 2015-09-23 06:20:05.000000000 +0200
|
||||
+++ b/src/cmd/8l/asm.c 2016-03-10 21:02:16.702064080 +0100
|
||||
@@ -115,6 +115,7 @@
|
||||
return;
|
||||
|
||||
case 256 + R_386_GOT32:
|
||||
+ case 256 + R_386_GOT32X:
|
||||
if(targ->type != SDYNIMPORT) {
|
||||
// have symbol
|
||||
if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
|
||||
--- a/src/cmd/ld/elf.h 2015-09-23 06:20:05.000000000 +0200
|
||||
+++ b/src/cmd/ld/elf.h 2016-03-10 21:00:29.033083211 +0100
|
||||
@@ -478,32 +478,47 @@
|
||||
* Relocation types.
|
||||
*/
|
||||
|
||||
-#define R_X86_64_NONE 0 /* No relocation. */
|
||||
-#define R_X86_64_64 1 /* Add 64 bit symbol value. */
|
||||
-#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */
|
||||
-#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */
|
||||
-#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */
|
||||
-#define R_X86_64_COPY 5 /* Copy data from shared object. */
|
||||
-#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */
|
||||
-#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */
|
||||
-#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */
|
||||
-#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */
|
||||
-#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */
|
||||
-#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */
|
||||
-#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */
|
||||
-#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */
|
||||
-#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */
|
||||
-#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */
|
||||
-#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */
|
||||
-#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */
|
||||
-#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */
|
||||
-#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */
|
||||
-#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */
|
||||
-#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
|
||||
-#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
|
||||
-#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
|
||||
-
|
||||
-#define R_X86_64_COUNT 24 /* Count of defined relocation types. */
|
||||
+#define R_X86_64_NONE 0
|
||||
+#define R_X86_64_64 1
|
||||
+#define R_X86_64_PC32 2
|
||||
+#define R_X86_64_GOT32 3
|
||||
+#define R_X86_64_PLT32 4
|
||||
+#define R_X86_64_COPY 5
|
||||
+#define R_X86_64_GLOB_DAT 6
|
||||
+#define R_X86_64_JMP_SLOT 7
|
||||
+#define R_X86_64_RELATIVE 8
|
||||
+#define R_X86_64_GOTPCREL 9
|
||||
+#define R_X86_64_32 10
|
||||
+#define R_X86_64_32S 11
|
||||
+#define R_X86_64_16 12
|
||||
+#define R_X86_64_PC16 13
|
||||
+#define R_X86_64_8 14
|
||||
+#define R_X86_64_PC8 15
|
||||
+#define R_X86_64_DTPMOD64 16
|
||||
+#define R_X86_64_DTPOFF64 17
|
||||
+#define R_X86_64_TPOFF64 18
|
||||
+#define R_X86_64_TLSGD 19
|
||||
+#define R_X86_64_TLSLD 20
|
||||
+#define R_X86_64_DTPOFF32 21
|
||||
+#define R_X86_64_GOTTPOFF 22
|
||||
+#define R_X86_64_TPOFF32 23
|
||||
+#define R_X86_64_PC64 24
|
||||
+#define R_X86_64_GOTOFF64 25
|
||||
+#define R_X86_64_GOTPC32 26
|
||||
+#define R_X86_64_GOT64 27
|
||||
+#define R_X86_64_GOTPCREL64 28
|
||||
+#define R_X86_64_GOTPC64 29
|
||||
+#define R_X86_64_GOTPLT64 30
|
||||
+#define R_X86_64_PLTOFF64 31
|
||||
+#define R_X86_64_SIZE32 32
|
||||
+#define R_X86_64_SIZE64 33
|
||||
+#define R_X86_64_GOTPC32_TLSDEC 34
|
||||
+#define R_X86_64_TLSDESC_CALL 35
|
||||
+#define R_X86_64_TLSDESC 36
|
||||
+#define R_X86_64_IRELATIVE 37
|
||||
+#define R_X86_64_PC32_BND 40
|
||||
+#define R_X86_64_GOTPCRELX 41
|
||||
+#define R_X86_64_REX_GOTPCRELX 42
|
||||
|
||||
|
||||
#define R_ALPHA_NONE 0 /* No reloc */
|
||||
@@ -581,39 +596,42 @@
|
||||
#define R_ARM_COUNT 38 /* Count of defined relocation types. */
|
||||
|
||||
|
||||
-#define R_386_NONE 0 /* No relocation. */
|
||||
-#define R_386_32 1 /* Add symbol value. */
|
||||
-#define R_386_PC32 2 /* Add PC-relative symbol value. */
|
||||
-#define R_386_GOT32 3 /* Add PC-relative GOT offset. */
|
||||
-#define R_386_PLT32 4 /* Add PC-relative PLT offset. */
|
||||
-#define R_386_COPY 5 /* Copy data from shared object. */
|
||||
-#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */
|
||||
-#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */
|
||||
-#define R_386_RELATIVE 8 /* Add load address of shared object. */
|
||||
-#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */
|
||||
-#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */
|
||||
-#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */
|
||||
-#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */
|
||||
-#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */
|
||||
-#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */
|
||||
-#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */
|
||||
-#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */
|
||||
-#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */
|
||||
-#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */
|
||||
-#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */
|
||||
-#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */
|
||||
-#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */
|
||||
-#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */
|
||||
-#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */
|
||||
-#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */
|
||||
-#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */
|
||||
-#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */
|
||||
-#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */
|
||||
-#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
|
||||
-#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
|
||||
-#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
|
||||
-
|
||||
-#define R_386_COUNT 38 /* Count of defined relocation types. */
|
||||
+#define R_386_NONE 0
|
||||
+#define R_386_32 1
|
||||
+#define R_386_PC32 2
|
||||
+#define R_386_GOT32 3
|
||||
+#define R_386_PLT32 4
|
||||
+#define R_386_COPY 5
|
||||
+#define R_386_GLOB_DAT 6
|
||||
+#define R_386_JMP_SLOT 7
|
||||
+#define R_386_RELATIVE 8
|
||||
+#define R_386_GOTOFF 9
|
||||
+#define R_386_GOTPC 10
|
||||
+#define R_386_TLS_TPOFF 14
|
||||
+#define R_386_TLS_IE 15
|
||||
+#define R_386_TLS_GOTIE 16
|
||||
+#define R_386_TLS_LE 17
|
||||
+#define R_386_TLS_GD 18
|
||||
+#define R_386_TLS_LDM 19
|
||||
+#define R_386_TLS_GD_32 24
|
||||
+#define R_386_TLS_GD_PUSH 25
|
||||
+#define R_386_TLS_GD_CALL 26
|
||||
+#define R_386_TLS_GD_POP 27
|
||||
+#define R_386_TLS_LDM_32 28
|
||||
+#define R_386_TLS_LDM_PUSH 29
|
||||
+#define R_386_TLS_LDM_CALL 30
|
||||
+#define R_386_TLS_LDM_POP 31
|
||||
+#define R_386_TLS_LDO_32 32
|
||||
+#define R_386_TLS_IE_32 33
|
||||
+#define R_386_TLS_LE_32 34
|
||||
+#define R_386_TLS_DTPMOD32 35
|
||||
+#define R_386_TLS_DTPOFF32 36
|
||||
+#define R_386_TLS_TPOFF32 37
|
||||
+#define R_386_TLS_GOTDESC 39
|
||||
+#define R_386_TLS_DESC_CALL 40
|
||||
+#define R_386_TLS_DESC 41
|
||||
+#define R_386_IRELATIVE 42
|
||||
+#define R_386_GOT32X 43
|
||||
|
||||
#define R_PPC_NONE 0 /* No relocation. */
|
||||
#define R_PPC_ADDR32 1
|
||||
--- a/src/cmd/ld/ldelf.c 2015-09-23 06:20:05.000000000 +0200
|
||||
+++ b/src/cmd/ld/ldelf.c 2016-03-10 21:00:29.033083211 +0100
|
||||
@@ -888,12 +888,15 @@
|
||||
case R('6', R_X86_64_PC32):
|
||||
case R('6', R_X86_64_PLT32):
|
||||
case R('6', R_X86_64_GOTPCREL):
|
||||
+ case R('6', R_X86_64_GOTPCRELX):
|
||||
+ case R('6', R_X86_64_REX_GOTPCRELX):
|
||||
case R('8', R_386_32):
|
||||
case R('8', R_386_PC32):
|
||||
case R('8', R_386_GOT32):
|
||||
case R('8', R_386_PLT32):
|
||||
case R('8', R_386_GOTOFF):
|
||||
case R('8', R_386_GOTPC):
|
||||
+ case R('8', R_386_GOT32X):
|
||||
*siz = 4;
|
||||
break;
|
||||
case R('6', R_X86_64_64):
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||
cd builddir
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE="-O0";
|
||||
NIX_CFLAGS_COMPILE = "-O0 ${stdenv.lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
|
||||
|
||||
# TODO : make mod-check fails
|
||||
doCheck = false;
|
||||
|
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
clx/new-clx bindings/glibc pcre rawsock wildcard zlib
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE="-O0";
|
||||
NIX_CFLAGS_COMPILE = "-O0 ${stdenv.lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
|
||||
|
||||
# TODO : make mod-check fails
|
||||
doCheck = false;
|
||||
|
@ -6,10 +6,18 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = http://cvs.haskell.org/Hugs/downloads/2006-09/hugs98-Sep2006.tar.gz;
|
||||
sha256 = "3cf4d27673564cffe691bd14032369f646233f14daf2bc37c6c6df9f062b46b6";
|
||||
sha256 = "1dj65c39zpy6qqvvrwns2hzj6ipnd4ih655xj7kgyk2nfdvd5x1w";
|
||||
};
|
||||
|
||||
buildInputs = [ bison ];
|
||||
patches =
|
||||
[ (fetchurl {
|
||||
url = https://aur.archlinux.org/cgit/aur.git/plain/hsbase_inline.patch?h=hugs;
|
||||
name = "hsbase_inline.patch";
|
||||
sha256 = "1h0sp16d17hlm6gj7zdbgwrjwi2l4q02m8p0wd60dp4gn9i9js0v";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ bison ];
|
||||
|
||||
postUnpack = "find -type f -exec sed -i 's@/bin/cp@cp@' {} +";
|
||||
|
||||
@ -29,10 +37,11 @@ stdenv.mkDerivation {
|
||||
"--enable-pthreads" # build Hugs using POSIX threads C library
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.haskell.org/hugs;
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.haskell.org/hugs;
|
||||
description = "Haskell interpreter";
|
||||
license = "as-is"; # gentoo labels it this way
|
||||
platforms = stdenv.lib.platforms.unix; # arbitrary choice
|
||||
maintainers = with maintainers; [ joachifm ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -18,7 +18,8 @@ stdenv.mkDerivation {
|
||||
freeglut libsamplerate pcre libevent libedit yajl
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=release" ];
|
||||
# for gcc5; c11 inline semantics breaks the build
|
||||
NIX_CFLAGS_COMPILE = "-fgnu89-inline";
|
||||
|
||||
meta = {
|
||||
description = "Io programming language";
|
||||
|
@ -113,7 +113,7 @@ let
|
||||
|
||||
in rec {
|
||||
|
||||
perl = perl520;
|
||||
perl = perl522;
|
||||
|
||||
perl520 = common {
|
||||
version = "5.20.3";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ fetchurl, fetchgit, stdenv, xorg, gcc44, makeWrapper, ncurses, cmake }:
|
||||
{ fetchurl, fetchgit, stdenv, xorg, makeWrapper, ncurses, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
# The Self wrapper stores source in $XDG_DATA_HOME/self or ~/.local/share/self
|
||||
@ -20,8 +20,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "966025b71542e44fc830b951f404f5721ad410ed24f7236fd0cd820ea0fc5731";
|
||||
};
|
||||
|
||||
# gcc 4.6 and above causes crashes on Self startup but gcc 4.4 works.
|
||||
buildInputs = [ gcc44 ncurses xorg.libX11 xorg.libXext makeWrapper cmake ];
|
||||
buildInputs = [ ncurses xorg.libX11 xorg.libXext makeWrapper cmake ];
|
||||
|
||||
selfWrapper = ./self;
|
||||
|
||||
@ -36,9 +35,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "A prototype-based dynamic object-oriented programming language, environment, and virtual machine";
|
||||
homepage = "http://selflanguage.org/";
|
||||
homepage = http://selflanguage.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.doublec ];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
broken = true; # segfaults on gcc > 4.4
|
||||
};
|
||||
}
|
||||
|
@ -29,5 +29,6 @@ stdenv.mkDerivation {
|
||||
description = "Library for manipulation of term data structures in C";
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ stdenv.mkDerivation rec {
|
||||
''
|
||||
sed -i GNUmakefile \
|
||||
-e 's|-march=native|${marchflags} -fPIC|g' \
|
||||
-e 's|-mtune=native||g' \
|
||||
-e '/^CXXFLAGS =/s|-g ||'
|
||||
'';
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
|
||||
, alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
|
||||
, libtheora, libva, libvdpau, libvorbis, libvpx, lzma, libpulseaudio, SDL, soxr
|
||||
, x264, xvidcore, zlib, libopus
|
||||
, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr
|
||||
, x264, xvidcore, zlib, libopus, SDL
|
||||
, openglSupport ? false, mesa ? null
|
||||
# Build options
|
||||
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
|
||||
, multithreadBuild ? true # Multithreading via pthreads/win32 threads
|
||||
, sdlSupport ? !stdenv.isArm, SDL ? null
|
||||
, vdpauSupport ? !stdenv.isArm, libvdpau ? null
|
||||
# Developer options
|
||||
, debugDeveloper ? false
|
||||
, optimizationsDeveloper ? true
|
||||
@ -39,7 +41,7 @@
|
||||
*/
|
||||
|
||||
let
|
||||
inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux;
|
||||
inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux isArm;
|
||||
inherit (stdenv.lib) optional optionals enableFeature;
|
||||
|
||||
cmpVer = builtins.compareVersions;
|
||||
@ -51,8 +53,8 @@ let
|
||||
# Version specific fix
|
||||
verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix;
|
||||
|
||||
# Disable dependency that needs fixes before it will work on Darwin
|
||||
disDarwinFix = origArg: minVer: fixArg: if (isDarwin && reqMin minVer) then fixArg else origArg;
|
||||
# Disable dependency that needs fixes before it will work on Darwin or Arm
|
||||
disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isArm) && reqMin minVer) then fixArg else origArg;
|
||||
in
|
||||
|
||||
assert openglSupport -> mesa != null;
|
||||
@ -117,11 +119,11 @@ stdenv.mkDerivation rec {
|
||||
(ifMinVer "0.6" (enableFeature (isLinux || isFreeBSD) "vaapi"))
|
||||
"--enable-vdpau"
|
||||
"--enable-libvorbis"
|
||||
(disDarwinFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx")
|
||||
(disDarwinOrArmFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx")
|
||||
(ifMinVer "2.4" "--enable-lzma")
|
||||
(ifMinVer "2.2" (enableFeature openglSupport "opengl"))
|
||||
(disDarwinFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse")
|
||||
(ifMinVer "2.5" "--enable-sdl") # Only configurable since 2.5, auto detected before then
|
||||
(disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse")
|
||||
(ifMinVer "2.5" (if sdlSupport then "--enable-sdl" else "")) # Only configurable since 2.5, auto detected before then
|
||||
(ifMinVer "1.2" "--enable-libsoxr")
|
||||
"--enable-libx264"
|
||||
"--enable-libxvid"
|
||||
@ -142,10 +144,13 @@ stdenv.mkDerivation rec {
|
||||
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora
|
||||
libvdpau libvorbis lzma SDL soxr x264 xvidcore zlib libopus
|
||||
] ++ optional openglSupport mesa
|
||||
++ optionals (!isDarwin) [ libvpx libpulseaudio ] # Need to be fixed on Darwin
|
||||
++ optional (isLinux || isFreeBSD) libva
|
||||
++ optionals (!isDarwin && !isArm) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM
|
||||
++ optional ((isLinux || isFreeBSD) && !isArm) libva
|
||||
++ optional isLinux alsaLib
|
||||
++ optional isDarwin Cocoa;
|
||||
++ optional isDarwin Cocoa
|
||||
++ optional vdpauSupport libvdpau
|
||||
++ optional sdlSupport SDL;
|
||||
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@ -179,8 +184,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
passthru = {
|
||||
vaapiSupport = if reqMin "0.6" && (isLinux || isFreeBSD) then true else false;
|
||||
vdpauSupport = true;
|
||||
vaapiSupport = if reqMin "0.6" && ((isLinux || isFreeBSD) && !isArm) then true else false;
|
||||
inherit vdpauSupport;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -37,6 +37,10 @@ postInstall() {
|
||||
|
||||
# Get rid of more unnecessary stuff.
|
||||
rm -rf $out/var $out/sbin/sln
|
||||
|
||||
for i in $out/lib/*.a; do
|
||||
strip -S "$i"
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
||||
|
@ -2,7 +2,6 @@
|
||||
, installLocales ? true
|
||||
, profilingLibraries ? false
|
||||
, gccCross ? null
|
||||
, debugSymbols ? false
|
||||
, withGd ? false, gd ? null, libpng ? null
|
||||
}:
|
||||
|
||||
@ -13,9 +12,7 @@ let
|
||||
cross = if gccCross != null then gccCross.target else null;
|
||||
in
|
||||
build cross ({
|
||||
name = "glibc"
|
||||
+ lib.optionalString debugSymbols "-debug"
|
||||
+ lib.optionalString withGd "-gd";
|
||||
name = "glibc" + lib.optionalString withGd "-gd";
|
||||
|
||||
inherit lib stdenv fetchurl linuxHeaders installLocales
|
||||
profilingLibraries gccCross withGd gd libpng;
|
||||
@ -38,23 +35,13 @@ in
|
||||
fi
|
||||
'';
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
meta.description = "The GNU C Library";
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
(if debugSymbols
|
||||
then {
|
||||
# Build with debugging symbols, but leave optimizations on and don't
|
||||
# attempt to keep the build tree.
|
||||
dontStrip = true;
|
||||
dontCrossStrip = true;
|
||||
NIX_STRIP_DEBUG = 0;
|
||||
}
|
||||
else {})
|
||||
|
||||
//
|
||||
|
||||
(if cross != null
|
||||
then {
|
||||
preConfigure = ''
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
./disable-fma.patch # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = stdenv.system != "i686-linux"; # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
|
||||
|
||||
meta = {
|
||||
description = "The GNU Scientific Library, a large numerical library";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ stdenv, fetchFromGitHub, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libcli-${version}";
|
||||
@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
|
||||
owner = "dparrish";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ (fetchurl {
|
||||
url = "https://github.com/dparrish/libcli/commit/ebc5a09db457ee1be9996711463cbbafe5ea72d5.patch";
|
||||
sha256 = "0szjiw3gd7by1sv924shnngfxvc98xvaqvx228b575xq93xxjcwl";
|
||||
})
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
@ -30,6 +30,9 @@ stdenv.mkDerivation rec {
|
||||
[ "--with-threads" ]
|
||||
++ stdenv.lib.optional withBdb "--with-bdb=${db}";
|
||||
|
||||
# Fix broken DT_NEEDED in lib/redland/librdf_storage_sqlite.so.
|
||||
NIX_CFLAGS_LINK = "-lraptor2";
|
||||
|
||||
meta = {
|
||||
homepage = http://librdf.org/;
|
||||
};
|
||||
|
@ -34,12 +34,12 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${prefix}nghttp2-${version}";
|
||||
version = "1.7.1";
|
||||
version = "1.8.0";
|
||||
|
||||
# Don't use fetchFromGitHub since this needs a bootstrap curl
|
||||
src = fetchurl {
|
||||
url = "http://security.ubuntu.com/ubuntu/pool/universe/n/nghttp2/nghttp2_${version}.orig.tar.bz2";
|
||||
sha256 = "0nbrww5gyjn4il33wz5b4sql5nifi12y2jbkmfbvxwlxlywm48kf";
|
||||
url = "http://http.debian.net/debian/pool/main/n/nghttp2/nghttp2_${version}.orig.tar.bz2";
|
||||
sha256 = "10xz3s624w208pr9xgm4ammc8bc5mi17vy4357hjfd5vmmp5m8b0";
|
||||
};
|
||||
|
||||
# Configure script searches for a symbol which does not exist in jemalloc on Darwin
|
||||
|
@ -18,5 +18,6 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||
broken = true; # doesn't build with GCC 5; fix in GitHub
|
||||
};
|
||||
}
|
||||
|
@ -100,13 +100,13 @@ let
|
||||
in {
|
||||
|
||||
openssl_1_0_1 = common {
|
||||
version = "1.0.1r";
|
||||
sha256 = "0iik7a3b0mrfrxzngdf7ywfscg9inbw77y0jp2ccw0gdap9xhjvq";
|
||||
version = "1.0.1s";
|
||||
sha256 = "e7e81d82f3cd538ab0cdba494006d44aab9dd96b7f6233ce9971fb7c7916d511";
|
||||
};
|
||||
|
||||
openssl_1_0_2 = lowPrio (common {
|
||||
version = "1.0.2f";
|
||||
sha256 = "932b4ee4def2b434f85435d9e3e19ca8ba99ce9a065a61524b429a9d5e9b2e9c";
|
||||
});
|
||||
openssl_1_0_2 = common {
|
||||
version = "1.0.2g";
|
||||
sha256 = "b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33";
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
|
||||
url = "http://telepathy.freedesktop.org/releases/telepathy-qt/${name}.tar.gz";
|
||||
sha256 = "1y51c6rxk5qvmab98c8rnmrlyk27hnl248casvbq3cd93sav8vj9";
|
||||
};
|
||||
|
||||
patches = let
|
||||
mkUrl = hash: "http://cgit.freedesktop.org/telepathy/telepathy-qt/patch/?id=" + hash;
|
||||
in [
|
||||
@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
cmakeFlags = "-DDESIRED_QT_VERSION=${builtins.substring 0 1 qtbase.version}";
|
||||
|
||||
# should be removable after the next update
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=cpp" "-Wno-error=unused-but-set-variable" ];
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
|
||||
|
||||
preBuild = ''
|
||||
NIX_CFLAGS_COMPILE+=" `pkg-config --cflags dbus-glib-1`"
|
||||
|
@ -20,6 +20,8 @@ stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches = [ ./gcc5.patch ];
|
||||
|
||||
meta = {
|
||||
description = "C++ Libraries for Computer Vision Research and Implementation";
|
||||
homepage = http://vxl.sourceforge.net/;
|
||||
|
15
pkgs/development/libraries/vxl/gcc5.patch
Normal file
15
pkgs/development/libraries/vxl/gcc5.patch
Normal file
@ -0,0 +1,15 @@
|
||||
https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20150216/1511118.html
|
||||
|
||||
--- vxl-git4e07960/vcl/vcl_compiler.h~ 2012-11-02 12:08:21.000000000 +0100
|
||||
+++ vxl-git4e07960/vcl/vcl_compiler.h 2015-02-15 13:50:46.376329878 +0100
|
||||
@@ -119,6 +119,10 @@
|
||||
# else
|
||||
# define VCL_GCC_40
|
||||
# endif
|
||||
+# elif (__GNUC__== 5)
|
||||
+// pretend GCC 5 to be GCC 4
|
||||
+# define VCL_GCC_4
|
||||
+# define VCL_GCC_41
|
||||
# else
|
||||
# error "Dunno about this gcc"
|
||||
# endif
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl, libusb }:
|
||||
{ stdenv, fetchurl, pkgconfig, gcc, perl, libusb }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0jhh1h1k5b41v2ycq8kn43nkrkh0b9l7xjmw38rak871g3z3hix1";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig perl libusb ];
|
||||
buildInputs = [ pkgconfig gcc perl libusb ];
|
||||
|
||||
meta = {
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
|
@ -2,7 +2,7 @@
|
||||
, cross ? null, gold ? true, bison ? null
|
||||
}:
|
||||
|
||||
let basename = "binutils-2.23.1"; in
|
||||
let basename = "binutils-2.26"; in
|
||||
|
||||
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||
|
||||
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/binutils/${basename}.tar.bz2";
|
||||
sha256 = "06bs5v5ndb4g5qx96d52lc818gkbskd1m0sz57314v887sqfbcia";
|
||||
sha256 = "1ngc2h3knhiw8s22l8y6afycfaxr5grviqy7mwvm4bsl14cf9b62";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -31,10 +31,15 @@ stdenv.mkDerivation rec {
|
||||
# Always add PaX flags section to ELF files.
|
||||
# This is needed, for instance, so that running "ldd" on a binary that is
|
||||
# PaX-marked to disable mprotect doesn't fail with permission denied.
|
||||
./pt-pax-flags-20121023.patch
|
||||
./pt-pax-flags.patch
|
||||
|
||||
# Bug fix backported from binutils master.
|
||||
./fix-bsymbolic.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = optional gold bison;
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
nativeBuildInputs = [ bison ];
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
inherit noSysDirs;
|
||||
|
47
pkgs/development/tools/misc/binutils/fix-bsymbolic.patch
Normal file
47
pkgs/development/tools/misc/binutils/fix-bsymbolic.patch
Normal file
@ -0,0 +1,47 @@
|
||||
http://lists.gnu.org/archive/html/bug-binutils/2016-01/msg00193.html
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=19615
|
||||
|
||||
From 1dab972d797c060e17229c2e10da01852ba82629 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Thu, 11 Feb 2016 15:31:15 -0800
|
||||
Subject: [PATCH] Enable -Bsymbolic and -Bsymbolic-functions to PIE
|
||||
|
||||
Before binutils 2.26, -Bsymbolic and -Bsymbolic-functions were also
|
||||
applied to PIE so that "ld -pie -Bsymbolic -E" can be used to export
|
||||
symbols in PIE with local binding. This patch re-enables -Bsymbolic
|
||||
and -Bsymbolic-functions for PIE.
|
||||
|
||||
diff --git a/ld/lexsup.c b/ld/lexsup.c
|
||||
index 4cad209..e2fb212 100644
|
||||
--- a/ld/lexsup.c
|
||||
+++ b/ld/lexsup.c
|
||||
@@ -1586,15 +1586,14 @@ parse_args (unsigned argc, char **argv)
|
||||
/* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
|
||||
--dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
|
||||
--dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
|
||||
- for shared libraries. -Bsymbolic overrides all others and vice
|
||||
- versa. */
|
||||
+ for PIC outputs. -Bsymbolic overrides all others and vice versa. */
|
||||
switch (command_line.symbolic)
|
||||
{
|
||||
case symbolic_unset:
|
||||
break;
|
||||
case symbolic:
|
||||
- /* -Bsymbolic is for shared library only. */
|
||||
- if (bfd_link_dll (&link_info))
|
||||
+ /* -Bsymbolic is for PIC output only. */
|
||||
+ if (bfd_link_pic (&link_info))
|
||||
{
|
||||
link_info.symbolic = TRUE;
|
||||
/* Should we free the unused memory? */
|
||||
@@ -1603,8 +1602,8 @@ parse_args (unsigned argc, char **argv)
|
||||
}
|
||||
break;
|
||||
case symbolic_functions:
|
||||
- /* -Bsymbolic-functions is for shared library only. */
|
||||
- if (bfd_link_dll (&link_info))
|
||||
+ /* -Bsymbolic-functions is for PIC output only. */
|
||||
+ if (bfd_link_pic (&link_info))
|
||||
command_line.dynamic_list = dynamic_list_data;
|
||||
break;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
233
pkgs/development/tools/misc/binutils/pt-pax-flags.patch
Normal file
233
pkgs/development/tools/misc/binutils/pt-pax-flags.patch
Normal file
@ -0,0 +1,233 @@
|
||||
--- binutils-2.15.94.0.2.2.orig/bfd/elf-bfd.h 2005-02-07 20:42:44.000000000 +0100
|
||||
+++ binutils-2.15.94.0.2.2/bfd/elf-bfd.h 2005-02-20 13:13:17.362558200 +0100
|
||||
@@ -1266,6 +1266,9 @@
|
||||
/* Should the PT_GNU_RELRO segment be emitted? */
|
||||
bfd_boolean relro;
|
||||
|
||||
+ /* Segment flags for the PT_PAX_FLAGS segment. */
|
||||
+ unsigned int pax_flags;
|
||||
+
|
||||
/* Symbol version definitions in external objects. */
|
||||
Elf_Internal_Verdef *verdef;
|
||||
|
||||
--- binutils-2.17.50.0.18/bfd/elf.c.orig 2007-08-01 11:12:02.000000000 -0400
|
||||
+++ binutils-2.17.50.0.18/bfd/elf.c 2007-08-01 14:27:36.086986774 -0400
|
||||
@@ -1085,6 +1085,7 @@
|
||||
case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
|
||||
case PT_GNU_STACK: pt = "STACK"; break;
|
||||
case PT_GNU_RELRO: pt = "RELRO"; break;
|
||||
+ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
|
||||
default: pt = NULL; break;
|
||||
}
|
||||
return pt;
|
||||
@@ -2346,6 +2347,9 @@
|
||||
case PT_GNU_RELRO:
|
||||
return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
|
||||
|
||||
+ case PT_PAX_FLAGS:
|
||||
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
|
||||
+
|
||||
default:
|
||||
/* Check for any processor-specific program segment types. */
|
||||
bed = get_elf_backend_data (abfd);
|
||||
@@ -3326,6 +3330,11 @@
|
||||
++segs;
|
||||
}
|
||||
|
||||
+ {
|
||||
+ /* We need a PT_PAX_FLAGS segment. */
|
||||
+ ++segs;
|
||||
+ }
|
||||
+
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
{
|
||||
if ((s->flags & SEC_LOAD) != 0
|
||||
@@ -3945,6 +3954,20 @@
|
||||
pm = &m->next;
|
||||
}
|
||||
|
||||
+ {
|
||||
+ amt = sizeof (struct elf_segment_map);
|
||||
+ m = bfd_zalloc (abfd, amt);
|
||||
+ if (m == NULL)
|
||||
+ goto error_return;
|
||||
+ m->next = NULL;
|
||||
+ m->p_type = PT_PAX_FLAGS;
|
||||
+ m->p_flags = elf_tdata (abfd)->pax_flags;
|
||||
+ m->p_flags_valid = 1;
|
||||
+
|
||||
+ *pm = m;
|
||||
+ pm = &m->next;
|
||||
+ }
|
||||
+
|
||||
free (sections);
|
||||
elf_tdata (abfd)->segment_map = mfirst;
|
||||
}
|
||||
@@ -5129,7 +5152,8 @@
|
||||
5. PT_GNU_STACK segments do not include any sections.
|
||||
6. PT_TLS segment includes only SHF_TLS sections.
|
||||
7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
|
||||
- 8. PT_DYNAMIC should not contain empty sections at the beginning
|
||||
+ 8. PT_PAX_FLAGS segments do not include any sections.
|
||||
+ 9. PT_DYNAMIC should not contain empty sections at the beginning
|
||||
(with the possible exception of .dynamic). */
|
||||
#define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
|
||||
((((segment->p_paddr \
|
||||
@@ -5138,6 +5162,7 @@
|
||||
&& (section->flags & SEC_ALLOC) != 0) \
|
||||
|| IS_COREFILE_NOTE (segment, section)) \
|
||||
&& segment->p_type != PT_GNU_STACK \
|
||||
+ && segment->p_type != PT_PAX_FLAGS \
|
||||
&& (segment->p_type != PT_TLS \
|
||||
|| (section->flags & SEC_THREAD_LOCAL)) \
|
||||
&& (segment->p_type == PT_LOAD \
|
||||
--- binutils-2.23.52.0.1/bfd/elflink.c.orig 2013-02-27 21:28:03.000000000 +0100
|
||||
+++ binutils-2.23.52.0.1/bfd/elflink.c 2013-03-01 17:32:44.922717879 +0100
|
||||
@@ -5764,18 +5764,32 @@
|
||||
&& ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
|
||||
return FALSE;
|
||||
|
||||
+ elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
|
||||
+
|
||||
+ if (info->execheap)
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
|
||||
+ else if (info->noexecheap)
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
|
||||
+
|
||||
/* Determine any GNU_STACK segment requirements, after the backend
|
||||
has had a chance to set a default segment size. */
|
||||
if (info->execstack)
|
||||
+ {
|
||||
elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
|
||||
+ }
|
||||
else if (info->noexecstack)
|
||||
+ {
|
||||
elf_stack_flags (output_bfd) = PF_R | PF_W;
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
bfd *inputobj;
|
||||
asection *notesec = NULL;
|
||||
int exec = 0;
|
||||
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
|
||||
for (inputobj = info->input_bfds;
|
||||
inputobj;
|
||||
inputobj = inputobj->link_next)
|
||||
@@ -5789,7 +5803,11 @@
|
||||
if (s)
|
||||
{
|
||||
if (s->flags & SEC_CODE)
|
||||
- exec = PF_X;
|
||||
+ {
|
||||
+ elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
|
||||
+ elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
|
||||
+ exec = PF_X;
|
||||
+ }
|
||||
notesec = s;
|
||||
}
|
||||
else if (bed->default_execstack)
|
||||
--- binutils-2.15.94.0.2.2.orig/binutils/readelf.c 2005-02-18 07:14:30.000000000 +0100
|
||||
+++ binutils-2.15.94.0.2.2/binutils/readelf.c 2005-02-20 13:13:17.470541784 +0100
|
||||
@@ -2293,6 +2293,7 @@
|
||||
return "GNU_EH_FRAME";
|
||||
case PT_GNU_STACK: return "GNU_STACK";
|
||||
case PT_GNU_RELRO: return "GNU_RELRO";
|
||||
+ case PT_PAX_FLAGS: return "PAX_FLAGS";
|
||||
|
||||
default:
|
||||
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
|
||||
--- binutils-2.15.94.0.2.2.orig/include/bfdlink.h 2004-11-22 21:33:32.000000000 +0100
|
||||
+++ binutils-2.15.94.0.2.2/include/bfdlink.h 2005-02-20 13:13:17.476540872 +0100
|
||||
@@ -313,6 +313,14 @@
|
||||
flags. */
|
||||
unsigned int noexecstack: 1;
|
||||
|
||||
+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
|
||||
+ flags. */
|
||||
+ unsigned int execheap: 1;
|
||||
+
|
||||
+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
|
||||
+ flags. */
|
||||
+ unsigned int noexecheap: 1;
|
||||
+
|
||||
/* TRUE if PT_GNU_RELRO segment should be created. */
|
||||
unsigned int relro: 1;
|
||||
|
||||
--- binutils-2.15.94.0.2.2.orig/include/elf/common.h 2004-11-22 21:33:32.000000000 +0100
|
||||
+++ binutils-2.15.94.0.2.2/include/elf/common.h 2005-02-20 13:13:17.482539960 +0100
|
||||
@@ -423,6 +423,7 @@
|
||||
#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
|
||||
#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
|
||||
#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
|
||||
+#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
|
||||
|
||||
/* Program segment permissions, in program header p_flags field. */
|
||||
|
||||
@@ -433,6 +434,19 @@
|
||||
#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
|
||||
#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
|
||||
|
||||
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
|
||||
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
|
||||
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
|
||||
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
|
||||
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
|
||||
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
|
||||
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
|
||||
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
|
||||
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
|
||||
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
|
||||
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
|
||||
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
|
||||
+
|
||||
/* Values for section header, sh_type field. */
|
||||
|
||||
#define SHT_NULL 0 /* Section header table entry unused */
|
||||
--- binutils-2.18.50.0.1/ld/emultempl/elf32.em.orig 2007-09-08 19:34:12.000000000 +0200
|
||||
+++ binutils-2.18.50.0.1/ld/emultempl/elf32.em 2007-09-15 21:41:35.688212063 +0200
|
||||
@@ -2139,6 +2139,16 @@
|
||||
link_info.noexecstack = TRUE;
|
||||
link_info.execstack = FALSE;
|
||||
}
|
||||
+ else if (strcmp (optarg, "execheap") == 0)
|
||||
+ {
|
||||
+ link_info.execheap = TRUE;
|
||||
+ link_info.noexecheap = FALSE;
|
||||
+ }
|
||||
+ else if (strcmp (optarg, "noexecheap") == 0)
|
||||
+ {
|
||||
+ link_info.noexecheap = TRUE;
|
||||
+ link_info.execheap = FALSE;
|
||||
+ }
|
||||
EOF
|
||||
|
||||
if test -n "$COMMONPAGESIZE"; then
|
||||
--- binutils-2.15.94.0.2.2.orig/ld/ldgram.y 2004-11-22 21:33:32.000000000 +0100
|
||||
+++ binutils-2.15.94.0.2.2/ld/ldgram.y 2005-02-20 13:13:17.499537376 +0100
|
||||
@@ -1073,6 +1073,8 @@
|
||||
$$ = exp_intop (0x6474e550);
|
||||
else if (strcmp (s, "PT_GNU_STACK") == 0)
|
||||
$$ = exp_intop (0x6474e551);
|
||||
+ else if (strcmp (s, "PT_PAX_FLAGS") == 0)
|
||||
+ $$ = exp_intop (0x65041580);
|
||||
else
|
||||
{
|
||||
einfo (_("\
|
||||
--- binutils-2.26/ld/lexsup.c.orig 2015-11-13 09:27:42.000000000 +0100
|
||||
+++ binutils-2.26/ld/lexsup.c 2016-01-26 21:08:41.787138458 +0100
|
||||
@@ -1793,8 +1793,12 @@
|
||||
fprintf (file, _("\
|
||||
-z muldefs Allow multiple definitions\n"));
|
||||
fprintf (file, _("\
|
||||
+ -z execheap Mark executable as requiring executable heap\n"));
|
||||
+ fprintf (file, _("\
|
||||
-z execstack Mark executable as requiring executable stack\n"));
|
||||
fprintf (file, _("\
|
||||
+ -z noexecheap Mark executable as not requiring executable heap\n"));
|
||||
+ fprintf (file, _("\
|
||||
-z noexecstack Mark executable as not requiring executable stack\n"));
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "patchelf-0.8";
|
||||
name = "patchelf-0.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://nixos.org/releases/patchelf/${name}/${name}.tar.bz2";
|
||||
sha256 = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7";
|
||||
sha256 = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83";
|
||||
};
|
||||
|
||||
setupHook = [ ./setup-hook.sh ];
|
||||
|
@ -69,6 +69,7 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ jcumming ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ] ;
|
||||
broken = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -2,21 +2,26 @@
|
||||
|
||||
# !!! assert freetype == xorg.freetype
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "zoom-1.1.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.logicalshift.co.uk/unix/zoom/zoom-1.1.5.tar.gz;
|
||||
url = "http://www.logicalshift.co.uk/unix/zoom/${name}.tar.gz";
|
||||
sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj";
|
||||
};
|
||||
|
||||
buildInputs = [ perl expat xlibsWrapper freetype ];
|
||||
|
||||
# Zoom doesn't add the right directory in the include path.
|
||||
CFLAGS = [ "-I" (freetype + "/include/freetype2") ];
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
# Zoom doesn't add the right directory in the include path.
|
||||
"-I" (freetype + "/include/freetype2")
|
||||
|
||||
# for gcc5; c11 inline semantics breaks the build
|
||||
"-fgnu89-inline"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Player for Z-Code, TADS and HUGO stories or games, usually text adventures ('interactive fiction')";
|
||||
description = "Player for Z-Code, TADS and HUGO stories or games";
|
||||
longDescription = ''
|
||||
Zoom is a player for Z-Code, TADS and HUGO stories or games. These are
|
||||
usually text adventures ('interactive fiction'), and were first created
|
||||
|
@ -11,15 +11,6 @@ diff -rupN higan_v095-source.orig/GNUmakefile higan_v095-source/GNUmakefile
|
||||
objects := libco
|
||||
|
||||
# profile-guided optimization mode
|
||||
@@ -43,7 +44,7 @@ ifeq ($(platform),windows)
|
||||
else ifeq ($(platform),macosx)
|
||||
flags += -march=native
|
||||
else ifeq ($(platform),linux)
|
||||
- flags += -march=native -fopenmp
|
||||
+ flags += -fopenmp
|
||||
link += -fopenmp
|
||||
link += -Wl,-export-dynamic
|
||||
link += -lX11 -lXext -ldl
|
||||
diff -rupN higan_v095-source.orig/icarus/GNUmakefile higan_v095-source/icarus/GNUmakefile
|
||||
--- higan_v095-source.orig/icarus/GNUmakefile 2015-11-04 10:28:26.186486119 +0100
|
||||
+++ higan_v095-source/icarus/GNUmakefile 2015-11-04 10:28:48.755059317 +0100
|
||||
|
@ -2,17 +2,17 @@
|
||||
|
||||
let
|
||||
|
||||
rev = "fe4a83540ec73dfc298f16f027277355470ea9a0";
|
||||
rev = "f4b20d47d7df7927967fcd524324b145cfc9e2f9";
|
||||
|
||||
in import ./generic.nix (args // rec {
|
||||
version = "3.18.y-${rev}";
|
||||
version = "4.1.y-${rev}";
|
||||
|
||||
modDirVersion = "3.18.7";
|
||||
modDirVersion = "4.1.20-v7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://api.github.com/repos/raspberrypi/linux/tarball/${rev}";
|
||||
name = "linux-raspberrypi-${version}.tar.gz";
|
||||
sha256 = "05gq40f038hxjqd3sdb1914g2bzw533dyxy59sgdpybs8801x2vb";
|
||||
sha256 = "0x17hlbi7lpmmnp24dnkync5gzj57j84j0nlrcv1lv9fahjkqsm2";
|
||||
};
|
||||
|
||||
features.iwlwifi = true;
|
||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation {
|
||||
|
||||
# Note: we don't add elfutils to buildInputs, since it provides a
|
||||
# bad `ld' and other stuff.
|
||||
NIX_CFLAGS_COMPILE = "-I${elfutils}/include -Wno-error=cpp";
|
||||
NIX_CFLAGS_COMPILE = "-I${elfutils}/include -Wno-error=cpp -Wno-error=bool-compare";
|
||||
NIX_CFLAGS_LINK = "-L${elfutils}/lib";
|
||||
|
||||
installFlags = "install install-man ASCIIDOC8=1";
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "kexec-tools-${version}";
|
||||
version = "2.0.11";
|
||||
version = "2.0.12";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://kernel/linux/utils/kernel/kexec/${name}.tar.xz"
|
||||
"http://horms.net/projects/kexec/kexec-tools/${name}.tar.xz"
|
||||
];
|
||||
sha256 = "1qrfka9xvy77k0rg3k0cf7xai0f9vpgsbs4l3bs8r4nvzy37j2di";
|
||||
sha256 = "03cj7w2l5fqn72xfhl4q6z0zbziwkp9bfn0gs7gaf9i44jv6gkhl";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
|
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
||||
openssl zlib python gyp go readline
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
|
||||
|
||||
configureFlagsArray = [ "--with-openssl-lib=${openssl}/lib" ];
|
||||
|
||||
patchPhase = ''
|
||||
|
@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
# fails to find lex_token.h sometimes
|
||||
enableParallelBuilding = true;
|
||||
enableParallelBuilding = false;
|
||||
|
||||
outputs = [ "out" "lib" ];
|
||||
|
||||
|
@ -25,7 +25,8 @@ in rec {
|
||||
allPackages = import ../../..;
|
||||
|
||||
commonPreHook = ''
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
||||
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.7
|
||||
@ -55,8 +56,7 @@ in rec {
|
||||
stageFun = step: last: {shell ? "${bootstrapTools}/bin/sh",
|
||||
overrides ? (pkgs: {}),
|
||||
extraPreHook ? "",
|
||||
extraBuildInputs ? with last.pkgs; [ xz darwin.CF libcxx ],
|
||||
extraInitialPath ? [],
|
||||
extraBuildInputs,
|
||||
allowedRequisites ? null}:
|
||||
let
|
||||
thisStdenv = import ../generic {
|
||||
@ -85,7 +85,7 @@ in rec {
|
||||
${commonPreHook}
|
||||
${extraPreHook}
|
||||
'';
|
||||
initialPath = extraInitialPath ++ [ bootstrapTools ];
|
||||
initialPath = [ bootstrapTools ];
|
||||
fetchurlBoot = import ../../build-support/fetchurl {
|
||||
stdenv = stage0.stdenv;
|
||||
curl = bootstrapTools;
|
||||
@ -174,6 +174,8 @@ in rec {
|
||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||
'';
|
||||
|
||||
extraBuildInputs = with pkgs; [ xz darwin.CF libcxx ];
|
||||
|
||||
allowedRequisites =
|
||||
[ bootstrapTools ] ++
|
||||
(with pkgs; [ xz libcxx libcxxabi icu ]) ++
|
||||
@ -203,9 +205,10 @@ in rec {
|
||||
# enables patchShebangs above. Unfortunately, patchShebangs ignores our $SHELL setting
|
||||
# and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and
|
||||
# patches our shebangs back to point at bootstrapTools. This makes sure bash comes first.
|
||||
extraInitialPath = [ pkgs.bash ];
|
||||
extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
|
||||
|
||||
extraPreHook = ''
|
||||
export PATH=${pkgs.bash}/bin:$PATH
|
||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||
'';
|
||||
|
||||
@ -236,7 +239,7 @@ in rec {
|
||||
|
||||
stage4 = with stage3; stageFun 4 stage3 {
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
extraInitialPath = [ pkgs.bash ];
|
||||
extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
|
||||
extraPreHook = ''
|
||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||
'';
|
||||
|
@ -214,7 +214,6 @@ PATH=
|
||||
for i in $initialPath; do
|
||||
if [ "$i" = / ]; then i=; fi
|
||||
addToSearchPath PATH $i/bin
|
||||
addToSearchPath PATH $i/sbin
|
||||
done
|
||||
|
||||
if [ "$NIX_DEBUG" = 1 ]; then
|
||||
@ -262,6 +261,10 @@ findInputs() {
|
||||
source "$pkg"
|
||||
fi
|
||||
|
||||
if [ -d $1/bin ]; then
|
||||
addToSearchPath _PATH $1/bin
|
||||
fi
|
||||
|
||||
if [ -f "$pkg/nix-support/setup-hook" ]; then
|
||||
source "$pkg/nix-support/setup-hook"
|
||||
fi
|
||||
@ -289,10 +292,6 @@ done
|
||||
_addToNativeEnv() {
|
||||
local pkg=$1
|
||||
|
||||
if [ -d $1/bin ]; then
|
||||
addToSearchPath _PATH $1/bin
|
||||
fi
|
||||
|
||||
# Run the package-specific hooks set by the setup-hook scripts.
|
||||
runHook envHook "$pkg"
|
||||
}
|
||||
@ -304,13 +303,6 @@ done
|
||||
_addToCrossEnv() {
|
||||
local pkg=$1
|
||||
|
||||
# Some programs put important build scripts (freetype-config and similar)
|
||||
# into their crossDrv bin path. Intentionally these should go after
|
||||
# the nativePkgs in PATH.
|
||||
if [ -d $1/bin ]; then
|
||||
addToSearchPath _PATH $1/bin
|
||||
fi
|
||||
|
||||
# Run the package-specific hooks set by the setup-hook scripts.
|
||||
runHook crossEnvHook "$pkg"
|
||||
}
|
||||
|
@ -8,24 +8,22 @@
|
||||
{ system ? builtins.currentSystem
|
||||
, allPackages ? import ../../..
|
||||
, platform ? null, config ? {}, lib ? (import ../../../lib)
|
||||
, customBootstrapFiles ? null }:
|
||||
|
||||
rec {
|
||||
|
||||
bootstrapFiles =
|
||||
if customBootstrapFiles != null then customBootstrapFiles
|
||||
else if system == "i686-linux" then import ./bootstrap/i686.nix
|
||||
, bootstrapFiles ?
|
||||
if system == "i686-linux" then import ./bootstrap/i686.nix
|
||||
else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix
|
||||
else if system == "armv5tel-linux" then import ./bootstrap/armv5tel.nix
|
||||
else if system == "armv6l-linux" then import ./bootstrap/armv6l.nix
|
||||
else if system == "armv7l-linux" then import ./bootstrap/armv7l.nix
|
||||
else if system == "mips64el-linux" then import ./bootstrap/loongson2f.nix
|
||||
else abort "unsupported platform for the pure Linux stdenv";
|
||||
else abort "unsupported platform for the pure Linux stdenv"
|
||||
}:
|
||||
|
||||
rec {
|
||||
|
||||
commonPreHook =
|
||||
''
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
||||
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
|
||||
${if system == "x86_64-linux" then "NIX_LIB64_IN_SELF_RPATH=1" else ""}
|
||||
${if system == "mips64el-linux" then "NIX_LIB32_IN_SELF_RPATH=1" else ""}
|
||||
'';
|
||||
@ -190,7 +188,7 @@ rec {
|
||||
name = "bootstrap-gcc-wrapper";
|
||||
|
||||
overrides = pkgs: {
|
||||
inherit (stage1.pkgs) perl binutils paxctl;
|
||||
inherit (stage1.pkgs) perl binutils paxctl gnum4 bison;
|
||||
# This also contains the full, dynamically linked, final Glibc.
|
||||
};
|
||||
};
|
||||
@ -207,21 +205,16 @@ rec {
|
||||
name = "bootstrap-gcc-wrapper";
|
||||
|
||||
overrides = pkgs: rec {
|
||||
inherit (stage2.pkgs) binutils glibc perl patchelf linuxHeaders;
|
||||
inherit (stage2.pkgs) binutils glibc perl patchelf linuxHeaders gnum4 bison;
|
||||
# Link GCC statically against GMP etc. This makes sense because
|
||||
# these builds of the libraries are only used by GCC, so it
|
||||
# reduces the size of the stdenv closure.
|
||||
gmp = pkgs.gmp.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
mpfr = pkgs.mpfr.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
libmpc = pkgs.libmpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
isl_0_11 = pkgs.isl_0_11.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
cloog_0_18_0 = pkgs.cloog_0_18_0.override {
|
||||
stdenv = pkgs.makeStaticLibraries pkgs.stdenv;
|
||||
isl = isl_0_11;
|
||||
};
|
||||
isl_0_14 = pkgs.isl_0_14.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
gccPlain = pkgs.gcc.cc.override {
|
||||
isl = isl_0_11;
|
||||
cloog = cloog_0_18_0;
|
||||
isl = isl_0_14;
|
||||
};
|
||||
};
|
||||
extraBuildInputs = [ stage2.pkgs.patchelf stage2.pkgs.paxctl ];
|
||||
@ -241,7 +234,7 @@ rec {
|
||||
# because gcc (since JAR support) already depends on zlib, and
|
||||
# then if we already have a zlib we want to use that for the
|
||||
# other purposes (binutils and top-level pkgs) too.
|
||||
inherit (stage3.pkgs) gettext gnum4 gmp perl glibc zlib linuxHeaders;
|
||||
inherit (stage3.pkgs) gettext gnum4 bison gmp perl glibc zlib linuxHeaders;
|
||||
|
||||
gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
||||
nativeTools = false;
|
||||
@ -310,51 +303,4 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
testBootstrapTools = let
|
||||
defaultPkgs = allPackages { inherit system platform; };
|
||||
in derivation {
|
||||
name = "test-bootstrap-tools";
|
||||
inherit system;
|
||||
builder = bootstrapFiles.busybox;
|
||||
args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ];
|
||||
|
||||
buildCommand = ''
|
||||
export PATH=${bootstrapTools}/bin
|
||||
|
||||
ls -l
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
sed --version
|
||||
find --version
|
||||
diff --version
|
||||
patch --version
|
||||
make --version
|
||||
awk --version
|
||||
grep --version
|
||||
gcc --version
|
||||
|
||||
ldlinux=$(echo ${bootstrapTools}/lib/ld-linux*.so.?)
|
||||
export CPP="cpp -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools}"
|
||||
export CC="gcc -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
|
||||
export CXX="g++ -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
|
||||
|
||||
echo '#include <stdio.h>' >> foo.c
|
||||
echo '#include <limits.h>' >> foo.c
|
||||
echo 'int main() { printf("Hello World\\n"); return 0; }' >> foo.c
|
||||
$CC -o $out/bin/foo foo.c
|
||||
$out/bin/foo
|
||||
|
||||
echo '#include <iostream>' >> bar.cc
|
||||
echo 'int main() { std::cout << "Hello World\\n"; }' >> bar.cc
|
||||
$CXX -v -o $out/bin/bar bar.cc
|
||||
$out/bin/bar
|
||||
|
||||
tar xvf ${defaultPkgs.hello.src}
|
||||
cd hello-*
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -164,12 +164,57 @@ rec {
|
||||
'';
|
||||
};
|
||||
|
||||
test = ((import ./default.nix) {
|
||||
inherit system;
|
||||
bootstrapFiles = {
|
||||
busybox = "${build}/on-server/busybox";
|
||||
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
|
||||
};
|
||||
|
||||
customBootstrapFiles = {
|
||||
busybox = "${build}/on-server/busybox";
|
||||
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
|
||||
};
|
||||
}).testBootstrapTools;
|
||||
bootstrapTools = (import ./default.nix {
|
||||
inherit system bootstrapFiles;
|
||||
}).bootstrapTools;
|
||||
|
||||
test = derivation {
|
||||
name = "test-bootstrap-tools";
|
||||
inherit system;
|
||||
builder = bootstrapFiles.busybox;
|
||||
args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ];
|
||||
|
||||
buildCommand = ''
|
||||
export PATH=${bootstrapTools}/bin
|
||||
|
||||
ls -l
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
sed --version
|
||||
find --version
|
||||
diff --version
|
||||
patch --version
|
||||
make --version
|
||||
awk --version
|
||||
grep --version
|
||||
gcc --version
|
||||
|
||||
ldlinux=$(echo ${bootstrapTools}/lib/ld-linux*.so.?)
|
||||
export CPP="cpp -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools}"
|
||||
export CC="gcc -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
|
||||
export CXX="g++ -idirafter ${bootstrapTools}/include-glibc -B${bootstrapTools} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${bootstrapTools}/lib"
|
||||
|
||||
echo '#include <stdio.h>' >> foo.c
|
||||
echo '#include <limits.h>' >> foo.c
|
||||
echo 'int main() { printf("Hello World\\n"); return 0; }' >> foo.c
|
||||
$CC -o $out/bin/foo foo.c
|
||||
$out/bin/foo
|
||||
|
||||
echo '#include <iostream>' >> bar.cc
|
||||
echo 'int main() { std::cout << "Hello World\\n"; }' >> bar.cc
|
||||
$CXX -v -o $out/bin/bar bar.cc
|
||||
$out/bin/bar
|
||||
|
||||
tar xvf ${hello.src}
|
||||
cd hello-*
|
||||
./configure --prefix=$out
|
||||
make
|
||||
make install
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
||||
if [ -z "${i##*/liblto*}" ]; then continue; fi
|
||||
echo patching "$i"
|
||||
LD_LIBRARY_PATH=$out/lib $LD_BINARY \
|
||||
$out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath "$i"
|
||||
./patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath "$i"
|
||||
done
|
||||
|
||||
for i in $out/lib/librt-*.so $out/lib/libpcre*; do
|
||||
|
@ -16,6 +16,7 @@ rec {
|
||||
# Disable purity tests; it's allowed (even needed) to link to
|
||||
# libraries outside the Nix store (like the C library).
|
||||
export NIX_ENFORCE_PURITY=
|
||||
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
|
||||
'';
|
||||
|
||||
prehookFreeBSD = ''
|
||||
|
@ -5,7 +5,8 @@ import ../generic rec {
|
||||
|
||||
preHook =
|
||||
''
|
||||
export NIX_ENFORCE_PURITY=1
|
||||
export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}"
|
||||
export NIX_ENFORCE_NO_NATIVE="''${NIX_ENFORCE_NO_NATIVE-1}"
|
||||
export NIX_IGNORE_LD_THROUGH_GCC=1
|
||||
'';
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
{stdenv, fetchgit, libuuid, lzo, zlib, acl}:
|
||||
{ stdenv, fetchurl, libuuid, lzo, zlib, acl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mtd-utils-${version}";
|
||||
version = "1.5.1";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchgit {
|
||||
url = git://git.infradead.org/mtd-utils.git;
|
||||
rev = "refs/tags/v" + version;
|
||||
sha256 = "1bjx42pwl789ara63c672chvgvmqhkj4y132gajqih6naq71f8g7";
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.5.2.tar.bz2;
|
||||
sha256 = "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
|
@ -10,9 +10,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ ncurses readline ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-std=gnu90";
|
||||
|
||||
preConfigure = ''
|
||||
sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c
|
||||
sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c
|
||||
sed -e '27i#include <string.h>' -i include/udf_endian.h
|
||||
sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c
|
||||
sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c
|
||||
sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
touch lib/standardppmdfont.c
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
enableParallelBuilding = false;
|
||||
|
||||
installPhase = ''
|
||||
make package pkgdir=$out
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Naur findutils-4.2.30/xargs/xargs.c findutils-4.2.30_new/xargs/xargs.c
|
||||
--- findutils-4.2.30/xargs/xargs.c 2007-02-27 11:21:08.000000000 +0100
|
||||
+++ findutils-4.2.30_new/xargs/xargs.c 2007-07-17 19:02:05.000000000 +0200
|
||||
@@ -402,7 +402,7 @@
|
||||
int show_limits = 0; /* --show-limits */
|
||||
int always_run_command = 1;
|
||||
char *input_file = "-"; /* "-" is stdin */
|
||||
- char *default_cmd = "/bin/echo";
|
||||
+ char *default_cmd = "echo";
|
||||
int (*read_args) PARAMS ((void)) = read_line;
|
||||
void (*act_on_init_result)(void) = noop;
|
||||
int env_too_big = 0;
|
@ -1,27 +1,23 @@
|
||||
{stdenv, fetchurl, coreutils}:
|
||||
{ stdenv, fetchurl, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "findutils-4.4.2";
|
||||
name = "findutils-4.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/findutils/${name}.tar.gz";
|
||||
sha256 = "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3";
|
||||
sha256 = "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [coreutils];
|
||||
nativeBuildInputs = [ coreutils ];
|
||||
|
||||
patches = [ ./findutils-path.patch ./change_echo_path.patch ./disable-test-canonicalize.patch ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
crossAttrs = {
|
||||
# http://osdir.com/ml/bug-findutils-gnu/2009-08/msg00026.html
|
||||
configureFlags = [ "gl_cv_func_wcwidth_works=yes" ];
|
||||
};
|
||||
|
||||
preConfigure = if stdenv.isCygwin then ''
|
||||
sed -i gnulib/lib/fpending.h -e '/include <stdio_ext.h>/d'
|
||||
'' else null;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/findutils/;
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ruN findutils-4.4.2/tests/test-canonicalize.sh findutils-4.4.2_edited/tests/test-canonicalize.sh
|
||||
--- findutils-4.4.2/tests/test-canonicalize.sh 2008-12-23 12:50:15.000000000 +0000
|
||||
+++ findutils-4.4.2_edited/tests/test-canonicalize.sh 2015-06-14 10:51:19.000000000 +0000
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
+# skipped because user might not have directory listing permission for all parents of TMPDIR
|
||||
+exit 77
|
||||
+
|
||||
tmpfiles=""
|
||||
trap 'rm -fr $tmpfiles' 1 2 3 15
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ruN findutils-4.2.20/locate/updatedb.sh findutils-4.2.20.new/locate/updatedb.sh
|
||||
--- findutils-4.2.20/locate/updatedb.sh 2005-01-24 17:12:35.000000000 +0100
|
||||
+++ findutils-4.2.20.new/locate/updatedb.sh 2005-08-23 14:37:10.000000000 +0200
|
||||
@@ -141,7 +141,7 @@
|
||||
: ${code:=${LIBEXECDIR}/@code@}
|
||||
|
||||
|
||||
-PATH=/bin:/usr/bin:${BINDIR}; export PATH
|
||||
+PATH=/bin:/usr/bin:${BINDIR}:${PATH}; export PATH
|
||||
|
||||
: ${PRUNEFS="nfs NFS proc afs proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"}
|
||||
|
@ -18,6 +18,8 @@ stdenv.mkDerivation {
|
||||
|
||||
preConfigure = "cd src";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
makeFlags =
|
||||
[ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
|
||||
"ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin"
|
||||
|
@ -13,10 +13,18 @@ stdenv.mkDerivation rec {
|
||||
"--enable-icon-browser"
|
||||
];
|
||||
|
||||
# for gcc5: c11 inline semantics breaks the build
|
||||
NIX_CFLAGS_COMPILE = "-fgnu89-inline";
|
||||
|
||||
buildInputs = [ gtk2 ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig intltool ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i src/file.c -e '21i#include <glib/gprintf.h>'
|
||||
sed -i src/form.c -e '21i#include <stdlib.h>'
|
||||
'';
|
||||
|
||||
preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
|
||||
|
||||
meta = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, readline, tcp_wrappers, pcre, makeWrapper }:
|
||||
{ lib, stdenv, fetchurl, readline, tcp_wrappers, pcre, makeWrapper, gcc }:
|
||||
assert stdenv.isLinux;
|
||||
assert stdenv.cc.isGNU;
|
||||
let
|
||||
@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
||||
url = "mirror://debian/pool/main/a/atftp/atftp_${version}.dfsg.orig.tar.gz";
|
||||
sha256 = "0nd5dl14d6z5abgcbxcn41rfn3syza6s57bbgh4aq3r9cxdmz08q";
|
||||
};
|
||||
buildInputs = [ readline tcp_wrappers pcre makeWrapper ];
|
||||
buildInputs = [ readline tcp_wrappers pcre makeWrapper gcc ];
|
||||
patches = [ debianPatch ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, openssl }:
|
||||
{ stdenv, fetchurl, fetchpatch, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cadaver-0.23.3";
|
||||
@ -8,11 +8,20 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1jizq69ifrjbjvz5y79wh1ny94gsdby4gdxwjad4bfih6a5fck7x";
|
||||
};
|
||||
|
||||
buildInputs = [openssl];
|
||||
configureFlags = ["--with-ssl"];
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = https://projects.archlinux.org/svntogit/community.git/plain/trunk/disable-sslv2.patch?h=packages/cadaver;
|
||||
name = "disable-sslv2.patch";
|
||||
sha256 = "1qx65hv584wdarks51yhd3y38g54affkphm5wz27xiz4nhmbssrr";
|
||||
})
|
||||
];
|
||||
|
||||
configureFlags = "--with-ssl";
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A command-line WebDAV client for Unix";
|
||||
description = "A command-line WebDAV client";
|
||||
homepage = http://www.webdav.org/cadaver;
|
||||
maintainers = with maintainers; [ ianwookim ];
|
||||
license = licenses.gpl2;
|
||||
|
@ -74,5 +74,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = "http://curl.haxx.se/";
|
||||
description = "A command line tool for transferring files with URL syntax";
|
||||
platforms = with stdenv.lib.platforms; allBut darwin;
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
From b34a33255f56bbd2317c26da12d702796d67ed50 Mon Sep 17 00:00:00 2001
|
||||
From: Geo Van Osterom <george.vo@alum.rpi.edu>
|
||||
Date: Thu, 22 Oct 2015 00:12:42 -0400
|
||||
Subject: [PATCH] Fix gcc 5 compile errors
|
||||
|
||||
---
|
||||
src/net.c | 2 +-
|
||||
src/tclhash.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/net.c b/src/net.c
|
||||
index a1937de..c369fda 100644
|
||||
--- a/src/net.c
|
||||
+++ b/src/net.c
|
||||
@@ -560,7 +560,7 @@ int open_address_listen(sockname_t *addr)
|
||||
/* Returns a socket number for a listening socket that will accept any
|
||||
* connection -- port # is returned in port
|
||||
*/
|
||||
-inline int open_listen(int *port)
|
||||
+extern inline int open_listen(int *port)
|
||||
{
|
||||
int sock;
|
||||
sockname_t name;
|
||||
diff --git a/src/tclhash.c b/src/tclhash.c
|
||||
index 9729acb..22c3d05 100644
|
||||
--- a/src/tclhash.c
|
||||
+++ b/src/tclhash.c
|
||||
@@ -113,7 +113,7 @@ static inline void tcl_bind_list_delete(tcl_bind_list_t *tl)
|
||||
nfree(tl);
|
||||
}
|
||||
|
||||
-inline void garbage_collect_tclhash(void)
|
||||
+extern inline void garbage_collect_tclhash(void)
|
||||
{
|
||||
tcl_bind_list_t *tl, *tl_next, *tl_prev;
|
||||
tcl_bind_mask_t *tm, *tm_next, *tm_prev;
|
@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ tcl ];
|
||||
|
||||
patches = [
|
||||
# https://github.com/eggheads/eggdrop/issues/123
|
||||
./b34a33255f56bbd2317c26da12d702796d67ed50.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
prefix=$out/eggdrop
|
||||
mkdir -p $prefix
|
||||
|
@ -13,11 +13,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace {.,pfcquirks}/CMakeLists.txt \
|
||||
--replace "-march=native" ""
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false;
|
||||
|
@ -13,12 +13,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ pkgconfig autoconf automake openssl libgsf gmp ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace Makefile.in \
|
||||
--replace '-march=native' "" \
|
||||
--replace '-mtune=native' ""
|
||||
'';
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user