From 943f22504e01611fb336a9cda0dcce6c9302d2c1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 19 Jan 2024 12:57:51 +0800 Subject: [PATCH] ncurses: Use symlinks instead of linker scripts The effect will not change, but with symlinks ld can save some time invoking open(), read(), etc. syscalls and parsing the linker scripts. Note that I've also removed "libcursesw" symlink because this library has never existed. Instead libcurses.so is created as a symlink direct to libncursesw.so. --- chapter06/ncurses.xml | 9 ++++----- chapter08/ncurses.xml | 26 +++++++++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index f491c2c92..0a8c7e166 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -156,7 +156,7 @@ popd Install the package: make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install -echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so +ln -sv libncursesw.so $LFS/usr/lib/libncurses.so sed -e 's/^#if.*XOPEN.*$/#if 1/' \ -i $LFS/usr/include/curses.h