gnu: ath9k-htc-firmware: Allow using other targets.
* gnu/packages/firmware.scm (ath9k-htc-firmware): Override the TARGET environment variable in the configure script to use xtensa-elf. * gnu/packages/patches/ath9k-htc-firmware-objcopy.patch: Adapt to use TARGET environment variable for objcopy. Change-Id: Ia44f0f25dde532b90168f2f2456412a43ac9af24 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
af181ac5d1
commit
c3aba93823
2 changed files with 3 additions and 2 deletions
|
@ -121,6 +121,7 @@
|
||||||
;; 'configure' is a simple script that runs 'cmake' with
|
;; 'configure' is a simple script that runs 'cmake' with
|
||||||
;; the right flags.
|
;; the right flags.
|
||||||
(substitute* "configure"
|
(substitute* "configure"
|
||||||
|
(("^TARGET.*$") "TARGET=xtensa-elf\n")
|
||||||
(("^TOOLCHAIN=.*$")
|
(("^TOOLCHAIN=.*$")
|
||||||
(string-append "TOOLCHAIN="
|
(string-append "TOOLCHAIN="
|
||||||
(assoc-ref (or native-inputs inputs) "cross-gcc")
|
(assoc-ref (or native-inputs inputs) "cross-gcc")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
The firmware is cross-compiled, but the build system ends up using
|
The firmware is cross-compiled, but the build system ends up using
|
||||||
'objcopy' instead of 'xtensa-elf-objcopy' by default. Force it to
|
'objcopy' instead of '$TARGET-objcopy' by default. Force it to
|
||||||
use the right one.
|
use the right one.
|
||||||
|
|
||||||
--- source/target_firmware/configure 2014-10-28 20:57:26.834436561 +0100
|
--- source/target_firmware/configure 2014-10-28 20:57:26.834436561 +0100
|
||||||
|
@ -8,7 +8,7 @@ use the right one.
|
||||||
cat > "$TOOLCHAIN_FILE" <<EOF
|
cat > "$TOOLCHAIN_FILE" <<EOF
|
||||||
INCLUDE(CMakeForceCompiler)
|
INCLUDE(CMakeForceCompiler)
|
||||||
|
|
||||||
+SET(CMAKE_OBJCOPY xtensa-elf-objcopy)
|
+SET(CMAKE_OBJCOPY ${TARGET}-objcopy)
|
||||||
SET(CMAKE_SYSTEM_PROCESSOR xtensa)
|
SET(CMAKE_SYSTEM_PROCESSOR xtensa)
|
||||||
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/$TARGET)
|
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/$TARGET)
|
||||||
SET(CMAKE_STRIP :)
|
SET(CMAKE_STRIP :)
|
||||||
|
|
Reference in a new issue