We set up LD_FLAGS in cmake/sac2c/config.cmake that should capture differences in OS linking. However, these never get used neither when building sac2c nor in sac2crc. This, for example, causes a failure on ubuntu when compiling the following sac program:
use Array:all;
use StdIO:all;
int main () {
a = [1,2,3,4];
b = [a,a];
a = modarray( modarray( a, [0], 0), [1], 0);
print(a);
return 0;
}
Using the following sac2c flags:
sac2c -v0 -O0 -noprelude -noinl -specmode aud a.sac
Adding -Xl '-Wl,--allow-shlib-undefined'
solves the problem,
however this very flag is already defined in LD_FLAGS.