FS#67092 - [nim] makepkg compiler flags should be removed after compilation
Attached to Project:
Community Packages
Opened by Danil Yarantsev (Yardanico) - Tuesday, 23 June 2020, 21:07 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
Opened by Danil Yarantsev (Yardanico) - Tuesday, 23 June 2020, 21:07 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:01 GMT
|
Details
Description:
If you check https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/nim#n37 (lines from 37 to 40), you can see that the PKGBUILD adds the compilation flags to the Nim configuration (and for some reason in compiler/nim.cfg too although that's not needed since it'll use flags from the config/nim.cfg too). The problem is - if these flags are not removed after building the compiler and all tools, the user wouldn't be able to cross-compile using GCC since Nim would always add flags like "-march=x86_64 -mtune=generic" (which were added in the PKGBUILD) to any GCC cross-compilers. Proposed solution: Remove these flags from the nim.cfg after building the compiler and all tools. Initially reported in a Nim Telegram group (starts at https://t.me/nim_lang/38313) |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/nim/issues/2
Saturday, 25 November 2023, 20:01 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/nim/issues/2
# hello.nim
echo "Hello world"
And try to cross-compile it with nim c --cpu:arm64 --gcc.exe="aarch64-linux-gnu-gcc" --gcc.linkerexe="aarch64-linux-gnu-gcc" hello.nim
It'll fail because -march=x86_64 -mtune=generic were passed to aarch64-linux-gnu-gcc
FS#77730