From 35a5a69355552be744dc7e1e21fee7182bafa99c Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Thu, 17 Sep 2020 13:20:06 +0200 Subject: Some fixes for CompCert 1. Like with gcc's `ld`, also use the `group_start` code to create a `--start-group`/`--end-group` 2. xc16 tricked into believing the 'link_whole' was about `--*-group`, but it should use gcc's `--whole-archive` instead. 3. Not clear what the get_lib_prefix should really do, but for picolibc it seems I want just `''`. The problem with picolibc was that the `-l` would be prefixed to a lib like `picolib/libm/libm.a`. Though of course the `-l` would be necessary for just a plain `m` (that's what I assumed this would be used for). I think this might need some clarification from the meson devs ;-) --- mesonbuild/compilers/mixins/clike.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/mixins') diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index dfa3f8a..b2942d3 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -32,7 +32,7 @@ from pathlib import Path from ... import arglist from ... import mesonlib from ... import mlog -from ...linkers import GnuLikeDynamicLinkerMixin, SolarisDynamicLinker +from ...linkers import GnuLikeDynamicLinkerMixin, SolarisDynamicLinker, CompCertDynamicLinker from ...mesonlib import LibType from .. import compilers from .visualstudio import VisualStudioLikeCompiler @@ -67,7 +67,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs): # This covers all ld.bfd, ld.gold, ld.gold, and xild on Linux, which # all act like (or are) gnu ld # TODO: this could probably be added to the DynamicLinker instead - if isinstance(self.compiler.linker, (GnuLikeDynamicLinkerMixin, SolarisDynamicLinker)): + if isinstance(self.compiler.linker, (GnuLikeDynamicLinkerMixin, SolarisDynamicLinker, CompCertDynamicLinker)): group_start = -1 group_end = -1 for i, each in enumerate(new): -- cgit v1.1