This PR mainly fixes building with the LLVM linker (LLD), but I also took the liberty of adding a Dutch translation to the .desktop file, a .gitignore file to exclude output directories (_out), and fixing a bunch of warnings (disabled deprecation warnings so that the build doesn't fail with WARNINGS_AS_ERRORS set).
LLD requires the -m switch to be passed during target emulation; this was causing it to fail in the READ_ONLY_OBJECT_FROM_FILE_RULE function. This was fixed simply with this:
and then by adding $(LLD_EMULATION) to the options of the linker invocation in READ_ONLY_OBJECT_FROM_FILE_RULE (I updated both utils.mk & src/libXNVCtrl/utils.mk).
Small thing to note in case it is of consequence: the output of uname -m on an x86_64 system is amd64 on FreeBSD and x86_64 on Linux. I thus added the following substitution to make things a bit more consistent and cleaner:
This has the side effect of changing the output path on FreeBSD from src/_out/FreeBSD_amd64 to src/_out/FreeBSD_x86_64; perhaps something to notify the nvidia-settings port maintainer about? I haven't yet done this but I will do if ever this PR is merged.
I tested this on FreeBSD 13 with Clang 11.0.1 & GCC 10.3.0 and Ubuntu 20.04 with GCC 9.3.0. All seems to be working :smile:
Sorry for the large diff - there were quite a few trailing whitespaces around the place.
This PR mainly fixes building with the LLVM linker (LLD), but I also took the liberty of adding a Dutch translation to the
.desktop
file, a.gitignore
file to exclude output directories (_out
), and fixing a bunch of warnings (disabled deprecation warnings so that the build doesn't fail withWARNINGS_AS_ERRORS
set).LLD requires the
-m
switch to be passed during target emulation; this was causing it to fail in theREAD_ONLY_OBJECT_FROM_FILE_RULE
function. This was fixed simply with this:and then by adding
$(LLD_EMULATION)
to the options of the linker invocation inREAD_ONLY_OBJECT_FROM_FILE_RULE
(I updated bothutils.mk
&src/libXNVCtrl/utils.mk
).Small thing to note in case it is of consequence: the output of
uname -m
on an x86_64 system isamd64
on FreeBSD andx86_64
on Linux. I thus added the following substitution to make things a bit more consistent and cleaner:This has the side effect of changing the output path on FreeBSD from
src/_out/FreeBSD_amd64
tosrc/_out/FreeBSD_x86_64
; perhaps something to notify thenvidia-settings
port maintainer about? I haven't yet done this but I will do if ever this PR is merged.I tested this on FreeBSD 13 with Clang 11.0.1 & GCC 10.3.0 and Ubuntu 20.04 with GCC 9.3.0. All seems to be working :smile:
Sorry for the large diff - there were quite a few trailing whitespaces around the place.