summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-15 23:28:17 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-15 23:28:17 +0200
commit0cb84e7799fcf01b08684cc5c0af600c7907fed6 (patch)
tree11e66a5d231aa50fd16f98f9f8ff1109b1cc8b36 /examples
parentf8c174dbdb78e459e790f15820fb1fc342459473 (diff)
downloadrebel-0cb84e7799fcf01b08684cc5c0af600c7907fed6.tar
rebel-0cb84e7799fcf01b08684cc5c0af600c7907fed6.zip
examples: move libgcc-initial to separate recipe
Diffstat (limited to 'examples')
-rw-r--r--examples/gcc.yml49
-rw-r--r--examples/libgcc-initial.yml44
2 files changed, 47 insertions, 46 deletions
diff --git a/examples/gcc.yml b/examples/gcc.yml
index 72b4f72..f9e468f 100644
--- a/examples/gcc.yml
+++ b/examples/gcc.yml
@@ -6,7 +6,7 @@ tasks:
run: |
tar xf "${DLDIR}/gcc-11.2.0.tar.xz"
- stubs:
+ header-stubs:
run: |
mkdir -p "${DESTDIR}${PREFIX}/include"
touch "${DESTDIR}${PREFIX}/include/limits.h"
@@ -17,7 +17,7 @@ tasks:
build_depends:
- task: 'binutils:install'
target_depends:
- - task: 'gcc:stubs'
+ - task: 'gcc:header-stubs'
run: |
export BUILD=x86_64-linux-gnu
export HOST=x86_64-linux-gnu
@@ -70,7 +70,7 @@ tasks:
build_depends:
- task: 'binutils:install'
target_depends:
- - task: 'gcc:stubs'
+ - task: 'gcc:header-stubs'
run: |
cd gcc-build
make -j8 all-host
@@ -82,46 +82,3 @@ tasks:
cd gcc-build
make DESTDIR="$DESTDIR" install-host
- configure-libgcc-initial:
- inherit:
- task: 'gcc:compile'
- build_depends:
- - task: 'binutils:install'
- target_depends:
- - task: 'gcc:stubs'
- run: |
- export TARGET=aarch64-linux-gnu
-
- cd gcc-build
- make configure-target-libgcc
-
- # A hack borrowed from OpenEmbedded:
- # We can build an initial libgcc without having to rebuild the whole gcc
- # afterwards by manipulating the Makefile
- sed -i -r \
- -e 's@^(INHIBIT_LIBC_CFLAGS =).*@\1 -Dinhibit_libc@' \
- gcc/libgcc.mvars
- sed -i -r \
- -e 's@^(thread_header =).*@\1 gthr-single.h@' \
- -e 's@^(enable_shared =).*@\1 no@' \
- "${TARGET}/libgcc/Makefile"
-
- compile-libgcc-initial:
- inherit:
- task: 'gcc:configure-libgcc-initial'
- build_depends:
- - task: 'binutils:install'
- target_depends:
- - task: 'gcc:stubs'
- run: |
- cd gcc-build
- make -j8 all-target-libgcc
-
- install-libgcc-initial:
- inherit:
- task: 'gcc:compile-libgcc-initial'
- build_depends:
- - task: 'binutils:install'
- run: |
- cd gcc-build
- make DESTDIR="$DESTDIR" install-target-libgcc
diff --git a/examples/libgcc-initial.yml b/examples/libgcc-initial.yml
new file mode 100644
index 0000000..96a907f
--- /dev/null
+++ b/examples/libgcc-initial.yml
@@ -0,0 +1,44 @@
+tasks:
+ configure:
+ inherit:
+ task: 'gcc:compile'
+ build_depends:
+ - task: 'binutils:install'
+ target_depends:
+ - task: 'gcc:header-stubs'
+ run: |
+ export TARGET=aarch64-linux-gnu
+
+ cd gcc-build
+ make configure-target-libgcc
+
+ # A hack borrowed from OpenEmbedded:
+ # We can build an initial libgcc without having to rebuild the whole gcc
+ # afterwards by manipulating the Makefile
+ sed -i -r \
+ -e 's@^(INHIBIT_LIBC_CFLAGS =).*@\1 -Dinhibit_libc@' \
+ gcc/libgcc.mvars
+ sed -i -r \
+ -e 's@^(thread_header =).*@\1 gthr-single.h@' \
+ -e 's@^(enable_shared =).*@\1 no@' \
+ "${TARGET}/libgcc/Makefile"
+
+ compile:
+ inherit:
+ task: 'libgcc-initial:configure'
+ build_depends:
+ - task: 'binutils:install'
+ target_depends:
+ - task: 'gcc:header-stubs'
+ run: |
+ cd gcc-build
+ make -j8 all-target-libgcc
+
+ install:
+ inherit:
+ task: 'libgcc-initial:compile'
+ build_depends:
+ - task: 'binutils:install'
+ run: |
+ cd gcc-build
+ make DESTDIR="$DESTDIR" install-target-libgcc