aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/clang-3.5-libc-search-path.patch
blob: 50e4480239953b15210c4d504bfde3cad68cfd5f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Clang attempts to guess file names based on the OS and distro (yes!),
but unfortunately, that doesn't work for us.

This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'.  It also disables all
the distro-specific stuff and removes the hard-coded FHS directory names
to make sure Clang also works on non-GuixSD systems.

--- cfe-3.6.0.src/lib/Driver/ToolChains.cpp	2015-02-18 22:03:07.000000000 +0100
+++ cfe-3.6.0.src/lib/Driver/ToolChains.cpp	2015-06-19 16:37:20.459701044 +0200
@@ -2931,6 +2931,9 @@ Linux::Linux(const Driver &D, const llvm
 
   Linker = GetLinkerPath();
 
+  // Comment out the distro-specific tweaks so that they don't bite when
+  // using Guix on a foreign distro.
+#if 0
   Distro Distro = DetectDistro(Arch);
 
   if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) {
@@ -2973,6 +2976,7 @@ Linux::Linux(const Driver &D, const llvm
 
   if (IsOpenSUSE(Distro))
     ExtraOpts.push_back("--enable-new-dtags");
+#endif
 
   // The selection of paths to try here is designed to match the patterns which
   // the GCC driver itself uses, as this is part of the GCC-compatible driver.
@@ -3043,14 +3047,12 @@ Linux::Linux(const Driver &D, const llvm
     addPathIfExists(D.Dir + "/../" + OSLibDir, Paths);
   }
 
-  addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
-  addPathIfExists(SysRoot + "/lib/../" + OSLibDir, Paths);
-  addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
-  addPathIfExists(SysRoot + "/usr/lib/../" + OSLibDir, Paths);
-
   // Try walking via the GCC triple path in case of biarch or multiarch GCC
   // installations with strange symlinks.
   if (GCCInstallation.isValid()) {
+    // The following code would end up adding things like
+    // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
+#if 0
     addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
                     "/../../" + OSLibDir, Paths);
 
@@ -3060,6 +3062,7 @@ Linux::Linux(const Driver &D, const llvm
       addPathIfExists(GCCInstallation.getInstallPath() +
                       BiarchSibling.gccSuffix(), Paths);
     }
+#endif
 
     // See comments above on the multilib variant for details of why this is
     // included even from outside the sysroot.
@@ -3083,8 +3086,9 @@ Linux::Linux(const Driver &D, const llvm
   if (StringRef(D.Dir).startswith(SysRoot))
     addPathIfExists(D.Dir + "/../lib", Paths);
 
-  addPathIfExists(SysRoot + "/lib", Paths);
-  addPathIfExists(SysRoot + "/usr/lib", Paths);
+  // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+  // and friends can be found.
+  addPathIfExists("@GLIBC_LIBDIR@", Paths);
 }
 
 bool Linux::HasNativeLLVMSupport() const {
td>Mathieu Othacehe 2020-08-20gnu: p11-kit: Update to 0.23.21....* gnu/packages/tls.scm (p11-kit): Update to 0.23.21. Tobias Geerinckx-Rice 2020-07-14gnu: mbedtls-apache-for-hiawatha: Fix....There's already a custom embedtls-apache variant for Hiawatha. Fix it instead of enabling threading for embedtls-apache. * gnu/packages/tls.scm (embedtls-for-hiawatha): Fix usage of SUBSTITUTE-KEYWORD-ARGUMENTS. Disable -Wformat-signedness. (embedtls-for-hiawatha): Remove ‘enable-features’ phase. Tobias Geerinckx-Rice 2020-07-14gnu: mbedtls-apache: Update to 2.23.0 [security fixes]....* gnu/packages/tls.scm (mbedtls-apache): Update to 2.23.0. [source]: Use GIT-FETCH and GIT-FILE-NAME. [arguments]: Make source files writable. Enable threading. Tobias Geerinckx-Rice 2020-06-20gnu: gnutls: Pass #:tests? unconditionally....* gnu/packages/tls.scm (gnutls)[arguments]: Add #:tests? unconditionally. Ludovic Courtès 2020-06-20gnu: gnutls: Leave #:disallowed-references empty for GNU/Hurd....Partly fixes <https://bugs.gnu.org/41775>. This is a followup to a9bcc6474667d6699500f03d69f9c8212a50d711. * gnu/packages/tls.scm (gnutls)[arguments]: Let #:disallowed-references empty when 'hurd-target?' returns true. Ludovic Courtès 2020-06-06gnu: GnuTLS: Update replacement to 3.6.14 [fixes CVE-2020-13777]....* gnu/packages/tls.scm (gnutls-3.6.13): Rename to ... (gnutls-3.6.14): ... this. Update to 3.6.14. (gnutls)[replacement]: Adjust accordingly. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Likewise. * gnu/packages/vpn.scm (openconnect)[propagated-inputs]: Likewise. Marius Bakke 2020-06-06gnu: openconnect: Add a comment about the gnutls version....* gnu/packages/vpn.scm (openconnect): Add said comment. * gnu/packages/tls.scm (gnutls): Add backlink to optimise SEO. Tobias Geerinckx-Rice 2020-05-27Revert some Go package updates....This reverts commit 5f833e0495f00a72f8d34a63e8afbc531afdd22d through 681ac9a66c26d2c739e41f03228f8c63fc0df482. It's not idiomatic to update Go packages independently of their users. This reversion was approved by Efraim on #guix: http://logs.guix.gnu.org/guix/2020-05-26.log * gnu/packages/golang.scm, gnu/packages/syncthing.scm, gnu/packages/tls.scm: Revert. Leo Famulari 2020-05-26gnu: go-github-com-certifi-gocertifi: Update to 2020.02.11....* gnu/packages/tls.scm (go-github-com-certifi-gocertifi): Update to 2020.02.11. Efraim Flashner 2020-05-13mailmap: Update entries for Nikita....* .mailmap: change email and name for Nikita. * Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish, gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/erlang.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile-xyz.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell-xyz.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp-xyz.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> nikita 2020-05-09gnu: mbedtls-apache: Update to 2.16.6....* gnu/packages/tls.scm (mbedtls-apache): Update to 2.16.6. Marius Bakke 2020-04-23Merge branch 'master' into core-updates... Conflicts: etc/news.scm gnu/local.mk gnu/packages/bootloaders.scm gnu/packages/linphone.scm gnu/packages/linux.scm gnu/packages/tls.scm gnu/system.scm Marius Bakke 2020-04-21gnu: OpenSSL: Update to 1.1.1g [fixes CVE-2020-1967]....* gnu/packages/tls.scm (openssl)[replacement]: Replace with openssl-1.1.1g. (openssl-1.1.1e): Replace variable with ... (openssl-1.1.1g): ... this. Leo Famulari 2020-04-20gnu: tls: Remove datefudge and disable tests on the Hurd....* gnu/packages/tls.scm (gnutls)[arguments]: When compiling for the Hurd, disable tests. [native-inputs]: When compiling for the Hurd, do not include datefudge. Jan (janneke) Nieuwenhuizen 2020-04-11gnu: gnutls-3.6.13: Cross-build fix....* gnu/packages/patches/gnutls-cross.patch: New file. * gnu/packages/tls.scm (gnutls-3.6.13)[source]: Use it. [native-inputs]: If cross-compiling, add native guile-3.0. This actually cross compiles .go modules. Jan (janneke) Nieuwenhuizen 2020-04-11gnu: openssl: Support cross-compilation to the Hurd....* gnu/packages/tls.scm (openssl)[arguments]: Add `i586' => hurd-x86 platform setting. Jan (janneke) Nieuwenhuizen 2020-04-11Merge branch 'master' into core-updatesMarius Bakke 2020-04-11gnu: openconnect: Update to 8.08....* gnu/packages/vpn.scm (openconnect): Update to 8.08. [propagated-inputs]: Use gnutls-3.6.13. * gnu/packages/tls.scm (gnutls-3.6.13): Export it. Tobias Geerinckx-Rice 2020-04-08Merge branch 'master' into core-updates... Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm Marius Bakke 2020-04-06gnu: GnuTLS: Fix CVE-2020-11501....* gnu/packages/tls.scm (gnutls)[replacement]: New field. (gnutls-3.6.13): New variable. (gnutls/guile-2.0, gnutls/dane, gnutls-3.6.10, gnutls3.0-gnutls): Use PACKAGE/INHERIT. Leo Famulari 2020-03-31gnu: OpenSSL: Update to 1.1.1f....* gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tls.scm (openssl): Update to 1.1.1f. [source](patches): Remove obsolete patch. Marius Bakke 2020-03-29gnu: gnutls: Remove net-tools for the Hurd....* gnu/packages/tls.scm (gnutls)[inputs]: Remove net-tools for the Hurd. Jan Nieuwenhuizen 2020-03-26gnu: OpenSSL: Add upstream patch to preserve compatibility in EOF handling....This is a follow-up to ad8254c23a86c3ca4ca32bc68fc8d76954aa80fd, which unexpectedly caused a test failure in the Python test suite. * gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tls.scm (openssl)[source](patches): Add it. Marius Bakke 2020-03-26gnu: OpenSSL: Remove replacement package....* gnu/packages/tls.scm (openssl): Update to 1.1.1e. [replacement]: Remove. (openssl-1.1.1e): Remove variable. Marius Bakke 2020-03-19Merge branch 'master' into core-updatesMarius Bakke 2020-03-19gnu: OpenSSL: Update replacement to 1.1.1e [fixes CVE-2019-1551]....* gnu/packages/tls.scm (openssl-1.1.1d): Rename to ... (openssl-1.1.1e): ... this. Update to 1.1.1e. (openssl)[replacement]: Adjust accordingly. Marius Bakke 2020-03-17gnu: gnutls: Make 'guile3.0-gnutls' a deprecated alias....This is a followup to 67a3c8ed15f62a39f8684ee9c8dda024de9296a9. * gnu/packages/tls.scm (guile3.0-gnutls): Make a deprecated alias for GNUTLS. Ludovic Courtès 2020-03-17gnu: GnuTLS: Build with Guile 3....This is a follow-up to commit b6bee63bed4f013064c0d902e7c8b83ed7514ade. * gnu/packages/tls.scm (gnutls)[inputs]: Change from GUILE-2.2 to GUILE-3.0. (guile3.0-gnutls): Rename to ... (guile2.2-gnutls): ... this. Use GUILE-2.2. (guile3.0-gnutls): New variable. Marius Bakke 2020-03-14Merge branch 'master' into core-updatesMarius Bakke 2020-03-11gnu: gnutls@3.6.10: Add dependency on datefudge and util-linux....* gnu/packages/tls.scm (gnutls-3.6.10)[native-inputs]: New field. Marius Bakke 2020-03-10gnu: Certbot, python-acme: Update to 1.3.0....* gnu/packages/tls.scm (certbot, python-acme): Update to 1.3.0. Leo Famulari