Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Microblaze and OpenRISC ? #73

Closed
tpetazzoni opened this issue Jun 7, 2018 · 5 comments
Closed

Support for Microblaze and OpenRISC ? #73

tpetazzoni opened this issue Jun 7, 2018 · 5 comments

Comments

@tpetazzoni
Copy link

Buildroot is building Qt5 for a large number of architectures, and the build now fails on Microblaze and OpenRISC architecture because the copy of the double-conversion library in Qt5 doesn't have support for those architecture.

I am willing to test on those architectures what needs to be tested, but unfortunately the comment at https://github.com/google/double-conversion/blob/master/double-conversion/utils.h#L60 is not clear enough (to me) to know what to test.

Also, wouldn't it make sense for the code in utils.h to assume that DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is false for unsupported/unknown architectures ?

@floitsch
Copy link
Collaborator

floitsch commented Jun 7, 2018

I will see if setting the default to false always works.

In the meantime, here is how to test it (from memory):
Create two files and compile them separately:

// div.c
double Div_double(double x, double y) { return x / y; }
// main.c
double Div_double(double x, double y);

int main(int argc, char** argv) {
  return Div_double(89255.0, 1e22) == 89255e-22;
}

Compile them separately and link the o-files.
./main || echo "correct" should now tell you whether the conversion is correct.

If you get "correct" as result, we can just add the new architectures to the "good" list; otherwise to the "bad" list.
If all tests pass, that should be enough.

@tpetazzoni
Copy link
Author

Thanks for the quick feedback. I can run the tests, but I only have access to Qemu emulation for those architecctures ? Is it a good enough test or do you need a test on real hardware ?

@floitschG
Copy link
Contributor

Ideally I would test on real hardware, but I assume that the emulator does the right thing. (Otherwise programs wouldn't work).

@pseiderer
Copy link
Contributor

Added double-conversion support for the Qt5 (bundled double-converison library) buildroot cross-compile (aarch64_be [1], or1k [2][3], microblazeel/microblazebe [4]) lately, see the links for the
corresponding architecture defines and (qemu only) Div_double tests...

[1] http://lists.busybox.net/pipermail/buildroot/2018-August/227675.html
[2] http://lists.busybox.net/pipermail/buildroot/2018-August/228151.html
[3] http://lists.busybox.net/pipermail/buildroot/2018-August/228150.html
[4] http://lists.busybox.net/pipermail/buildroot/2018-August/228543.html

@floitsch
Copy link
Collaborator

floitsch commented Sep 8, 2018

Thanks.
I updated the header.
Note that the file had already changed, and that your (@pseiderer ) patches will now be conflicting.

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Oct 5, 2019
Fixes [1]:

  In file included from double-conversion.h:42:0,
                   from number_decimalquantity.cpp:19:
  double-conversion-utils.h:120:2: error: #error Target architecture was not detected as supported by Double-Conversion.
   #error Target architecture was not detected as supported by Double-Conversion.

Apply the same fix as previously for qt5base ([2], already sent upstream [3],
but seems to be lost while merging [4]).

[1] http://autobuild.buildroot.net/results/24005bc54cbc742decee221fb09bca19ee70502c
[2] https://git.buildroot.net/buildroot/commit/?id=530668ddb709cf27aa6694e00f44cf58af858b0b
[3] google/double-conversion#73
[4] google/double-conversion@768a445

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
floitsch added a commit that referenced this issue Oct 12, 2019
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Oct 28, 2019
Fixes [1]:

  In file included from double-conversion.h:42:0,
                   from number_decimalquantity.cpp:19:
  double-conversion-utils.h:120:2: error: #error Target architecture was not detected as supported by Double-Conversion.
   #error Target architecture was not detected as supported by Double-Conversion.

Apply the same fix as previously for qt5base ([2], already sent upstream [3],
but seems to be lost while merging [4]).

[1] http://autobuild.buildroot.net/results/24005bc54cbc742decee221fb09bca19ee70502c
[2] https://git.buildroot.net/buildroot/commit/?id=530668ddb709cf27aa6694e00f44cf58af858b0b
[3] google/double-conversion#73
[4] google/double-conversion@768a445

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 0e9eaf7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants