Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 😄
Sorry for the large diff - there were quite a few trailing whitespaces around the place.