diff options
author | Klemens Nanni <contact@autoboot.org> | 2016-03-09 08:09:04 (EST) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2016-03-10 20:08:22 (EST) |
commit | c64485ec850ca901f1c7adde48e19bb84397e591 (patch) | |
tree | abd812ce9e342ec255256ac6faaf580381604391 /resources/scripts/helpers/build/dependencies/parabola | |
parent | e15beed400f3ced1ba2c60fb78232de177a05e30 (diff) | |
download | libreboot-c64485ec850ca901f1c7adde48e19bb84397e591.zip libreboot-c64485ec850ca901f1c7adde48e19bb84397e591.tar.gz libreboot-c64485ec850ca901f1c7adde48e19bb84397e591.tar.bz2 |
build/dependencies: Check architecture only once
Diffstat (limited to 'resources/scripts/helpers/build/dependencies/parabola')
-rwxr-xr-x | resources/scripts/helpers/build/dependencies/parabola | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/resources/scripts/helpers/build/dependencies/parabola b/resources/scripts/helpers/build/dependencies/parabola index 6a14e10..8102f26 100755 --- a/resources/scripts/helpers/build/dependencies/parabola +++ b/resources/scripts/helpers/build/dependencies/parabola @@ -57,12 +57,14 @@ pacman -S arm-none-eabi-gcc pacman -S --needed libpciaccess +[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ] +arch=${?} + # For cross-compiling i686 target on x86_64 host. -if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] - then - printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" - pacman -Sl --needed multilib 1&>/dev/null || (printf "You must enable the multilib repository in /etc/pacman.conf first\n"; exit 1) - pacman -S --needed gcc{,-libs}-multilib lib32-{lib{ltdl,pciaccess,stdc++5},glibc,fakeroot} +if ["${arch}" -eq 0 ]; then + printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" + pacman -Sl multilib 1&>/dev/null || (printf "You must enable the multilib repository in /etc/pacman.conf first\n"; exit 1) + pacman -S --needed gcc-multilib gcc-libs-multilib lib32-libltdl lib32-libpciaccess lib32-libstdc++5 lib32-glibc lib32-fakeroot fi # Memtest86+ build dependencies @@ -83,15 +85,12 @@ pacman -S ncurses doxygen iasl gdb flex bison # pacman -S git base-devel # For cross-compiling i686 target on x86_64 host. -if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ] - then - printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" - pacman -S --needed lib32-ncurses +if ["${arch}" -eq 0 ]; then + printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n" + pacman -S --needed lib32-ncurses fi -# GRUB build dependencies (also requires build-essential, bison and flex) -# ------------------------------------------------------------ - +# GRUB2 build dependencies (also requires build-essential, bison and flex) # pacman -S --needed base-devel bison flex printf "GRUB: Fonts, (crypto) filesystem support, automake, etc.\n" |