mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 23:23:00 -04:00
www-client/chawan: set compiler flags and linker flags properly for nimc
Another thanks to Agostino Sarubbo for finding this bug code is mostly copy pasted from the nim_gen_config() function from nim-utils.eclass, modified a bit to actually append to the original nim.cfg, instead of replacing it This should hopefully, fix the issue. With my testing, I tested by setting the compiler to clang and then GCC, and thankfully when I checked btop, nimc was actually using the appropriate compiler Closes: https://bugs.gentoo.org/975973 Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs multiprocessing
|
||||
|
||||
DESCRIPTION="TUI web browser; supports CSS, images, JavaScript, and multiple web protocols"
|
||||
HOMEPAGE="https://chawan.net"
|
||||
|
||||
@@ -43,3 +45,28 @@ src_prepare(){
|
||||
die "Trying to sed the Makefile for lto failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# code is mostly copy pasted from the nim_gen_config() function from nim-utils.eclass, modifed a bit to actually
|
||||
# append to the original nim.cfg, instead of replacing it
|
||||
cat >> "${S}"/nim.cfg <<- EOF || die "Failed to append to Nim config"
|
||||
--parallelBuild:"$(makeopts_jobs)"
|
||||
|
||||
cc:"gcc"
|
||||
gcc.exe:"$(tc-getCC)"
|
||||
gcc.linkerexe:"$(tc-getCC)"
|
||||
gcc.cpp.exe:"$(tc-getCXX)"
|
||||
gcc.cpp.linkerexe:"$(tc-getCXX)"
|
||||
gcc.options.speed:"${CFLAGS}"
|
||||
gcc.options.size:"${CFLAGS}"
|
||||
gcc.options.debug:"${CFLAGS}"
|
||||
gcc.options.always:"${CPPFLAGS}"
|
||||
gcc.options.linker:"${LDFLAGS}"
|
||||
gcc.cpp.options.speed:"${CXXFLAGS}"
|
||||
gcc.cpp.options.size:"${CXXFLAGS}"
|
||||
gcc.cpp.options.debug:"${CXXFLAGS}"
|
||||
gcc.cpp.options.always:"${CPPFLAGS}"
|
||||
gcc.cpp.options.linker:"${LDFLAGS}"
|
||||
EOF
|
||||
default
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user