From 1896ea04204b8086a4f25e257dc5605e5505d768 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 4 Apr 2024 01:13:09 +0200 Subject: driver: recipe: move each recipe into a separate directory --- examples/recipes/gcc/build.yml | 126 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 examples/recipes/gcc/build.yml (limited to 'examples/recipes/gcc/build.yml') diff --git a/examples/recipes/gcc/build.yml b/examples/recipes/gcc/build.yml new file mode 100644 index 0000000..4931052 --- /dev/null +++ b/examples/recipes/gcc/build.yml @@ -0,0 +1,126 @@ +meta: + version: '13.2.0' +tasks: + unpack: + fetch: + - name: '{{basename}}-{{version}}.tar.xz' + sha256: 'e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da' + run: | + tar xf {{dldir}}/{{basename}}-{{version}}.tar.xz + + sed -i -e 's@^MULTILIB_OSDIRNAMES@# &@' {{basename}}-{{version}}/gcc/config/*/t-* + + header-stubs: + args: + host: 'platform' + target: 'platform' + output: + default: {} + run: | + if {{not host_to_target.is_same}}; then + mkdir -p {{destdir}}{{target.prefix}}/include + touch {{destdir}}{{target.prefix}}/include/limits.h + fi + + configure: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'unpack' + build_depends: + - recipe: 'toolchain' + task: 'build_depends' + - recipe: 'binutils' + task: 'install' + args: + target: 'target' + depends: + - recipe: 'toolchain' + task: 'depends' + - recipe: 'mpc' + task: 'install' + - recipe: 'zlib' + task: 'install' + - task: 'header-stubs' + noinherit: true + run: | + export CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++" + + mkdir {{basename}}-build + cd {{basename}}-build + ../{{basename}}-{{version}}/configure \ + --build={{build.gnu_triplet}} \ + --host={{host.gnu_triplet}} \ + --target={{target.gnu_triplet}} \ + --prefix={{host.prefix}} \ + --libdir={{host.prefix}}/lib \ + --libexecdir={{host.prefix}}/lib \ + --with-sysroot={{host_to_target.sysroot}} \ + --with-build-sysroot={{sysroot}} \ + --with-native-system-header-dir={{target.prefix}}/include \ + --with-toolexeclibdir={{host_to_target.sysroot}}{{target.prefix}}/lib \ + --with-gxx-include-dir={{host_to_target.sysroot}}{{target.prefix}}/include/c++/"$(cat ../{{basename}}-{{version}}/gcc/BASE-VER)" \ + --with-gnu-ld \ + --enable-shared \ + --enable-languages=c,c++ \ + --enable-threads=posix \ + --disable-multilib \ + --enable-c99 \ + --enable-long-long \ + --enable-symvers=gnu \ + --enable-libstdcxx-pch \ + --without-local-prefix \ + --disable-install-libiberty \ + --disable-libssp \ + --enable-libitm \ + --enable-lto \ + --disable-bootstrap \ + --with-system-zlib \ + --with-linker-hash-style=gnu \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ + --with-system-zlib \ + --enable-standard-branch-protection \ + --with-glibc-version=2.28 \ + --enable-initfini-array \ + --enable-__cxa_atexit + find -name config.log -delete + + compile: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'configure' + depends: + - task: 'header-stubs' + noinherit: true + run: | + cd {{basename}}-build + make all-host + find -name config.log -delete + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: + runtime_depends: + - recipe: 'binutils' + task: 'install' + - recipe: 'mpc' + task: 'install' + - recipe: 'zlib' + task: 'install' + run: | + cd {{basename}}-build + make DESTDIR={{destdir}} install-host + -- cgit v1.2.3