Open Johnnyxy opened 4 years ago
@Johnnyxy seems like you know all changes that are needed to be done. may be you can go ahead and create PR then?
Will do. At the moment I have to solve some other problems but I will head back for a PR.
Hi, is there any update here? I don't see the target architecture selection works...or am I doing something wrong? There is no -V
provided.
@Johnnyxy How do you get everything running without changing the internal conan code?
Building for QNX with Conan does not necessarily need any changes to the Conan code base. Updating the code base would be nothing else than an enhancement.
As you already asked at the bincrafters' issue tracker, I will point you over there. The attached files and instructions in here (https://github.com/bincrafters/community/issues/1041#issuecomment-569460055) is everything one needs to build for QNX 7.0 with conan.
This issue here is still open and from my point of view pending as it is still a task on my worklist but with a low priority.
hi there, as Conan now starts to support QNX Neutrino, I would like to specify a more correct behaviour of Conan regarding compiler flags, etc.
architecture selection
As of now Conan does not seem to support selecting the correct architecture for QNX targets. The QCC command line needs the correct QNX named target to load the correct configuration for the later GCC invocation. This means one has to provide the parameter
-V
. I did not find any traces of such thing (by searching the repo for "-V" or "aarch64").What Conan has to do is a mapping between Conan's
arch
setting and the correct QNX target:The table shows only mappings to
little endian
targets (likearmv7le
). As the default QNX SDP (version 6.5 or later) does not provide support via the standard installation for any other targets which differentiate between endianess andlittle endian
is a kinda standard for nix/BSD systems this could be the default for now. Anyway one could always introduce additional archs in thesettings.yml
.runtime library
In the Conan code Conan sets compiler flags according to the
libcxx
setting. All compilers before QNX 7 (QNX 6.6 and lower) support selecting the library only by their setting-Y gpp
or by directly choosing the exact target e.g.-Vgcc_ntox86_gpp
(those can be a combination -> -Vgcc_ntox86 -Y_gpp). QNX SDP 6.5 compiler -> docs QNX SDP 6.6 compiler -> docs QNX SDP 7.0 compiler -> docsThe current implementation would be fine until (including) QNX SDP 6.6. https://github.com/conan-io/conan/blob/64adf71cc691ef9c53aaf1331b8a9db0a89abe84/conans/client/build/compiler_flags.py#L77
Now since QNX SDP 7 (QCC 5.4) the QCC learned the parameter
stdlib
analog to the common GCC parameter. This would mean Conan could use the normal GCC settings for QCC 5.4 or higher. The following code is adapted from code I would write in a recipe. As this is a Conan internal function (see code link above) this should be considered as pseudo-code.Tthe
settings.yml
has to be extended to support the more common setting in the future forlibc++
andlibstdc++
.standard C/C++ dialect
QNX SDP 7.0 (QCC 5.4) learned another common setting from GCC (docs):
std=language
This means Conan can introduce the common settingcppstd
in thesettings.yml
and provide that to the normal build-flow.For GCC
-std=language
parameter Conan has a function here: https://github.com/conan-io/conan/blob/a050ed94034b27ae3d394b5abaeb815fac20f1b8/conans/client/build/cppstd_flags.py#L164This means that Conan could introduce another function for QCC like
_cppstd_qcc
(what I think should be preferred and just call the GCC function then) or directly use the GCC function variant.Additionally the following line has to be added to the
settings.yml
to thecompiler.qcc
-section: