Omar Polo <[email protected]> wrote:
> Volker Schlecht <[email protected]> wrote:
> > Updates lang/nim to 1.6.4
> >
> > * Builds tools along with the main compiler
> > -- nimgrep
> > -- nimpretty
> > -- nimsuggest
> >
> > * Drops the install.sh patch (install.sh is not used in do-install)
> >
> > * Drops defunct mirror site
> >
> > Built and tested (toying with tutorials, installing packages with
> > nimble, Neovim integration with nimsuggest) on amd64.
>
> couple of comments, otherwise looks good :)
>
> - there are some -O3 hardcoded in the build that should be removed. I
> killed the one in build.sh easily, but the rest of the build still uses
> -O3 and I don't know from whence it came. I've patched
> compiler/extccmop.nim,
> compile/mappings.txt and config/nim.cfg to remove every -O3 and -Os but
> there
> are still lines like:
>
> Hint: clang -c -w -ferror-limit=3 -O3 -fno-ident
> -I/home/_pobj/nim-1.6.4/nim-1.6.4/lib -I/usr/local/include
> -I/usr/local/include -I/home/_pobj/nim-1.6.4/nim-1.6.4/compiler -o
> /home/_pobj/nim-1.6.4/nim-1.6.4/nimcache-port/@mwordrecg.nim.c.o
> /home/_pobj/nim-1.6.4/nim-1.6.4/nimcache-port/@mwordrecg.nim.c [Exec]
>
> (this one in particular completely ignores ${CFLAGS}...)
>
> - all the others share/examples/nim/*.cfg are @sample'd into /etc/nim/,
> should we do the same for the new rename.rules.cfg?
>
> Btw, the build failure on i386 persist but for a different reason: it
> thinks it's running on amd64 and complains that sizeof(void *) != 8.
found it, I don't know how I haven't seen it before. build.sh has:
case $ucpu in
*i386* | *i486* | *i586* | *i686* | *bepc* | *i86pc* )
if [ isOpenIndiana -eq "yes" ]; then
mycpu="amd64"
else
mycpu="i386"
fi
Apart from the missing sigil and quoting around isOpenIndiana, -eq is to
compare numbers not strings, so test exits with 0 and mycpu is set to
amd64... With s/-eq/==/ I can successfully build nim on i386.
still no idea for the -O3...
oh, and waiting for the build on i386 i noticed that it tries to call
git, another thing that should be dropped:
/usr/ports/pobj/nim-1.6.4/nim-1.6.4/dist/nimble/src/nimblepkg/options.nim(168,14)
Warning: Couldn't determine GIT hash: fatal: not a git repository (or
any parent up to mount point /) Stopping at filesystem boundary
(GIT_DISCOVERY_ACROSS_FILESYSTEM not set). [User]