Date: Sunday, September 25, 2022 @ 22:01:14
  Author: freswa
Revision: 456793

add symlinks to gcc compilers compatible with rust 1.64.0 cc crate

It expects a compiler named x86_64-linux-gnu-gcc (no -pc-),
so we provide a symlink. See
https://github.com/rust-lang/cc-rs/blob/1.0.73/src/lib.rs#L2578-L2581

Modified:
  gcc/trunk/PKGBUILD

----------+
 PKGBUILD |    6 ++++++
 1 file changed, 6 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-09-25 22:00:26 UTC (rev 456792)
+++ PKGBUILD    2022-09-25 22:01:14 UTC (rev 456793)
@@ -267,6 +267,12 @@
   # many packages expect this symlink
   ln -s gcc "$pkgdir"/usr/bin/cc
 
+  # create cc-rs compatible symlinks
+  # https://github.com/rust-lang/cc-rs/blob/1.0.73/src/lib.rs#L2578-L2581
+  for binary in {c++,g++,gcc,gcc-ar,gcc-nm,gcc-ranlib}; do
+    ln -s /usr/bin/${binary} "${pkgdir}"/usr/bin/x86_64-linux-gnu-${binary}
+  done
+
   # POSIX conformance launcher scripts for c89 and c99
   install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89"
   install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99"

Reply via email to