Simplify source.sh, fix dependencies and enable CET support
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
name: glibc
|
name: glibc
|
||||||
description: The GNU C Library
|
description: The GNU C Library
|
||||||
version: 2.41
|
version: 2.41
|
||||||
revision: 2
|
revision: 3
|
||||||
url: https://www.gnu.org/software/libc/
|
url: https://www.gnu.org/software/libc/
|
||||||
license: GPL2-or-later
|
license: GPL2-or-later,LGPL2.1-or-later,BSD-3-Clause
|
||||||
architecture: any
|
architecture: any
|
||||||
make_depends: ["bash","binutils","bison","coreutils","diffutils","gawk","gcc","gettext","grep","gzip","make","perl","python3","sed","texinfo"]
|
make_depends: ["bash","binutils","bison","coreutils","diffutils","gawk","gcc","gettext","grep","gzip","make","perl","python3","sed","texinfo"]
|
||||||
provides: ["libc"]
|
provides: ["libc"]
|
||||||
|
|||||||
@@ -17,14 +17,21 @@ prepare() {
|
|||||||
build() {
|
build() {
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
|
# Install system binaries to /usr/sbin
|
||||||
echo "rootsbindir=/usr/sbin" > configparms
|
echo "rootsbindir=/usr/sbin" > configparms
|
||||||
../configure --prefix=/usr \
|
|
||||||
--disable-werror \
|
../configure --prefix=/usr \
|
||||||
--enable-kernel=5.4 \
|
--with-headers=/usr/include \
|
||||||
--enable-stack-protector=strong \
|
--enable-kernel=5.4 \
|
||||||
--disable-nscd \
|
--enable-cet \
|
||||||
|
--enable-stack-protector=strong \
|
||||||
|
--disable-werror \
|
||||||
|
--disable-nscd \
|
||||||
libc_cv_slibdir=/usr/lib
|
libc_cv_slibdir=/usr/lib
|
||||||
make
|
make
|
||||||
|
|
||||||
|
# Generate locales here because localedef does not work in fakeroot
|
||||||
make -C "$BPM_SOURCE"/localedata objdir="$BPM_SOURCE"/build DESTDIR="${BPM_WORKDIR}"/locales install-locale-files
|
make -C "$BPM_SOURCE"/localedata objdir="$BPM_SOURCE"/build DESTDIR="${BPM_WORKDIR}"/locales install-locale-files
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +43,7 @@ check() {
|
|||||||
sed -i "/tst-thread-affinity-sched/d" nptl/Makefile
|
sed -i "/tst-thread-affinity-sched/d" nptl/Makefile
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
make check
|
make check
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,22 +51,35 @@ check() {
|
|||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Fix hardcoded path
|
||||||
sed '/RTLDLIST=/s@/usr@@g' -i "$BPM_OUTPUT"/usr/bin/ldd
|
sed '/RTLDLIST=/s@/usr@@g' -i "$BPM_OUTPUT"/usr/bin/ldd
|
||||||
mkdir -p "$BPM_OUTPUT"/usr/lib/locale
|
|
||||||
mkdir -p "$BPM_OUTPUT"/etc
|
# Install locale-gen script
|
||||||
mkdir -p "$BPM_OUTPUT"/usr/share/i18n
|
install -Dm755 "$BPM_WORKDIR"/locale-gen "$BPM_OUTPUT"/usr/bin/locale-gen
|
||||||
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' "$BPM_SOURCE"/localedata/SUPPORTED > "$BPM_OUTPUT"/usr/share/i18n/SUPPORTED
|
|
||||||
|
# Create locale.gen file
|
||||||
|
install -dm755 "$BPM_OUTPUT"/etc
|
||||||
touch "$BPM_OUTPUT"/etc/locale.gen
|
touch "$BPM_OUTPUT"/etc/locale.gen
|
||||||
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' "$BPM_SOURCE"/localedata/SUPPORTED >> "$BPM_OUTPUT"/etc/locale.gen
|
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' "$BPM_SOURCE"/localedata/SUPPORTED >> "$BPM_OUTPUT"/etc/locale.gen
|
||||||
sed -i '/#C\.UTF-8 /d' "$BPM_OUTPUT"/etc/locale.gen
|
|
||||||
|
# Create SUPPORTED file
|
||||||
|
install -dm755 "$BPM_OUTPUT"/usr/share/i18n
|
||||||
|
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' "$BPM_SOURCE"/localedata/SUPPORTED > "$BPM_OUTPUT"/usr/share/i18n/SUPPORTED
|
||||||
|
|
||||||
|
# Install C.UTF-8 so that it is always available
|
||||||
|
install -dm55 "$BPM_OUTPUT"/usr/lib/locale
|
||||||
cp -r "$BPM_WORKDIR"/locales/usr/lib/locale/C.utf8 -t "$BPM_OUTPUT"/usr/lib/locale
|
cp -r "$BPM_WORKDIR"/locales/usr/lib/locale/C.utf8 -t "$BPM_OUTPUT"/usr/lib/locale
|
||||||
cp "$BPM_WORKDIR"/locale-gen "$BPM_OUTPUT"/usr/bin/locale-gen
|
sed -i '/#C\.UTF-8 /d' "$BPM_OUTPUT"/etc/locale.gen
|
||||||
mkdir -p "$BPM_OUTPUT"/lib64/
|
|
||||||
|
# Symlink glibc dynamic linker to /lib64
|
||||||
|
install -dm755 "$BPM_OUTPUT"/lib64/
|
||||||
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64
|
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64
|
||||||
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64/ld-lsb-x86_64.so.3
|
ln -sf ../lib/ld-linux-x86-64.so.2 "$BPM_OUTPUT"/lib64/ld-lsb-x86_64.so.3
|
||||||
chmod +x "$BPM_OUTPUT"/usr/bin/locale-gen
|
|
||||||
|
|
||||||
|
# Install package licenses
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSES "$BPM_OUTPUT"/usr/share/licenses/glibc/LICENSES
|
install -Dm644 "$BPM_SOURCE"/LICENSES "$BPM_OUTPUT"/usr/share/licenses/glibc/LICENSES
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING.LIB
|
install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/glibc/COPYING.LIB
|
||||||
|
|||||||
Reference in New Issue
Block a user