summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-25 21:44:42 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-26 15:51:00 +0200
commit83fd44af9b8c0b1e81b46d97a406f542481a7f00 (patch)
tree1dd90feb1d427d0c0538c9638a2b9a8862302aff /examples
parent8564c639f382b46382cfb1a01af70f2202fe168f (diff)
downloadrebel-83fd44af9b8c0b1e81b46d97a406f542481a7f00.tar
rebel-83fd44af9b8c0b1e81b46d97a406f542481a7f00.zip
Add "cross compile" prefix to platform arguments
Allow getting the right path for the host==build toolchain. There are still a few unsolved questions, in particular how to deal with host depends of host==build tasks.
Diffstat (limited to 'examples')
-rw-r--r--examples/busybox.yml4
-rw-r--r--examples/glibc.yml14
-rw-r--r--examples/linux.yml6
3 files changed, 11 insertions, 13 deletions
diff --git a/examples/busybox.yml b/examples/busybox.yml
index 8025232..198dc2c 100644
--- a/examples/busybox.yml
+++ b/examples/busybox.yml
@@ -33,7 +33,7 @@ tasks:
cd busybox-build
make \
ARCH={{host.karch}} \
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}- \
+ CROSS_COMPILE={{host.cross_compile}} \
busybox busybox.links -j8
sed -i \
-e 's@^/usr@@' \
@@ -60,6 +60,6 @@ tasks:
cd busybox-build
make \
ARCH={{host.karch}} \
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}- \
+ CROSS_COMPILE={{host.cross_compile}} \
CONFIG_PREFIX={{destdir}}{{host.prefix}} \
install
diff --git a/examples/glibc.yml b/examples/glibc.yml
index 0c5235a..13f1206 100644
--- a/examples/glibc.yml
+++ b/examples/glibc.yml
@@ -20,15 +20,13 @@ tasks:
- recipe: 'linux-uapi-headers'
task: 'install'
run: |
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}-
-
export BUILD_CC=gcc
- export CC=${CROSS_COMPILE}gcc
- export CXX=${CROSS_COMPILE}g++
- export AR=${CROSS_COMPILE}ar
- export NM=${CROSS_COMPILE}nm
- export RANLIB=${CROSS_COMPILE}ranlib
- export READELF=${CROSS_COMPILE}readelf
+ export CC={{host.cross_compile}}gcc
+ export CXX={{host.cross_compile}}g++
+ export AR={{host.cross_compile}}ar
+ export NM={{host.cross_compile}}nm
+ export RANLIB={{host.cross_compile}}ranlib
+ export READELF={{host.cross_compile}}readelf
mkdir glibc-build
cd glibc-build
diff --git a/examples/linux.yml b/examples/linux.yml
index 33f11d7..d024952 100644
--- a/examples/linux.yml
+++ b/examples/linux.yml
@@ -20,7 +20,7 @@ tasks:
make \
-f ../linux-5.10.66/Makefile \
ARCH={{host.karch}} \
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}- \
+ CROSS_COMPILE={{host.cross_compile}} \
defconfig
compile:
@@ -35,7 +35,7 @@ tasks:
cd linux-build
make \
ARCH={{host.karch}} \
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}- \
+ CROSS_COMPILE={{host.cross_compile}} \
all -j8
install:
@@ -56,7 +56,7 @@ tasks:
mkdir -p {{destdir}}/boot
make \
ARCH={{host.karch}} \
- CROSS_COMPILE={{build.prefix}}/bin/{{host.gnu_triplet}}- \
+ CROSS_COMPILE={{host.cross_compile}} \
INSTALL_PATH={{destdir}}/boot \
INSTALL_MOD_PATH={{destdir}}/modules{{host.prefix}} \
DEPMOD=true \