diff --git a/srcpkgs/linux/template b/srcpkgs/linux/template
index 3453e3c0731..b3e16f38f86 100644
--- a/srcpkgs/linux/template
+++ b/srcpkgs/linux/template
@@ -9,7 +9,7 @@ update_site="https://www.kernel.org/feeds/kdist.xml"
update_pattern="
\K\d+.\d+(?=.[\d]+: stable)"
maintainer="Juan RP "
license="Public domain"
-only_for_archs="i686 x86_64"
+only_for_archs="i686 i686-musl x86_64 x86_64-musl"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*)
diff --git a/srcpkgs/linux3.14/template b/srcpkgs/linux3.14/template
index 84515a60a61..12b028dc7d0 100644
--- a/srcpkgs/linux3.14/template
+++ b/srcpkgs/linux3.14/template
@@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
nostrip=yes
noverifyrdeps=yes
preserve=yes
-only_for_archs="i686 x86_64"
-makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
+only_for_archs="i686 i686-musl x86_64 x86_64-musl"
+makedepends="bc perl kmod>=11_2 libressl-openssl"
triggers="kernel-hooks"
# These files could be modified when an external module is built.
mutable_files="
@@ -35,11 +35,10 @@ do_configure() {
# as modules (defconfig+allmodconfig).
local arch
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
@@ -56,21 +55,26 @@ do_configure() {
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
+ # XXX disable -fstack-protector-strong with musl; remove this if gcc>=4.9
+ # is supported with musl.
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ sed -i -e 's|\(CONFIG_CC_STACKPROTECTOR_STRONG\).*|# \1 is not set|' .config
+ ;;
+ esac
+}
do_build() {
make ${makejobs} prepare
make ${makejobs} bzImage modules
}
-
do_install() {
local arch hdrdest
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh
diff --git a/srcpkgs/linux3.16/template b/srcpkgs/linux3.16/template
index aec7bd64d1c..aae653e94c1 100644
--- a/srcpkgs/linux3.16/template
+++ b/srcpkgs/linux3.16/template
@@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
nostrip=yes
noverifyrdeps=yes
preserve=yes
-only_for_archs="i686 x86_64"
-makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
+only_for_archs="i686 i686-musl x86_64 x86_64-musl"
+makedepends="bc perl kmod>=11_2 libressl-openssl"
triggers="kernel-hooks"
# These files could be modified when an external module is built.
mutable_files="
@@ -35,11 +35,10 @@ do_configure() {
# as modules (defconfig+allmodconfig).
local arch
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
@@ -56,22 +55,27 @@ do_configure() {
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
+ # XXX disable -fstack-protector-strong with musl; remove this if gcc>=4.9
+ # is supported with musl.
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ sed -i -e 's|\(CONFIG_CC_STACKPROTECTOR_STRONG\).*|# \1 is not set|' .config
+ ;;
+ esac
+}
do_build() {
- # Override EXTRAVERSION because we can't have dashes in kernel name
+ # Override EXTRAVERSION because we can't have dashes in kernel name
make EXTRAVERSION=${_patchver} ${makejobs} prepare
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
}
-
do_install() {
local arch hdrdest
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh
diff --git a/srcpkgs/linux3.17/template b/srcpkgs/linux3.17/template
index 8892f6bc758..6c1046a7cb9 100644
--- a/srcpkgs/linux3.17/template
+++ b/srcpkgs/linux3.17/template
@@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
nostrip=yes
noverifyrdeps=yes
preserve=yes
-only_for_archs="i686 x86_64"
-makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
+only_for_archs="i686 i686-musl x86_64 x86_64-musl"
+makedepends="bc perl kmod>=11_2 libressl-openssl"
triggers="kernel-hooks"
# These files could be modified when an external module is built.
mutable_files="
@@ -35,11 +35,10 @@ do_configure() {
# as modules (defconfig+allmodconfig).
local arch
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
@@ -56,22 +55,27 @@ do_configure() {
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
+ # XXX disable -fstack-protector-strong with musl; remove this if gcc>=4.9
+ # is supported with musl.
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ sed -i -e 's|\(CONFIG_CC_STACKPROTECTOR_STRONG\).*|# \1 is not set|' .config
+ ;;
+ esac
+}
do_build() {
- # Override EXTRAVERSION because we can't have dashes in kernel name
+ # Override EXTRAVERSION because we can't have dashes in kernel name
make EXTRAVERSION=${_patchver} ${makejobs} prepare
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
}
-
do_install() {
local arch hdrdest
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh
diff --git a/srcpkgs/linux3.18/template b/srcpkgs/linux3.18/template
index 95f8d08dafd..55426df2eea 100644
--- a/srcpkgs/linux3.18/template
+++ b/srcpkgs/linux3.18/template
@@ -18,8 +18,8 @@ _kernver="${version}_${revision}"
nostrip=yes
noverifyrdeps=yes
preserve=yes
-only_for_archs="i686 x86_64"
-makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
+only_for_archs="i686 i686-musl x86_64 x86_64-musl"
+makedepends="bc perl kmod>=11_2 libressl-openssl"
triggers="kernel-hooks"
# These files could be modified when an external module is built.
mutable_files="
@@ -37,11 +37,10 @@ do_configure() {
# as modules (defconfig+allmodconfig).
local arch
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
@@ -58,22 +57,27 @@ do_configure() {
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
-}
+ # XXX disable -fstack-protector-strong with musl; remove this if gcc>=4.9
+ # is supported with musl.
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ sed -i -e 's|\(CONFIG_CC_STACKPROTECTOR_STRONG\).*|# \1 is not set|' .config
+ ;;
+ esac
+}
do_build() {
# Override EXTRAVERSION because we can't have dashes in kernel name
make EXTRAVERSION=${_patchver} ${makejobs} prepare
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
}
-
do_install() {
local arch hdrdest
- if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
- arch=i386
- else
- arch=x86_64
- fi
+ case "$XBPS_TARGET_MACHINE" in
+ i686*) arch=i386;;
+ x86_64*) arch=x86_64;;
+ esac
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh