3 ms·
Um ... isn't alignment generally dictated by the platform ABI so that programs compiled by different compilers can be linked together?
by gavinsyancey 1y ago
Um ... isn't alignment generally dictated by the platform ABI so that programs compiled by different compilers can be linked together?
- plorkyeran 1y agoThe 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 1y agoWe 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.
- deleted 1y ago[deleted]
- bobmcnamara 1y agoIdeally yes, but practically there are at least a dozen just for x86.(there's like 3 big ones).