top | item 44739475

(no title)

gavinsyancey | 7 months ago

Um ... isn't alignment generally dictated by the platform ABI so that programs compiled by different compilers can be linked together?

discuss

order

plorkyeran|7 months ago

The widely used platforms with multiple compilers generally have one or more written down ABIs that the compilers all follow, but more niche platforms frequently have exactly one compiler (often a very out of date fork of gcc) that just does whatever they felt like implementing and may not even support linking together things built by different versions of that one compiler.

sumtechguy|7 months ago

We had that exact thing. Our target at the time was about 6 different platforms. 2 of them had very picky compilers/ABI. We were trying to keep it to one codebase with minimal if-def callouts. Learned very quickly not all compilers are the same even thought they may have the same name and version number. Then the std libs are subtly different enough from each other you really have to pay attention to what you are doing.

bobmcnamara|7 months ago

Ideally yes, but practically there are at least a dozen just for x86.(there's like 3 big ones).