On 11/2/17 10:56 AM, Andrei Alexandrescu wrote:
On 11/02/2017 08:46 AM, Steven Schveighoffer wrote:
Well, that is only header compatibility, not binary compatibility. In other words, that still means if you use C or C++, you need to recompile if you are on FreeBSD 12. You can't have one binary that supports both platforms.

Thanks, this is the kind of hard data we're looking for. Do you have a link to support this?

Sorry, I don't have any experience with FreeBSD. I was reacting to Jonathan's claim that "They did a lot of work to make that compatible so that programs didn't just break, but the compatibility stuff that they did was for C/C++, and we don't use C/C++ headers"

That lead me to believe that marking the headers differently is all they did. As I said, this is not binary compatibility.

Sure, we can do this too, we don't use C/C++ headers, but we can port our headers. The question to answer is, "can we create a binary that runs on both versions of FreeBSD?".

The answer to that question, I don't know. Is it possible on FreeBSD to detect this at runtime and call the right binding? Not sure. It might not even be detectable (see codephantom's post on how FreeBSD 12 may be compiled with the older binding anyway!)

Another possible option, if it existed, would be to simply call a function that does the right thing. Perhaps a .so that can be swapped out based on which version of the OS you are on?

But the only thing I can think of currently, that will definitely "solve" the problem, is to treat each version as a different OS with a new version statement. This doesn't scale well, so I'm not sure if that's the road we want to go down.

-Steve

Reply via email to