diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh index 3c3dbc03d41..673d9ec494c 100644 --- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh +++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh @@ -46,9 +46,9 @@ while [ $n -lt ${#params[*]} ]; do isCpp=1 elif [ "$p" = -nostdlib ]; then isCpp=-1 - elif [ "${i:0:1}" != - ]; then + elif [ "${p:0:1}" != - ]; then nonFlagArgs=1 - elif [ "$i" = -m32 ]; then + elif [ "$p" = -m32 ]; then if [ -e @out@/nix-support/dynamic-linker-m32 ]; then NIX_LDFLAGS="$NIX_LDFLAGS -dynamic-linker $(cat @out@/nix-support/dynamic-linker-m32)" fi diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 53e64fe8abc..3b105143c0b 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -495,8 +495,6 @@ 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+ diff --git a/pkgs/development/compilers/gcc/5/use-old-abi.sh b/pkgs/development/compilers/gcc/5/use-old-abi.sh deleted file mode 100644 index 3a0c996033a..00000000000 --- a/pkgs/development/compilers/gcc/5/use-old-abi.sh +++ /dev/null @@ -1 +0,0 @@ -NIX_CFLAGS_COMPILE+=" -D_GLIBCXX_USE_CXX11_ABI=0" diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index e6927ffb9ca..ffa0a95be2c 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -3,8 +3,8 @@ , xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi , xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilwm, libxkbcommon -, fontconfig, freetype, openssl, dbus, glib, udev, libxml2, libxslt, pcre -, zlib, libjpeg, libpng, libtiff, sqlite, icu +, fontconfig, freetype, openssl, dbus, glib, udev, libxml2, libxslt, pcre16 +, zlib, libjpeg, libpng, libtiff, sqlite, icu, harfbuzz , coreutils, bison, flex, gdb, gperf, lndir, ruby , python, perl, pkgconfig @@ -164,8 +164,10 @@ stdenv.mkDerivation { -system-zlib -system-libpng -system-libjpeg + -system-harfbuzz -system-xcb -system-xkbcommon + -system-pcre -openssl-linked -dbus-linked @@ -186,8 +188,8 @@ stdenv.mkDerivation { propagatedBuildInputs = [ xlibs.libXcomposite libX11 libxcb libXext libXrender libXi - fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre - zlib libjpeg libpng libtiff sqlite icu + fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre16 + zlib libjpeg libpng libtiff sqlite icu harfbuzz xcbutil xcbutilimage xcbutilkeysyms xcbutilwm libxkbcommon ] # Qt doesn't directly need GLU (just GL), but many apps use, it's small and diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch index 470526b1dcd..d20767a38e5 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch @@ -2,10 +2,11 @@ Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplica =================================================================== --- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/kernel/qcoreapplication.cpp +++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp -@@ -2498,6 +2498,21 @@ QStringList QCoreApplication::libraryPat +@@ -2498,6 +2498,22 @@ QStringList QCoreApplication::libraryPat } } } ++ qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes + + // Add library paths derived from NIX_PROFILES. + const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES"); diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch deleted file mode 100644 index 8e86f97a947..00000000000 --- a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3f6fa74067aacd0e595e45b4ef7ce754514cb205 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sat, 17 Oct 2015 09:28:18 -0500 -Subject: [PATCH] nix profiles import paths - ---- - src/qml/qml/qqmlimport.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp -index 5a54609..f33c2f9 100644 ---- a/src/qml/qml/qqmlimport.cpp -+++ b/src/qml/qml/qqmlimport.cpp -@@ -1549,6 +1549,20 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); - addImportPath(installImportsPath); - -+ // Add import paths derived from NIX_PROFILES. -+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES"); -+ if (!nixProfilesEnv.isEmpty()) { -+ QLatin1Char pathSep(' '); -+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts); -+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { -+ it->append("/lib/qt5/qml"); -+ QString canonicalPath = QDir(*it).canonicalPath(); -+ if (!canonicalPath.isEmpty()) { -+ addImportPath(canonicalPath); -+ } -+ } -+ } -+ - // env import paths - QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); - if (!envImportPath.isEmpty()) { --- -2.5.2 - diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix index 9181c37b225..328d8aee72b 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix @@ -1,8 +1,8 @@ -{ qtSubmodule, python, qtbase, qtsvg, qtxmlpatterns }: +{ qtSubmodule, lib, copyPathsToStore, python, qtbase, qtsvg, qtxmlpatterns }: qtSubmodule { name = "qtdeclarative"; - patches = [ ./0001-nix-profiles-import-paths.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); qtInputs = [ qtbase qtsvg qtxmlpatterns ]; nativeBuildInputs = [ python ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series new file mode 100644 index 00000000000..7dbe197c56e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series @@ -0,0 +1 @@ +nix-profiles-import-paths.patch diff --git a/pkgs/development/libraries/qt-5/5.5/qtquick1/0001-nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtquick1/0001-nix-profiles-import-paths.patch deleted file mode 100644 index 63b141f6ce5..00000000000 --- a/pkgs/development/libraries/qt-5/5.5/qtquick1/0001-nix-profiles-import-paths.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bbc706b3fcb90ca3b2b51d5e3434145572152711 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sat, 17 Oct 2015 09:29:51 -0500 -Subject: [PATCH] nix profiles import paths - ---- - src/declarative/qml/qdeclarativeimport.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp -index 9404834..d185ed5 100644 ---- a/src/declarative/qml/qdeclarativeimport.cpp -+++ b/src/declarative/qml/qdeclarativeimport.cpp -@@ -725,6 +725,20 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) - - addImportPath(installImportsPath); - -+ // Add import paths derived from NIX_PROFILES. -+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES"); -+ if (!nixProfilesEnv.isEmpty()) { -+ QLatin1Char pathSep(' '); -+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts); -+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { -+ it->append("/lib/qt5/imports"); -+ QString canonicalPath = QDir(*it).canonicalPath(); -+ if (!canonicalPath.isEmpty()) { -+ addImportPath(canonicalPath); -+ } -+ } -+ } -+ - // env import paths - QByteArray envImportPath = qgetenv("QML_IMPORT_PATH"); - if (!envImportPath.isEmpty()) { --- -2.5.2 - diff --git a/pkgs/development/libraries/qt-5/5.5/qtquick1/default.nix b/pkgs/development/libraries/qt-5/5.5/qtquick1/default.nix index d1c7bb389a4..64937b3dcd3 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtquick1/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtquick1/default.nix @@ -1,7 +1,7 @@ -{ qtSubmodule, qtscript, qtsvg, qtwebkit, qtxmlpatterns }: +{ qtSubmodule, lib, copyPathsToStore, qtscript, qtsvg, qtwebkit, qtxmlpatterns }: qtSubmodule { name = "qtquick1"; - patches = [ ./0001-nix-profiles-import-paths.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); qtInputs = [ qtscript qtsvg qtwebkit qtxmlpatterns ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtquick1/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtquick1/nix-profiles-import-paths.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pkgs/development/libraries/qt-5/5.5/qtquick1/series b/pkgs/development/libraries/qt-5/5.5/qtquick1/series new file mode 100644 index 00000000000..7dbe197c56e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtquick1/series @@ -0,0 +1 @@ +nix-profiles-import-paths.patch diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 89dd269b8cc..9bcb87dd789 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -35,6 +35,9 @@ stdenv.mkDerivation rec { # Bug fix backported from binutils master. ./fix-bsymbolic.patch + + # Bug fix backported from binutils master. + ./fix-update-symbol-version.patch ]; outputs = [ "out" "info" ]; diff --git a/pkgs/development/tools/misc/binutils/fix-update-symbol-version.patch b/pkgs/development/tools/misc/binutils/fix-update-symbol-version.patch new file mode 100644 index 00000000000..ca7dcf969f3 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/fix-update-symbol-version.patch @@ -0,0 +1,106 @@ +NOTE: removed Changelog diffs to avoid the patch failing to apply + +From 544ddf9322b1b83982e5cb84a54d084ee7e718ea Mon Sep 17 00:00:00 2001 +From: H.J. Lu +Date: Wed, 24 Feb 2016 15:13:35 -0800 +Subject: [PATCH] Update symbol version for symbol from linker script + +We need to update symbol version for symbols from linker script. + +Backport from master + +bfd/ + + PR ld/19698 + * elflink.c (bfd_elf_record_link_assignment): Set versioned if + symbol version is unknown. + +ld/ + + PR ld/19698 + * testsuite/ld-elf/pr19698.d: New file. + * testsuite/ld-elf/pr19698.s: Likewise. + * testsuite/ld-elf/pr19698.t: Likewise. +--- + bfd/ChangeLog | 9 +++++++++ + bfd/elflink.c | 13 +++++++++++++ + ld/ChangeLog | 10 ++++++++++ + ld/testsuite/ld-elf/pr19698.d | 10 ++++++++++ + ld/testsuite/ld-elf/pr19698.s | 5 +++++ + ld/testsuite/ld-elf/pr19698.t | 11 +++++++++++ + 6 files changed, 58 insertions(+), 0 deletions(-) + create mode 100644 ld/testsuite/ld-elf/pr19698.d + create mode 100644 ld/testsuite/ld-elf/pr19698.s + create mode 100644 ld/testsuite/ld-elf/pr19698.t + +diff --git a/bfd/elflink.c b/bfd/elflink.c +index ae8d148..8fcaadd 100644 +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd, + if (h == NULL) + return provide; + ++ if (h->versioned == unknown) ++ { ++ /* Set versioned if symbol version is unknown. */ ++ char *version = strrchr (name, ELF_VER_CHR); ++ if (version) ++ { ++ if (version > name && version[-1] != ELF_VER_CHR) ++ h->versioned = versioned_hidden; ++ else ++ h->versioned = versioned; ++ } ++ } ++ + switch (h->root.type) + { + case bfd_link_hash_defined: +diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d +new file mode 100644 +index 0000000..a39f67a +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.d +@@ -0,0 +1,10 @@ ++#ld: -shared $srcdir/$subdir/pr19698.t ++#readelf : --dyn-syms --wide ++#target: *-*-linux* *-*-gnu* *-*-solaris* ++ ++Symbol table '\.dynsym' contains [0-9]+ entries: ++#... ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1 ++#... ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2 ++#pass +diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s +new file mode 100644 +index 0000000..875dca4 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.s +@@ -0,0 +1,5 @@ ++ .text ++ .globl foo ++ .type foo, %function ++foo: ++ .byte 0 +diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t +new file mode 100644 +index 0000000..09d9125 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.t +@@ -0,0 +1,11 @@ ++"foo@VERS.1" = foo; ++ ++VERSION { ++VERS.2 { ++ global: ++ foo; ++}; ++ ++VERS.1 { ++}; ++} +-- +1.7.1 + diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 97eb855d359..cca4648d237 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -649,14 +649,14 @@ configurePhase() { # Add --disable-dependency-tracking to speed up some builds. if [ -z "$dontAddDisableDepTrack" ]; then - if grep -q dependency-tracking "$configureScript"; then + if [ -f "$configureScript" ] && grep -q dependency-tracking "$configureScript"; then configureFlags="--disable-dependency-tracking $configureFlags" fi fi # By default, disable static builds. if [ -z "$dontDisableStatic" ]; then - if grep -q enable-static "$configureScript"; then + if [ -f "$configureScript" ] && grep -q enable-static "$configureScript"; then configureFlags="--disable-static $configureFlags" fi fi