sync: support linking with libatomic with tcc on ubuntu aarch64

pull/10439/head
Delyan Angelov 2021-06-12 20:34:45 +03:00
parent bdd1a13230
commit b7f9bc2a96
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 38 additions and 16 deletions

View File

@ -11,21 +11,33 @@ for stdatomic that supports both nix, windows and c++.
This implementations should be regarded as alpha stage and be
further tested.
*/
#flag windows -I @VEXEROOT/thirdparty/stdatomic/win
#flag linux -I @VEXEROOT/thirdparty/stdatomic/nix
#flag darwin -I @VEXEROOT/thirdparty/stdatomic/nix
#flag freebsd -I @VEXEROOT/thirdparty/stdatomic/nix
#flag solaris -I @VEXEROOT/thirdparty/stdatomic/nix
$if linux {
$if tinyc {
// most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir
#flag -L/usr/lib/gcc/x86_64-linux-gnu/6
#flag -L/usr/lib/gcc/x86_64-linux-gnu/7
#flag -L/usr/lib/gcc/x86_64-linux-gnu/8
#flag -L/usr/lib/gcc/x86_64-linux-gnu/9
#flag -L/usr/lib/gcc/x86_64-linux-gnu/10
#flag -L/usr/lib/gcc/x86_64-linux-gnu/11
#flag -L/usr/lib/gcc/x86_64-linux-gnu/12
$if amd64 {
// most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir
#flag -L/usr/lib/gcc/x86_64-linux-gnu/6
#flag -L/usr/lib/gcc/x86_64-linux-gnu/7
#flag -L/usr/lib/gcc/x86_64-linux-gnu/8
#flag -L/usr/lib/gcc/x86_64-linux-gnu/9
#flag -L/usr/lib/gcc/x86_64-linux-gnu/10
#flag -L/usr/lib/gcc/x86_64-linux-gnu/11
#flag -L/usr/lib/gcc/x86_64-linux-gnu/12
} $else $if aarch64 {
#flag -L/usr/lib/gcc/aarch64-linux-gnu/6
#flag -L/usr/lib/gcc/aarch64-linux-gnu/7
#flag -L/usr/lib/gcc/aarch64-linux-gnu/8
#flag -L/usr/lib/gcc/aarch64-linux-gnu/9
#flag -L/usr/lib/gcc/aarch64-linux-gnu/10
#flag -L/usr/lib/gcc/aarch64-linux-gnu/11
#flag -L/usr/lib/gcc/aarch64-linux-gnu/12
}
#flag -latomic
}
}

View File

@ -11,14 +11,24 @@ $if windows {
$if linux {
$if tinyc {
// most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir
#flag -L/usr/lib/gcc/x86_64-linux-gnu/6
#flag -L/usr/lib/gcc/x86_64-linux-gnu/7
#flag -L/usr/lib/gcc/x86_64-linux-gnu/8
#flag -L/usr/lib/gcc/x86_64-linux-gnu/9
#flag -L/usr/lib/gcc/x86_64-linux-gnu/10
#flag -L/usr/lib/gcc/x86_64-linux-gnu/11
#flag -L/usr/lib/gcc/x86_64-linux-gnu/12
$if amd64 {
// most Linux distributions have /usr/lib/libatomic.so, but Ubuntu uses gcc version specific dir
#flag -L/usr/lib/gcc/x86_64-linux-gnu/6
#flag -L/usr/lib/gcc/x86_64-linux-gnu/7
#flag -L/usr/lib/gcc/x86_64-linux-gnu/8
#flag -L/usr/lib/gcc/x86_64-linux-gnu/9
#flag -L/usr/lib/gcc/x86_64-linux-gnu/10
#flag -L/usr/lib/gcc/x86_64-linux-gnu/11
#flag -L/usr/lib/gcc/x86_64-linux-gnu/12
} $else $if aarch64 {
#flag -L/usr/lib/gcc/aarch64-linux-gnu/6
#flag -L/usr/lib/gcc/aarch64-linux-gnu/7
#flag -L/usr/lib/gcc/aarch64-linux-gnu/8
#flag -L/usr/lib/gcc/aarch64-linux-gnu/9
#flag -L/usr/lib/gcc/aarch64-linux-gnu/10
#flag -L/usr/lib/gcc/aarch64-linux-gnu/11
#flag -L/usr/lib/gcc/aarch64-linux-gnu/12
}
#flag -latomic
}
}