gnu: ipxe-qemu: Fix building on 32-bit systems.
* gnu/packages/bootloaders.scm (ipxe-qemu)[native-inputs]: When building from a 32-bit system add a binutils variant capable of assembling 64-bit instructions and an ld-wrapper using it.
This commit is contained in:
		
							parent
							
								
									1be1961a1c
								
							
						
					
					
						commit
						6ce7904a85
					
				
					 1 changed files with 21 additions and 4 deletions
				
			
		| 
						 | 
					@ -1547,10 +1547,27 @@ the features of iPXE without the hassle of reflashing.")
 | 
				
			||||||
     (if (target-x86-64?)
 | 
					     (if (target-x86-64?)
 | 
				
			||||||
         (modify-inputs (package-native-inputs ipxe)
 | 
					         (modify-inputs (package-native-inputs ipxe)
 | 
				
			||||||
           (prepend edk2-tools))
 | 
					           (prepend edk2-tools))
 | 
				
			||||||
         (modify-inputs (package-native-inputs ipxe)
 | 
					         (if (target-64bit?)
 | 
				
			||||||
           (prepend edk2-tools
 | 
					           (modify-inputs (package-native-inputs ipxe)
 | 
				
			||||||
                    (cross-gcc "x86_64-linux-gnu")
 | 
					             (prepend edk2-tools
 | 
				
			||||||
                    (cross-binutils "x86_64-linux-gnu")))))
 | 
					                      (cross-gcc "x86_64-linux-gnu")
 | 
				
			||||||
 | 
					                      (cross-binutils "x86_64-linux-gnu")))
 | 
				
			||||||
 | 
					           ;; Our default 32-bit binutils is not 64-bit capable.
 | 
				
			||||||
 | 
					           (let ((binutils-64-bit-bfd
 | 
				
			||||||
 | 
					                   (package/inherit
 | 
				
			||||||
 | 
					                     binutils
 | 
				
			||||||
 | 
					                     (name "binutils-64-bit-bfd")
 | 
				
			||||||
 | 
					                     (arguments
 | 
				
			||||||
 | 
					                       (substitute-keyword-arguments (package-arguments binutils)
 | 
				
			||||||
 | 
					                        ((#:configure-flags flags ''())
 | 
				
			||||||
 | 
					                         `(cons "--enable-64-bit-bfd" ,flags)))))))
 | 
				
			||||||
 | 
					             (modify-inputs (package-native-inputs ipxe)
 | 
				
			||||||
 | 
					               (prepend edk2-tools
 | 
				
			||||||
 | 
					                        (make-ld-wrapper "ld-wrapper-64-bit-bfd"
 | 
				
			||||||
 | 
					                                         #:binutils binutils)
 | 
				
			||||||
 | 
					                        binutils-64-bit-bfd
 | 
				
			||||||
 | 
					                        (cross-gcc "x86_64-linux-gnu")
 | 
				
			||||||
 | 
					                        (cross-binutils "x86_64-linux-gnu")))))))
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     (let ((roms
 | 
					     (let ((roms
 | 
				
			||||||
            ;; Alist of ROM -> (VID . DID) entries.  This list and below
 | 
					            ;; Alist of ROM -> (VID . DID) entries.  This list and below
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue