You are not logged in.
Simple question, hopefully I've just missed the answer while googling this.
To cross-compile an ARM package on my x86 box, I have to change the value of ${CARCH}. The only way I've been able to do this is to modify its setting in /etc/makepkg.conf. I'd like to be able to just specify it on the command-line along with my other variables; something like:
CROSS_COMPILE=/opt/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- ARCH=arm CARCH=arm makepkg -sHowever, the setting of CARCH like that is ignored. All other variables have the desired effect. Is it not possible to set makepkg variables on the command-line ?
If I have this completely wrong and I should be doing it another way, I'd appreciate some guidance. But, by that, I don't mean build on arm with distcc because I have already done that and it takes over three hours versus under ten minutes for the above method which, apart from needing to modify makepkg.conf, works great ![]()
Offline
Maybe you'll find this article helplful a bit.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
You could specify an alternate configuration file instead of the default one.
Offline
This patch should do what you want;
From f273bbd559b453e0af5a038b3bb8f3111272f9a7 Mon Sep 17 00:00:00 2001
From: Phillip Smith <fukawi2@gmail.com>
Date: Tue, 30 Apr 2013 09:00:21 +1000
Subject: [PATCH] makepkg: add support for CARCH environment var
Add support for overriding configuration in /etc/makepkg.conf and
~/.makepkg.conf by setting the environment variable CARCH similar to
how SRCDEST and PKGDEST behave.
---
scripts/makepkg.sh.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index da620a4..50bf41d 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2604,6 +2604,7 @@ trap 'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"' E
[[ -n ${SRCEXT} ]] && _SRCEXT=${SRCEXT}
[[ -n ${GPGKEY} ]] && _GPGKEY=${GPGKEY}
[[ -n ${PACKAGER} ]] && _PACKAGER=${PACKAGER}
+[[ -n ${CARCH} ]] && _CARCH=${CARCH}
# default config is makepkg.conf
MAKEPKG_CONF=${MAKEPKG_CONF:-$confdir/makepkg.conf}
@@ -2703,6 +2704,7 @@ PKGEXT=${_PKGEXT:-$PKGEXT}
SRCEXT=${_SRCEXT:-$SRCEXT}
GPGKEY=${_GPGKEY:-$GPGKEY}
PACKAGER=${_PACKAGER:-$PACKAGER}
+CARCH=${_CARCH:-$CARCH}
if (( ! INFAKEROOT )); then
if (( EUID == 0 && ! ASROOT )); then
--
1.8.2.1EDIT: https://bugs.archlinux.org/task/35030
Last edited by fukawi2 (2013-04-29 23:11:27)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yes @fukawi2 that patch does exactly what I want. I have voted for it and hope it makes it into the official package. Thanks.
Offline