summaryrefslogtreecommitdiffstats
path: root/examples/recipes/libgcc-initial@11.2.0.yml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/recipes/libgcc-initial@11.2.0.yml')
-rw-r--r--examples/recipes/libgcc-initial@11.2.0.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/examples/recipes/libgcc-initial@11.2.0.yml b/examples/recipes/libgcc-initial@11.2.0.yml
new file mode 100644
index 0000000..43f6f45
--- /dev/null
+++ b/examples/recipes/libgcc-initial@11.2.0.yml
@@ -0,0 +1,51 @@
+meta:
+ name: 'gcc'
+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