linux*: misc fixes to allow musl builds.
This commit is contained in:
parent
6d2d3fe993
commit
6749cdc08a
|
@ -9,7 +9,7 @@ update_site="https://www.kernel.org/feeds/kdist.xml"
|
||||||
update_pattern="<title>\K\d+.\d+(?=.[\d]+: stable</title>)"
|
update_pattern="<title>\K\d+.\d+(?=.[\d]+: stable</title>)"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
license="Public domain"
|
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
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*|x86_64*)
|
i686*|x86_64*)
|
||||||
|
|
|
@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
preserve=yes
|
preserve=yes
|
||||||
only_for_archs="i686 x86_64"
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||||
makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
|
makedepends="bc perl kmod>=11_2 libressl-openssl"
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
# These files could be modified when an external module is built.
|
# These files could be modified when an external module is built.
|
||||||
mutable_files="
|
mutable_files="
|
||||||
|
@ -35,11 +35,10 @@ do_configure() {
|
||||||
# as modules (defconfig+allmodconfig).
|
# as modules (defconfig+allmodconfig).
|
||||||
local arch
|
local arch
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
||||||
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
||||||
|
@ -56,21 +55,26 @@ do_configure() {
|
||||||
fi
|
fi
|
||||||
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
||||||
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
|
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() {
|
do_build() {
|
||||||
make ${makejobs} prepare
|
make ${makejobs} prepare
|
||||||
make ${makejobs} bzImage modules
|
make ${makejobs} bzImage modules
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
local arch hdrdest
|
local arch hdrdest
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
# Run depmod after compressing modules.
|
# Run depmod after compressing modules.
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
|
|
@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
preserve=yes
|
preserve=yes
|
||||||
only_for_archs="i686 x86_64"
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||||
makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
|
makedepends="bc perl kmod>=11_2 libressl-openssl"
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
# These files could be modified when an external module is built.
|
# These files could be modified when an external module is built.
|
||||||
mutable_files="
|
mutable_files="
|
||||||
|
@ -35,11 +35,10 @@ do_configure() {
|
||||||
# as modules (defconfig+allmodconfig).
|
# as modules (defconfig+allmodconfig).
|
||||||
local arch
|
local arch
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
||||||
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
||||||
|
@ -56,22 +55,27 @@ do_configure() {
|
||||||
fi
|
fi
|
||||||
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
||||||
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
|
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() {
|
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} prepare
|
||||||
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
local arch hdrdest
|
local arch hdrdest
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
# Run depmod after compressing modules.
|
# Run depmod after compressing modules.
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
|
|
@ -16,8 +16,8 @@ _kernver="${version}_${revision}"
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
preserve=yes
|
preserve=yes
|
||||||
only_for_archs="i686 x86_64"
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||||
makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
|
makedepends="bc perl kmod>=11_2 libressl-openssl"
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
# These files could be modified when an external module is built.
|
# These files could be modified when an external module is built.
|
||||||
mutable_files="
|
mutable_files="
|
||||||
|
@ -35,11 +35,10 @@ do_configure() {
|
||||||
# as modules (defconfig+allmodconfig).
|
# as modules (defconfig+allmodconfig).
|
||||||
local arch
|
local arch
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
||||||
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
||||||
|
@ -56,22 +55,27 @@ do_configure() {
|
||||||
fi
|
fi
|
||||||
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
||||||
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
|
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() {
|
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} prepare
|
||||||
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
local arch hdrdest
|
local arch hdrdest
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
# Run depmod after compressing modules.
|
# Run depmod after compressing modules.
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
|
|
@ -18,8 +18,8 @@ _kernver="${version}_${revision}"
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
preserve=yes
|
preserve=yes
|
||||||
only_for_archs="i686 x86_64"
|
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||||
makedepends="bc perl kmod>=11_2 libressl-openssl elfutils"
|
makedepends="bc perl kmod>=11_2 libressl-openssl"
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
# These files could be modified when an external module is built.
|
# These files could be modified when an external module is built.
|
||||||
mutable_files="
|
mutable_files="
|
||||||
|
@ -37,11 +37,10 @@ do_configure() {
|
||||||
# as modules (defconfig+allmodconfig).
|
# as modules (defconfig+allmodconfig).
|
||||||
local arch
|
local arch
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
||||||
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
||||||
|
@ -58,22 +57,27 @@ do_configure() {
|
||||||
fi
|
fi
|
||||||
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
|
||||||
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
|
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() {
|
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} prepare
|
||||||
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
make EXTRAVERSION=${_patchver} ${makejobs} bzImage modules
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
local arch hdrdest
|
local arch hdrdest
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arch=i386
|
i686*) arch=i386;;
|
||||||
else
|
x86_64*) arch=x86_64;;
|
||||||
arch=x86_64
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
# Run depmod after compressing modules.
|
# Run depmod after compressing modules.
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
|
Loading…
Reference in New Issue