aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorSebastian Meyer <meyer@absint.com>2020-09-17 13:20:06 +0200
committerDylan Baker <dylan@pnwbakers.com>2020-09-18 08:59:39 -0700
commit35a5a69355552be744dc7e1e21fee7182bafa99c (patch)
tree0bcde02be8d7ce37e6a48995b8674a4908e98c57 /mesonbuild/linkers.py
parent9d8906363ecd682b4b03064a862fd17069a70df4 (diff)
downloadmeson-35a5a69355552be744dc7e1e21fee7182bafa99c.zip
meson-35a5a69355552be744dc7e1e21fee7182bafa99c.tar.gz
meson-35a5a69355552be744dc7e1e21fee7182bafa99c.tar.bz2
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 ;-)
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index 02b30e9..d85c88e 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -900,13 +900,13 @@ class CompCertDynamicLinker(DynamicLinker):
def get_link_whole_for(self, args: T.List[str]) -> T.List[str]:
if not args:
return args
- return self._apply_prefix('-WUl,--start-group') + args + self._apply_prefix('-WUl,--end-group')
+ return self._apply_prefix('-Wl,--whole-archive') + args + self._apply_prefix('-Wl,--no-whole-archive')
def get_accepts_rsp(self) -> bool:
return False
def get_lib_prefix(self) -> str:
- return '-l'
+ return ''
def get_std_shared_lib_args(self) -> T.List[str]:
return []