summaryrefslogtreecommitdiff
path: root/templates/gcc/template
diff options
context:
space:
mode:
Diffstat (limited to 'templates/gcc/template')
-rw-r--r--templates/gcc/template55
1 files changed, 55 insertions, 0 deletions
diff --git a/templates/gcc/template b/templates/gcc/template
new file mode 100644
index 0000000..4d8081b
--- /dev/null
+++ b/templates/gcc/template
@@ -0,0 +1,55 @@
+pkgname=gcc
+version=16.1.0
+upstream="${MIRROR_GNU_FTP}/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
+
+function do_configure {
+ ./contrib/download_prerequisites
+ mkdir -p build/
+ cd build/
+
+ conf_flags=(
+ --prefix=/usr
+ --host=${DISTRO_TC}
+ --target=${DISTRO_TC}
+ --enable-shared
+ --enable-threads=posix
+ --enable-languages=c,c++
+ --disable-multilib
+ --disable-nls
+ --disable-werror
+ --with-build-sysroot=${CROSS_ENV_ROOT}
+ --enable-stack-protector=strong
+ )
+
+ ../configure "${conf_flags[@]}"
+
+ cd ..
+ mkdir -p buildlib/
+ cd buildlib
+
+ libconf_flags=(
+ --prefix=/usr
+ --host=${DISTRO_TC}
+ --disable-multilib
+ --disable-nls
+ --disable-libstdcxx-pch
+ )
+}
+
+function do_build {
+ cd build/
+ make -j$(nproc)
+
+ cd ..
+ cd buildlib/
+ make -j$(nproc)
+}
+
+function do_install {
+ cd build/
+ make DESTDIR="${MASTERDIR}" install
+
+ cd ..
+ cd buildlib/
+ make DESTDIR="${MASTERDIR}" install
+}