aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-12-20 22:21:16 +0100
committerLudovic Courtès <ludo@gnu.org>2017-12-20 22:21:16 +0100
commit066ccc2c69390f630237eadac1f69c03df22b87a (patch)
treed66aea5f7592018fad4b9874999b347b32810d66 /gnu/packages/gcc.scm
parent614fffe4270cef308573a6d9cef650f3972875af (diff)
downloadguix-066ccc2c69390f630237eadac1f69c03df22b87a.tar
guix-066ccc2c69390f630237eadac1f69c03df22b87a.tar.gz
gnu: gcc: Fix cross-compilation.
Previously "guix build gcc@5 --target=TRIPLET" would fail like this: checking for exported symbols... /tmp/guix-build-gcc-5.5.0.drv-0/gcc-5.5.0/libcc1/configure: line 14531: -T: command not found yes checking for -rdynamic... /tmp/guix-build-gcc-5.5.0.drv-0/gcc-5.5.0/libcc1/configure: line 14541: -T: command not found no checking for library containing dlopen... -ldl checking for -fPIC -shared... yes configure: error: Building GCC with plugin support requires a host that supports -fPIC, -shared, -ldl and -rdynamic. * gnu/packages/gcc.scm (gcc-4.7)[maybe-target-tools]: Add "OBJDUMP". (gcc-5)[source](snippet, modules): New fields.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm18
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 84d2f9a8d2..7f4cf8ab69 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -80,8 +80,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(map (lambda (var tool)
(string-append (string-append var "_FOR_TARGET")
"=" target "-" tool))
- '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
- '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
+ '("CC" "CXX" "LD" "AR" "NM" "OBJDUMP" "RANLIB" "STRIP")
+ '("gcc" "g++" "ld" "ar" "nm" "objdump" "ranlib" "strip"))
'()))))
(libdir
(let ((base '(or (assoc-ref outputs "lib")
@@ -396,7 +396,19 @@ Go. It also includes runtime support libraries for these languages.")
"gcc-5.0-libvtv-runpath.patch"
"gcc-5-source-date-epoch-1.patch"
"gcc-5-source-date-epoch-2.patch"
- "gcc-fix-texi2pod.patch"))))
+ "gcc-fix-texi2pod.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Fix 'libcc1/configure' error when cross-compiling GCC.
+ ;; Without that, 'libcc1/configure' wrongfully determines that
+ ;; '-rdynamic' support is missing because $gcc_cv_objdump is
+ ;; empty:
+ ;;
+ ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67590
+ ;; http://cgit.openembedded.org/openembedded-core/commit/?id=f6e47aa9b12f9ab61530c40e0343f451699d9077
+ '(substitute* "libcc1/configure"
+ (("\\$gcc_cv_objdump -T")
+ "$OBJDUMP_FOR_TARGET -T")))))
(inputs
`(("isl" ,isl)
,@(package-inputs gcc-4.7)))))