Page MenuHomeFreeBSD

ncurses: convert libncursesw.a into a static ldscript
ClosedPublic

Authored by bapt on Sun, Oct 10, 5:38 AM.

Details

Summary

this allows the build of older freebsd source tree to happen and make
static linking in part with dynamic linking which already provides a
ldscript

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bapt requested review of this revision.Sun, Oct 10, 5:38 AM
This revision is now accepted and ready to land.Sun, Oct 10, 5:45 AM

Does it mean that from an updated FreeBSD main-n249987-b158d4d7a12 (commit at "rescue: fix after with to a ldscript of libncursesw.a"), I should be able to build those few weeks old nanobsd ?
Or should I patch those old weeks sources with this patch?

Because I still have the problem trying to build from an updated current:

# uname -a
FreeBSD bigone 14.0-CURRENT FreeBSD 14.0-CURRENT #65 main-n249987-b158d4d7a12: Sun Oct 10 12:42:21 CEST 2021     olivier@bigone:/usr/obj/usr/src/amd64.amd64/sys/BBR  amd64
(etc..)

--- clang-tblgen.full ---
c++ -O2 -pipe -fno-common -I/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.amd64/tmp/obj-tools/lib/
clang/libllvm -I/usr/home/olivier/firmware/FreeBSD/lib/clang/include -I/usr/home/olivier/firmware/FreeBSD/contrib/llvm-project/llvm/in
clude -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unk
nown-freebsd14.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd14.0\" -DDEFAULT_SYSROOT=\"/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.amd64/tmp\" -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_A
SMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target
-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -g
line-tables-only -Wno-format-zero-length -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unus
ed-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-sw
itch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -I/usr/home/olivier/firmware/.obj/nano.nflx/usr/hom
e/olivier/firmware/FreeBSD/amd64.amd64/tmp/legacy/usr/include -fno-exceptions -fno-rtti -std=c++14 -stdlib=libc++ -Wno-c++11-extensions
-Wl,--gc-sections -static   -L/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.amd64/tmp/legacy/usr/l
ib -o clang-tblgen.full  ASTTableGen.o ClangASTNodesEmitter.o ClangASTPropertiesEmitter.o ClangAttrEmitter.o ClangCommentCommandInfoEmitter.
o ClangCommentHTMLNamedCharacterReferenceEmitter.o ClangCommentHTMLTagsEmitter.o ClangDataCollectorsEmitter.o ClangDiagnosticsEmitter.o Clan
gOpcodesEmitter.o ClangOpenCLBuiltinEmitter.o ClangOptionDocEmitter.o ClangSACheckersEmitter.o ClangSyntaxEmitter.o ClangTypeNodesEmitter.o
MveEmitter.o NeonEmitter.o SveEmitter.o TableGen.o /usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.a
md64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a -L/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/Fre
eBSD/amd64.amd64/tmp/obj-tools/lib/libexecinfo -lexecinfo -L/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBS
D/amd64.amd64/tmp/obj-tools/lib/libelf -lelf -L/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.amd64
/tmp/obj-tools/lib/ncurses/ncurses -lncursesw -L/usr/home/olivier/firmware/.obj/nano.nflx/usr/home/olivier/firmware/FreeBSD/amd64.amd6
4/tmp/obj-tools/lib/libthr -lpthread  -legacy
ld: error: undefined symbol: setupterm
>>> referenced by Process.inc:336 (/usr/home/olivier/firmware/FreeBSD/contrib/llvm-project/llvm/lib/Support/Unix/Process.inc:336)
>>>               Process.o:(llvm::sys::Process::FileDescriptorHasColors(int)) in archive /usr/home/olivier/firmware/.obj/nano.nflx/usr/h
ome/olivier/firmware/FreeBSD/amd64.amd64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a

ld: error: undefined symbol: tigetnum