Bug #791
Support cross-compiling for other architectures without need extra dependencies
100%
Description
Add cross-compiling support to build multiple architectures without need extra dependencies
- support cross-compiling configuration
- no need extra dependencies like libretools-mips64el
- no need extra steps to build and upload packages
- easy to use libremakepkg/librestage/librerelease
Related issues
History
Updated by Anonymous almost 8 years ago
- Related to Porting #787: [librechroot] Support ARM chroots on x86 via QEMU added
Updated by Anonymous over 7 years ago
coadde wrote:
Add pacman flags, example:Add cross-compiling support to build multiple architectures without need extra dependencies
- support cross-compiling configuration
- no need extra dependencies like libretools-mips64el
- no need extra steps to build and upload packages
- easy to use libremakepkg/librestage/librerelease
- CC and CPP (for native-gcc, crosscompiling-gcc and clang support)
- TARCH (for package-tarball build [*-${TARCH}.pkg.tar.xz])
- CTARGET (for cross-compiling compilation):
example - (crosscompiling_build-mips64el):
######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### # CC=mips64el-unknown-linux-gnu-gcc CPP=mips64el-unknown-linux-gnu-g++ CARCH="x86_64" TARCH="mips64el" CHOST="x86_64-unknown-linux-gnu" CTARGET="mips64el-unknown-linux-gnu" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=mips64el -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" CXXFLAGS="-march=mips64el -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" #-- Debugging flags DEBUG_CFLAGS="-g -fvar-tracking-assignments" DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
example - (native_build-x86_64):
######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### # CC=gcc #CC=clang CPP=g++ #CPP=clang++ CARCH="x86_64" TARCH="${CARCH}" CHOST="x86_64-unknown-linux-gnu" CTARGET="${CHOST}" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j4" #-- Debugging flags DEBUG_CFLAGS="-g -fvar-tracking-assignments" DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
Updated by Anonymous over 7 years ago
- Related to Bug #807: [librechroot] Support using proot to call QEMU for foreign architectures added
Updated by Anonymous over 7 years ago
- Related to Bug #808: Package [dbscripts] similarly to libretools for easy use in Parabola server added
Updated by Anonymous over 7 years ago
- Related to Bug #790: Add support QEMU in chroot on nonnative architecture to build other systems without need to use cross-compiling added
Updated by lukeshu about 7 years ago
- Subject changed from Add cross-compiling support to build multiple architectures without need extra dependencies to Support cross-compiling for other architectures without need extra dependencies
I'm down with most of this, but I'm not sure about dropping having a libretools-cross-${CARCH} (or somesuch) for cross-compiling. For one, it'd be silly to require qemu be installed on an ARM device to cross-compile for ARM. Similarly, it'd be silly to require that qemu be installed on ARM devices to cross-compile for x86, since ARM devices are typically under-powered.
Updated by lukeshu about 7 years ago
- Related to deleted (Bug #807: [librechroot] Support using proot to call QEMU for foreign architectures)
Updated by lukeshu about 7 years ago
- Target version set to Better ARM support
- Category set to ARM on x86
Updated by lukeshu about 7 years ago
- Related to deleted (Bug #790: Add support QEMU in chroot on nonnative architecture to build other systems without need to use cross-compiling)
Updated by lukeshu about 7 years ago
- Related to deleted (Porting #787: [librechroot] Support ARM chroots on x86 via QEMU)
Updated by lukeshu about 7 years ago
- Blocked by Porting #787: [librechroot] Support ARM chroots on x86 via QEMU added
Updated by lukeshu about 7 years ago
- Status changed from open to info needed
So, this is added, except for extra dependencies.
Is everyone ok with having the optdepend binftm-qemu-static: To build ARM packages from x86
?
Updated by lukeshu about 7 years ago
- % Done changed from 0 to 100
- Status changed from info needed to fixed
Alright then!