When I have Gradle build for both x86 and x86_64 architectures it uses the exact same include paths for both. However, output of “cpp -v” suggests this should not be the case.
Looking at the default include paths by running:
cpp -x c++ -m32 -v
cpp -x c++ -m64 -v
shows a couple differences. E.g.
64-bit has /usr/include/x86_64-linux-gnu/c++/5
32 bit has /usr/include/x86_64-linux-gnu/c++/5/32
However the compiler options.txt file produced by Gradle for both architectures has exactly the same list of include paths. On the system I have configured to build for ‘x86’, ‘x86_64’ and ‘arm’ this results in an error in random.h where the 32-bit build tries to use __int128, which is not supported for 32-bit.
Strangely on some systems the include path issue doesn’t actually trigger that error.
Anyway, I would like to know if this is something I can easily work around. I think it is a bug but would like confirmation.