Idea: define pkgconfig for system libs (libroot.so, libbe.so etc)

It will simplify Haiku applications build process for different compilers and architectures. For example current command needed to build RISC-V application outside of Haiku source tree looks terrible:

clang -target riscv64-linux -march=rv64imafdc -mabi=lp64d -fuse-ld=lld -fpic -shared -nostdlib -fno-exceptions -fvisibility=hidden -I/boot/system/develop/headers -I/boot/system/develop/headers/posix -I/boot/system/develop/headers/os -I/boot/system/develop/headers/os/app -I/boot/system/develop/headers/os/interface -I/boot/system/develop/headers/os/support -I/boot/system/develop/headers/os/kernel -I/boot/system/develop/headers/os/storage -I/boot/system/develop/headers/x86/c++ -I/boot/system/develop/headers/x86/c++/i586-pc-haiku -L/boot/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/release/kits -L/boot/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/release/system/libroot -L/boot/data/packages/haiku/generated.riscv64/build_packages/gcc_syslibs-8.3.0_2019_05_24-4-riscv64/lib -lroot -lbe -lstdc++ /boot/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/release/system/glue/start_dyn.o /boot/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/release/system/glue/haiku_version_glue.o MinApp.cpp -o MinApp

pkgconfig may simplify things a lot.

clang on Haiku already has the default include paths, maybe your usecase differs.

I build for RISC-V target, so system libraries are useless.

1 Like