From 3fbe53aec0f340a90858265ca8f890314fa5d523 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 30 Oct 2021 00:21:04 +0200 Subject: examples: move recipes to subdirectory --- examples/recipes/libgcc-initial.yml | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 examples/recipes/libgcc-initial.yml (limited to 'examples/recipes/libgcc-initial.yml') diff --git a/examples/recipes/libgcc-initial.yml b/examples/recipes/libgcc-initial.yml new file mode 100644 index 0000000..fc047e8 --- /dev/null +++ b/examples/recipes/libgcc-initial.yml @@ -0,0 +1,52 @@ +meta: + name: 'gcc' + version: '11.2.0' +tasks: + configure: + args: + host: 'platform' + target: 'platform' + inherit: + recipe: 'gcc' + task: 'compile' + depends: + - recipe: 'gcc' + task: 'header-stubs' + run: | + cd {{pn}}-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.gnu_triplet}}/libgcc/Makefile + + compile: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'configure' + run: | + cd {{pn}}-build + make all-target-libgcc + + install: + args: + host: 'platform' + target: 'platform' + inherit: + task: 'compile' + output: + default: {} + run: | + cd {{pn}}-build + make DESTDIR={{destdir}} install-target-libgcc + + ln -s libgcc.a {{destdir}}{{host.prefix}}/lib/gcc/{{target.gnu_triplet}}/"$(cat ../{{pn}}-{{pv}}/gcc/BASE-VER)"/libgcc_eh.a -- cgit v1.2.3