summaryrefslogtreecommitdiff
path: root/system/gcc-libssp
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-01 19:39:07 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-01 19:39:07 -0500
commit2adad41c4eae395a5ae9f50ac50d21dc51095f91 (patch)
tree39379f149602dbb6b3bb5f815f351f8dd0cb5c14 /system/gcc-libssp
parent8837d76332650f30a9a763c02223941ae49bf37e (diff)
downloadpackages-2adad41c4eae395a5ae9f50ac50d21dc51095f91.tar.gz
packages-2adad41c4eae395a5ae9f50ac50d21dc51095f91.tar.bz2
packages-2adad41c4eae395a5ae9f50ac50d21dc51095f91.tar.xz
packages-2adad41c4eae395a5ae9f50ac50d21dc51095f91.zip
system/gcc-libssp: new package, requested from #musl
Diffstat (limited to 'system/gcc-libssp')
-rw-r--r--system/gcc-libssp/APKBUILD28
-rw-r--r--system/gcc-libssp/__stack_chk_fail_local.c2
2 files changed, 30 insertions, 0 deletions
diff --git a/system/gcc-libssp/APKBUILD b/system/gcc-libssp/APKBUILD
new file mode 100644
index 000000000..a09c75307
--- /dev/null
+++ b/system/gcc-libssp/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=gcc-libssp
+pkgver=6.4.0
+pkgrel=0
+pkgdesc="Add libssp support to GCC for use with non-native spec files"
+url="https://code.foxkit.us/adelie/packages"
+arch="all"
+license="NCSA"
+options="!check !dbg !strip"
+depends="gcc"
+makedepends=""
+subpackages=""
+source="__stack_chk_fail_local.c"
+builddir="$srcdir"
+
+build() {
+ cd "$builddir"
+ ${CROSS_COMPILE}gcc $CPPFLAGS $CFLAGS -c "$srcdir"/__stack_chk_fail_local.c -o __stack_chk_fail_local.o
+ ${CROSS_COMPILE}ar r libssp_nonshared.a __stack_chk_fail_local.o
+}
+
+package() {
+ cd "$builddir"
+ install -D -m644 libssp_nonshared.a "$pkgdir"/usr/lib/gcc/${CHOST}/${pkgver}/libssp_nonshared.a
+}
+
+sha512sums="062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c"
diff --git a/system/gcc-libssp/__stack_chk_fail_local.c b/system/gcc-libssp/__stack_chk_fail_local.c
new file mode 100644
index 000000000..2b403a6e0
--- /dev/null
+++ b/system/gcc-libssp/__stack_chk_fail_local.c
@@ -0,0 +1,2 @@
+extern void __stack_chk_fail(void);
+void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { __stack_chk_fail(); }