-
Notifications
You must be signed in to change notification settings - Fork 16
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
TARGET_ARCH = $(GCC_MTUNE)=i586 does not actually produce a backwards compatible allegro.a #5
Comments
When not setting It is not actually clear from your report whether you did set Disclaimer: |
As for the actual issue, I agree that the current default at Line 179 in 12ba942
TARGET_ARCH = -march=i386 -m80387 -mtune=pentium instead of TARGET_ARCH = $(GCC_MTUNE)=i586 .
|
@manxorist Thank you for the heads up about -mtune and GCC; this was very helpful to know/learn. :) |
Do you think it would be a good idea to change this? To be completely honest, I don't actually have that much experience with C compiler settings. I did the minimum needed to get it cross compiling on my setup. But if this is a more useful default it might be nice to change it. |
Yes.
Yeah, uhm, there are some people keeping allegro 4.2 forks around, each with some the same and some other set of small patches, I do so also myself, but this is not public on github at the moment. It maybe would make some sense to consolidate these efforts of various people in some way or another. |
Thanks! I'm currently traveling but when I'm back I'll look into this. Although initially I just put this repo up for my own use, given that other people have found it and commented on it, I'm happy to make some more adjustments to make it more useful. To me this was always an experiment and I'm not very well versed in C let alone the intricacies of how to properly set up a compiler for an older system. So I appreciate the help. |
While -mtune=i586 should produce a binary compatible with i586 and earlier CPU's, this does not appear to be the case with the Allegro library. This resulted in a "gotcha" scenario for me when I moved from testing on DOSBOX to real hardware (and better VMs such as 86Box and VirtualBox), where anything built with this build of the Allegro library would immediately segfault.
Setting TARGET_ARCH=i386 in makefile.dj solves the segfault issue, and an executable built with this Allegro library work on real hardware and virtual machines other than DOSBOX.
The text was updated successfully, but these errors were encountered: