Files
RedBear-OS/recipes/libs/ncursesw/recipe.toml
T
vasilito cbb1d7ec37 fix: ncurses/ncursesw need -fPIC for static linking into PIE
--with-pic alone doesn't generate PIC code in newer ncurses (6.6+).
The static archive produced non-PIC objects using R_X86_64_PC32
relocations, which can't be linked into PIE executables.

Forced PIC via:
- Switched DYNAMIC_INIT → DYNAMIC_STATIC_INIT (builds both shared AND static)
- Added CFLAGS+=+=-fPIC CXXFLAGS+=+=-fPIC export (forces PIC at compile)

redbear-netctl-console now links successfully against libncursesw.a.
2026-07-12 22:46:27 +03:00

33 lines
672 B
TOML

[package]
name = "ncursesw"
version = "6.6"
[source]
same_as = "../ncurses"
[build]
template = "custom"
script = """
DYNAMIC_STATIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--disable-db-install
--disable-ext-colors
--disable-stripping
--enable-widec
--with-pic
--without-ada
--without-manpages
--without-tests
--enable-pc-files
--with-terminfo-dirs=/usr/share/terminfo
--with-pkg-config-libdir=/usr/lib/pkgconfig
cf_cv_func_mkstemp=yes
cf_cv_wint_t=yes
)
# Force PIC compilation - --with-pic alone doesn't always work for static libs
export CFLAGS="${CFLAGS} -fPIC"
export CXXFLAGS="${CXXFLAGS} -fPIC"
cookbook_configure
"""